Get-GitHubCopilotSpaceForUserList

SYNOPSIS

List Copilot Spaces for a user

SYNTAX

__AllParameterSets

Get-GitHubCopilotSpaceForUserList [-Username] <string> [-PerPage <long>] [-Before <string>]
 [-After <string>] [-AllResults] [-Accept <string>]

ALIASES

This cmdlet has the following aliases,

  • Get-GHCopilotSpaceForUserList

DESCRIPTION

The Get-GitHubCopilotSpaceForUserList cmdlet invokes the GET method of the /users/{username}/copilot-spaces endpoint (List Copilot Spaces for a user)

Lists Copilot Spaces owned by a user. The authenticated user must have read access to the user’s Copilot Spaces.

Only Spaces that are readable by the authenticated user are returned. This includes the user’s own spaces, and public user spaces when accessing another user’s spaces.

OAuth app tokens and personal access tokens (classic) need the ‘read:user’ scope to use this endpoint.

Endpoint: GET /users/{username}/copilot-spaces API version: 2026-03-10

EXAMPLES

EXAMPLE 1

Get-GitHubCopilotSpaceForUserList -Username 'octocat'

Invokes GET /users/{username}/copilot-spaces

EXAMPLE 2

Get-GitHubCopilotSpaceForUserList -Username 'octocat' -AllResults

Returns the items of every page

PARAMETERS

-Accept

The Accept header (media type) of the request Default value: application/vnd.github+json

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-After

A cursor, as given in the Link header (https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor.

Query parameter [ after ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-AllResults

Follows the pagination links & returns the items of every page. 100 items are requested per page unless the per page parameter is used

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Before

A cursor, as given in the Link header (https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor.

Query parameter [ before ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-PerPage

The number of results per page (max 100).

Query parameter [ per_page ]

Default value: 30

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Username

The handle for the GitHub user account.

Path parameter [ username ]

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Objects with properties named like the path parameters can be piped to this function

{{ Fill in the Description }}

System.String

{{ Fill in the Description }}

OUTPUTS

The response of the GitHub API (objects

{{ Fill in the Description }}

NOTES

OperationId: copilot-spaces/list-for-user Category: copilot-spaces / copilot-spaces Not enabled for GitHub Apps