Skip to main content

org_seats

Creates, updates, deletes, gets or lists an org_seats resource.

Overview

Nameorg_seats
TypeResource
Idgithub.copilot.org_seats

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
assigneeobjectA GitHub user. (title: Simple User)
assigning_teamobjectThe team through which the assignee is granted access to GitHub Copilot, if applicable. (title: Team)
created_atstring (date-time)Timestamp of when the assignee was last granted access to GitHub Copilot, in ISO 8601 format.
last_activity_atstring (date-time)Timestamp of user's last GitHub Copilot activity, in ISO 8601 format.
last_activity_editorstringLast editor that was used by the user for a GitHub Copilot completion.
last_authenticated_atstring (date-time)Timestamp of the last time the user authenticated with GitHub Copilot, in ISO 8601 format.
organizationobjectA GitHub organization. (title: Organization Simple)
pending_cancellation_datestring (date)The pending cancellation date for the seat, in YYYY-MM-DD format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle.
plan_typestringThe Copilot plan of the organization, or the parent enterprise, when applicable. (business, enterprise, unknown)
updated_atstring (date-time)Closing down notice: This field is no longer relevant and is closing down. Use the created_at field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_copilot_seatsselectorgpage, per_page> [!NOTE]
> This endpoint is in public preview and is subject to change.

Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.
Only organization owners can view assigned seats.

Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at.
For more information about activity data, see Metrics data properties for GitHub Copilot.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.
cancel_copilot_seat_assignment_for_teamsexecorg, selected_teams> [!NOTE]
> This endpoint is in public preview and is subject to change.

Sets seats for all members of each team specified to "pending cancellation".
This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.
For more information about disabling access to Copilot, see "Revoking access to Copilot for members of your organization."

Only organization owners can cancel Copilot seats for their organization members.

The response contains the total number of seats set to "pending cancellation".

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

> [!NOTE]
> This endpoint is in public preview and is subject to change.

Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.
Only organization owners can view assigned seats.

Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in last_activity_at.
For more information about activity data, see Metrics data properties for GitHub Copilot.

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or read:org scopes to use this endpoint.

SELECT
assignee,
assigning_team,
created_at,
last_activity_at,
last_activity_editor,
last_authenticated_at,
organization,
pending_cancellation_date,
plan_type,
updated_at
FROM github.copilot.org_seats
WHERE org = '{{ org }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;

Lifecycle Methods

> [!NOTE]
> This endpoint is in public preview and is subject to change.

Sets seats for all members of each team specified to "pending cancellation".
This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.
For more information about disabling access to Copilot, see "Revoking access to Copilot for members of your organization."

Only organization owners can cancel Copilot seats for their organization members.

The response contains the total number of seats set to "pending cancellation".

OAuth app tokens and personal access tokens (classic) need either the manage_billing:copilot or admin:org scopes to use this endpoint.

EXEC github.copilot.org_seats.cancel_copilot_seat_assignment_for_teams 
@org='{{ org }}' --required
@@json=
'{
"selected_teams": "{{ selected_teams }}"
}'
;