Skip to main content
O controle de versão da API REST já foi feito. Para obter mais informações, confira "Sobre o controle de versão da API".

Pontos de extremidade da API REST para SCIM

Use a API REST para automatizar a criação de usuários e as associações de equipe com o SCIM.

Observações:

  • Esses pontos de extremidade permitem provisionar contas de usuário para a empresa no GitHub Enterprise Cloud usando o SCIM. A operação só está disponível para uso com Enterprise Managed Users. Se você não usa Enterprise Managed Users e deseja provisionar o acesso às suas organizações usando SCIM, consulte "Pontos de extremidade da API REST para SCIM".
  • O suporte para o provisionamento de usuários com o esquema do SCIM público do GitHub está em teste beta público e sujeito a alterações.
  • A GitHub recomenda que você teste o provisionamento em um ambiente isolado dos dados de produção no seu IdP e do GitHub.com.

Sobre o SCIM

Para criar, gerenciar e desativar contas de usuário para membros da empresa no GitHub.com, seu IdP deve implementar o SCIM para comunicação com o GitHub. O SCIM é uma especificação aberta para gerenciamento de identidades de usuários entre sistemas. Diferentes IdPs fornecem experiências diferentes para a configuração do provisionamento do SCIM. Se você não usar um IdP de parceiro com uma integração existente, poderá fazer a integração usando os pontos de extremidade de API a seguir. Para obter mais informações, confira "Provisionar usuários e grupos com SCIM usando a API REST".

URL base

Para gerenciar os usuários e os grupos da sua empresa usando SCIM, use a seguinte URL base para se comunicar com os pontos de extremidade nessa categoria.

https://api.github.com/scim/v2/enterprises/{enterprise}/

Autenticação

Para autenticar as solicitações da API, a pessoa que configura o SCIM no IdP precisa usar um personal access token (classic) com o escopo admin:enterprise, que o IdP precisa fornecer no cabeçalho da solicitação Authorization. Para obter mais informações sobre personal access tokens (classic), confira "Gerenciar seus tokens de acesso pessoal".

A GitHub recomenda a autenticação como usuário de configuração da empresa. Outras contas de usuário são criadas por meio do SCIM. Portanto, autenticar como um usuário diferente pode resultar em consequências indesejadas, como ser bloqueado fora da sua empresa. As solicitações de gravação para essas APIs são possíveis por meio de nossos aplicativos IdP publicados ou por meio da versão beta do acesso direto à API para nossos pontos de extremidade SCIM. Se outro proprietário da empresa precisar ler informações da API, use um personal access token (classic) com o escopo admin:enterprise para fazer solicitações GET em sua implementação atual do SCIM. Para obter mais informações, confira "Configurando o provisionamento de SCIM para usuários gerenciados pela empresa".

Mapear dados do SAML e SCIM

Depois que um conta de usuário gerenciada é autenticado com êxito para acessar sua empresa usando o SSO SAML, o GitHub Enterprise Cloud vincula o usuário a uma identidade provisionada pelo SCIM. Para vincular as identidades com êxito, o provedor de identidade SAML e a integração do SCIM devem usar identificadores exclusivos correspondentes.

A GitHub exige a declaração do SAML e o atributo do SCIM a seguir para corresponder com êxito o usuário com a identidade provisionada pelo SCIM. Os provedores de identidade podem diferir no campo usado para identificar exclusivamente um usuário.

Microsoft Entra ID para SAML

Para usar o Entra ID (o antigo Azure AD) para SAML, as seguintes declarações SAML e o atributo SCIM devem corresponder.

Declaração SAMLAtributo correspondente do SCIM
http://schemas.microsoft.com/identity/claims/objectidentifierexternalId

Outros IdPs para SAML

Para usar outros IdPs para SAML, as seguintes declarações SAML e o atributo SCIM devem corresponder.

Declaração SAMLAtributo correspondente do SCIM
NameIDuserName

Atributos de usuário do SCIM com suporte

Os pontos de extremidade de Users desta categoria dão suporte aos atributos a seguir dentro dos parâmetros de uma solicitação.

NomeTipoDescrição
displayNameStringNome de usuário legível por pessoas.
name.formattedStringO nome completo do usuário, incluindo todos os nomes do meio, títulos e sufixos, formatados para exibição.
name.givenNameStringPrimeiro nome do usuário.
name.familyNameStringSobrenome do usuário.
userNameStringO nome do usuário, gerado pelo provedor do SCIM. Passa por normalização antes de ser usado. Deve ser exclusivo por usuário.
emailsArrayLista de emails do usuário.
rolesArrayLista de funções do usuário.
externalIdStringEsse identificador é gerado por um provedor do SCIM. Deve ser exclusivo por usuário.
idStringIdentificador gerado pelo ponto de extremidade do SCIM do GitHub.
activeBoolianoIndica se a identidade está ativa (true) ou deve ser suspensa (false).

Atributos de grupo do SCIM compatíveis

Os pontos de extremidade de Groups desta categoria dão suporte aos atributos a seguir dentro dos parâmetros de uma solicitação.

NomeTipoDescrição
displayNameStringNome de um grupo legível por pessoas.
membersStringLista de membros atribuídos ao grupo no provedor do SCIM
externalIdStringEsse identificador é gerado por um provedor do SCIM. Deve ser exclusivo por usuário.

List provisioned SCIM groups for an enterprise

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Lists provisioned SCIM groups in an enterprise.

You can improve query search time by using the excludedAttributes query parameter with a value of members to exclude members from the response.

Tokens de acesso refinados para "List provisioned SCIM groups for an enterprise"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "List provisioned SCIM groups for an enterprise"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros de consulta
Nome, Tipo, Descrição
filter string

If specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are externalId, id, and displayName. For example, ?filter="externalId eq '9138790-10932-109120392-12321'".

excludedAttributes string

Excludes the specified attribute from being returned in the results. Using this parameter can speed up response time.

startIndex integer

Used for pagination: the starting index of the first result to return when paginating through values.

Padrão: 1

count integer

Used for pagination: the number of results to return per page.

Padrão: 30

Códigos de status de resposta HTTP para "List provisioned SCIM groups for an enterprise"

Código de statusDescrição
200

Success, either groups were found or not found

400

Bad request

401

Authorization failure

403

Permission denied

429

Too many requests

500

Internal server error

Exemplos de código para "List provisioned SCIM groups for an enterprise"

Exemplo de solicitação

get/scim/v2/enterprises/{enterprise}/Groups
curl -L \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups

Success, either groups were found or not found

Status: 200
{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 1, "Resources": [ { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "externalId": "8aa1a0c0-c4c3-4bc0-b4a5-2ef676900159", "id": "927fa2c08dcb4a7fae9e", "displayName": "Engineering", "members": [ { "value": "879db59-3bdf-4490-ad68-ab880a2694745", "$+ref": "https://api.github.localhost/scim/v2/Users/879db59-3bdf-4490-ad68-ab880a2694745", "displayName": "User 1" }, { "value": "0db508eb-91e2-46e4-809c-30dcbda0c685", "$+ref": "https://api.github.localhost/scim/v2/Users/0db508eb-91e2-46e4-809c-30dcbda0c685", "displayName": "User 2" } ], "meta": { "resourceType": "Group", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Groups/927fa2c08dcb4a7fae9e" } } ], "startIndex": 1, "itemsPerPage": 20 }

Provision a SCIM enterprise group

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Creates a SCIM group for an enterprise.

When members are part of the group provisioning payload, they're designated as external group members. Providers are responsible for maintaining a mapping between the externalId and id for each user.

Tokens de acesso refinados para "Provision a SCIM enterprise group"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Provision a SCIM enterprise group"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros do corpo
Nome, Tipo, Descrição
schemas array of strings Obrigatório

The URIs that are used to indicate the namespaces of the SCIM schemas. Supported values are: urn:ietf:params:scim:schemas:core:2.0:Group

externalId string Obrigatório

A unique identifier for the resource as defined by the provisioning client.

displayName string Obrigatório

A human-readable name for a security group.

members array of objects Obrigatório

The group members.

Nome, Tipo, Descrição
value string Obrigatório

The local unique identifier for the member

displayName string Obrigatório

The display name associated with the member

Códigos de status de resposta HTTP para "Provision a SCIM enterprise group"

Código de statusDescrição
201

Group has been created

400

Bad request

401

Authorization failure

403

Permission denied

409

Duplicate record detected

429

Too many requests

500

Internal server error

Exemplos de código para "Provision a SCIM enterprise group"

Exemplo de solicitação

post/scim/v2/enterprises/{enterprise}/Groups
curl -L \ -X POST \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:Group"],"externalId":"8aa1a0c0-c4c3-4bc0-b4a5-2ef676900159","displayName":"Engineering"}'

Group has been created

Status: 201
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": "8aa1a0c0-c4c3-4bc0-b4a5-2ef676900159", "displayName": "Engineering", "members": [ { "value": "879db59-3bdf-4490-ad68-ab880a2694745", "$+ref": "https://api.github.localhost/scim/v2/Users/879db59-3bdf-4490-ad68-ab880a2694745", "displayName": "User 1" }, { "value": "0db508eb-91e2-46e4-809c-30dcbda0c685", "$+ref": "https://api.github.localhost/scim/v2/Users/0db508eb-91e2-46e4-809c-30dcbda0c685", "displayName": "User 2" } ], "meta": { "resourceType": "Group", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Groups/927fa2c08dcb4a7fae9e" } }

Get SCIM provisioning information for an enterprise group

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Gets information about a SCIM group.

Tokens de acesso refinados para "Get SCIM provisioning information for an enterprise group"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Get SCIM provisioning information for an enterprise group"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
scim_group_id string Obrigatório

A unique identifier of the SCIM group.

enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros de consulta
Nome, Tipo, Descrição
excludedAttributes string

Excludes the specified attribute from being returned in the results. Using this parameter can speed up response time.

Códigos de status de resposta HTTP para "Get SCIM provisioning information for an enterprise group"

Código de statusDescrição
200

Success, a group was found

400

Bad request

401

Authorization failure

403

Permission denied

404

Resource not found

429

Too many requests

500

Internal server error

Exemplos de código para "Get SCIM provisioning information for an enterprise group"

Exemplo de solicitação

get/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl -L \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID

Success, a group was found

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": "8aa1a0c0-c4c3-4bc0-b4a5-2ef676900159", "displayName": "Engineering", "members": [ { "value": "879db59-3bdf-4490-ad68-ab880a2694745", "$+ref": "https://api.github.localhost/scim/v2/Users/879db59-3bdf-4490-ad68-ab880a2694745", "displayName": "User 1" }, { "value": "0db508eb-91e2-46e4-809c-30dcbda0c685", "$+ref": "https://api.github.localhost/scim/v2/Users/0db508eb-91e2-46e4-809c-30dcbda0c685", "displayName": "User 2" } ], "meta": { "resourceType": "Group", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Groups/927fa2c08dcb4a7fae9e" } }

Set SCIM information for a provisioned enterprise group

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Replaces an existing provisioned group’s information.

You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the Update an attribute for a SCIM enterprise group endpoint instead.

Tokens de acesso refinados para "Set SCIM information for a provisioned enterprise group"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Set SCIM information for a provisioned enterprise group"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
scim_group_id string Obrigatório

A unique identifier of the SCIM group.

enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros do corpo
Nome, Tipo, Descrição
schemas array of strings Obrigatório

The URIs that are used to indicate the namespaces of the SCIM schemas. Supported values are: urn:ietf:params:scim:schemas:core:2.0:Group

externalId string Obrigatório

A unique identifier for the resource as defined by the provisioning client.

displayName string Obrigatório

A human-readable name for a security group.

members array of objects Obrigatório

The group members.

Nome, Tipo, Descrição
value string Obrigatório

The local unique identifier for the member

displayName string Obrigatório

The display name associated with the member

Códigos de status de resposta HTTP para "Set SCIM information for a provisioned enterprise group"

Código de statusDescrição
200

Group was updated

400

Bad request

401

Authorization failure

403

Permission denied

404

Resource not found

409

Duplicate record detected

429

Too many requests

500

Internal server error

Exemplos de código para "Set SCIM information for a provisioned enterprise group"

Exemplos de solicitação

put/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl -L \ -X PUT \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:Group"],"externalId":"8aa1a0c0-c4c3-4bc0-b4a5-2ef676900159","displayName":"Engineering"}'

Group was updated

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": "8aa1a0c0-c4c3-4bc0-b4a5-2ef676900159", "displayName": "Engineering", "members": [ { "value": "879db59-3bdf-4490-ad68-ab880a2694745", "$+ref": "https://api.github.localhost/scim/v2/Users/879db59-3bdf-4490-ad68-ab880a2694745", "displayName": "User 1" }, { "value": "0db508eb-91e2-46e4-809c-30dcbda0c685", "$+ref": "https://api.github.localhost/scim/v2/Users/0db508eb-91e2-46e4-809c-30dcbda0c685", "displayName": "User 2" } ], "meta": { "resourceType": "Group", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Groups/927fa2c08dcb4a7fae9e" } }

Update an attribute for a SCIM enterprise group

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Update a provisioned group’s individual attributes.

To modify a group's values, you'll need to use a specific Operations JSON format which must include at least one of the following operations: add, remove, or replace. For examples and more information on this SCIM format, consult the SCIM specification. The update function can also be used to add group memberships.

You can submit group memberships individually or in batches for improved efficiency.

Note: Memberships are referenced via a local user id. Ensure users are created before referencing them here.

Tokens de acesso refinados para "Update an attribute for a SCIM enterprise group"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Update an attribute for a SCIM enterprise group"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
scim_group_id string Obrigatório

A unique identifier of the SCIM group.

enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros do corpo
Nome, Tipo, Descrição
Operations array of objects Obrigatório

patch operations list

Nome, Tipo, Descrição
op string Obrigatório

Pode ser um dos: add, replace, remove

path string
value string

Corresponding 'value' of that field specified by 'path'

schemas array of strings Obrigatório

undefinedSupported values are: urn:ietf:params:scim:api:messages:2.0:PatchOp

Códigos de status de resposta HTTP para "Update an attribute for a SCIM enterprise group"

Código de statusDescrição
200

Success, group was updated

204

No Content

400

Bad request

401

Authorization failure

403

Permission denied

404

Resource not found

409

Duplicate record detected

429

Too many requests

500

Internal server error

Exemplos de código para "Update an attribute for a SCIM enterprise group"

Exemplos de solicitação

patch/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl -L \ -X PATCH \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \ -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"replace","path":"displayName","value":"Employees"}]}'

Success, group was updated

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": "8aa1a0c0-c4c3-4bc0-b4a5-2ef676900159", "displayName": "Engineering", "members": [ { "value": "879db59-3bdf-4490-ad68-ab880a2694745", "$+ref": "https://api.github.localhost/scim/v2/Users/879db59-3bdf-4490-ad68-ab880a2694745", "displayName": "User 1" }, { "value": "0db508eb-91e2-46e4-809c-30dcbda0c685", "$+ref": "https://api.github.localhost/scim/v2/Users/0db508eb-91e2-46e4-809c-30dcbda0c685", "displayName": "User 2" } ], "meta": { "resourceType": "Group", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Groups/927fa2c08dcb4a7fae9e" } }

Delete a SCIM group from an enterprise

Note: SCIM provisioning using the REST API is in public beta and subject to change.

Deletes a SCIM group from an enterprise.

Tokens de acesso refinados para "Delete a SCIM group from an enterprise"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Delete a SCIM group from an enterprise"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
scim_group_id string Obrigatório

A unique identifier of the SCIM group.

enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Códigos de status de resposta HTTP para "Delete a SCIM group from an enterprise"

Código de statusDescrição
204

Group was deleted, no content

400

Bad request

401

Authorization failure

403

Permission denied

404

Resource not found

429

Too many requests

500

Internal server error

Exemplos de código para "Delete a SCIM group from an enterprise"

Exemplo de solicitação

delete/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID

Group was deleted, no content

Status: 204

List SCIM provisioned identities for an enterprise

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Lists provisioned SCIM enterprise members.

When you remove a user with a SCIM-provisioned external identity from an enterprise using a patch with active flag to false, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list.

Tokens de acesso refinados para "List SCIM provisioned identities for an enterprise"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "List SCIM provisioned identities for an enterprise"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros de consulta
Nome, Tipo, Descrição
filter string

If specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are userName, externalId, id, and displayName. For example, ?filter="externalId eq '9138790-10932-109120392-12321'".

startIndex integer

Used for pagination: the starting index of the first result to return when paginating through values.

Padrão: 1

count integer

Used for pagination: the number of results to return per page.

Padrão: 30

Códigos de status de resposta HTTP para "List SCIM provisioned identities for an enterprise"

Código de statusDescrição
200

Success, either users were found or not found

400

Bad request

401

Authorization failure

403

Permission denied

429

Too many requests

500

Internal server error

Exemplos de código para "List SCIM provisioned identities for an enterprise"

Exemplo de solicitação

get/scim/v2/enterprises/{enterprise}/Users
curl -L \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users

Success, either users were found or not found

Status: 200
{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 1, "Resources": [ { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "externalId": "E012345", "id": "7fce0092-d52e-4f76-b727-3955bd72c939", "active": true, "userName": "E012345", "name": { "formatted": "Ms. Mona Lisa Octocat", "familyName": "Octocat", "givenName": "Mona", "middleName": "Lisa" }, "displayName": "Mona Lisa", "emails": [ { "value": "mlisa@example.com", "type": "work", "primary": true } ], "roles": [ { "value": "User", "primary": false } ] } ], "startIndex": 1, "itemsPerPage": 20 }

Provision a SCIM enterprise user

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Creates an external identity for a new SCIM enterprise user.

SCIM is responsible for user provisioning, not authentication. The actual user authentication is handled by SAML. However, with SCIM enabled, users must first be provisioned via SCIM before they can sign in through SAML.

Tokens de acesso refinados para "Provision a SCIM enterprise user"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Provision a SCIM enterprise user"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros do corpo
Nome, Tipo, Descrição
schemas array of strings Obrigatório

The URIs that are used to indicate the namespaces of the SCIM schemas. Supported values are: urn:ietf:params:scim:schemas:core:2.0:User

externalId string Obrigatório

A unique identifier for the resource as defined by the provisioning client.

active boolean Obrigatório

Whether the user active in the IdP.

userName string Obrigatório

The username for the user.

name object
Nome, Tipo, Descrição
formatted string

The full name, including all middle names, titles, and suffixes as appropriate, formatted for display.

familyName string Obrigatório

The family name of the user.

givenName string Obrigatório

The given name of the user.

middleName string

The middle name(s) of the user.

displayName string Obrigatório

A human-readable name for the user.

emails array of objects Obrigatório

The emails for the user.

Nome, Tipo, Descrição
value string Obrigatório

The email address.

type string Obrigatório

The type of email address.

primary boolean Obrigatório

Whether this email address is the primary address.

roles array of objects

The roles assigned to the user.

Nome, Tipo, Descrição
display string
type string
value string Obrigatório

The role value representing a user role in GitHub.

Pode ser um dos: user, 27d9891d-2c17-4f45-a262-781a0e55c80a, guest_collaborator, 1ebc4a02-e56c-43a6-92a5-02ee09b90824, enterprise_owner, 981df190-8801-4618-a08a-d91f6206c954, ba4987ab-a1c3-412a-b58c-360fc407cb10, billing_manager, 0e338b8c-cc7f-498a-928d-ea3470d7e7e3, e6be2762-e4ad-4108-b72d-1bbe884a0f91

primary boolean

Is the role a primary role for the user.

Códigos de status de resposta HTTP para "Provision a SCIM enterprise user"

Código de statusDescrição
201

User has been created

400

Bad request

401

Authorization failure

403

Permission denied

409

Duplicate record detected

429

Too many requests

500

Internal server error

Exemplos de código para "Provision a SCIM enterprise user"

Exemplos de solicitação

post/scim/v2/enterprises/{enterprise}/Users
curl -L \ -X POST \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],"externalId":"E012345","active":true,"userName":"E012345","name":{"formatted":"Ms. Mona Lisa Octocat","familyName":"Octocat","givenName":"Mona","middleName":"Lisa"},"displayName":"Mona Lisa","emails":[{"value":"mlisa@example.com","type":"work","primary":true}],"roles":[{"value":"User","primary":false}]}'

User has been created

Status: 201
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "7fce0092-d52e-4f76-b727-3955bd72c939", "externalId": "E012345", "active": true, "userName": "E012345", "name": { "formatted": "Ms. Mona Lisa Octocat", "familyName": "Octocat", "givenName": "Mona", "middleName": "Lisa" }, "displayName": "Mona Lisa", "emails": [ { "value": "mlisa@example.com", "type": "work", "primary": true } ], "roles": [ { "value": "User", "primary": false } ], "meta": { "resourceType": "User", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Users/7fce0092-d52e-4f76-b727-3955bd72c939" } }

Get SCIM provisioning information for an enterprise user

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Gets information about a SCIM user.

Tokens de acesso refinados para "Get SCIM provisioning information for an enterprise user"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Get SCIM provisioning information for an enterprise user"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
scim_user_id string Obrigatório

The unique identifier of the SCIM user.

enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Códigos de status de resposta HTTP para "Get SCIM provisioning information for an enterprise user"

Código de statusDescrição
200

Success, a user was found

400

Bad request

401

Authorization failure

403

Permission denied

404

Resource not found

429

Too many requests

500

Internal server error

Exemplos de código para "Get SCIM provisioning information for an enterprise user"

Exemplo de solicitação

get/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl -L \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID

Success, a user was found

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "7fce0092-d52e-4f76-b727-3955bd72c939", "externalId": "E012345", "active": true, "userName": "E012345", "name": { "formatted": "Ms. Mona Lisa Octocat", "familyName": "Octocat", "givenName": "Mona", "middleName": "Lisa" }, "displayName": "Mona Lisa", "emails": [ { "value": "mlisa@example.com", "type": "work", "primary": true } ], "roles": [ { "value": "User", "primary": false } ], "meta": { "resourceType": "User", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Users/7fce0092-d52e-4f76-b727-3955bd72c939" } }

Set SCIM information for a provisioned enterprise user

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Replaces an existing provisioned user's information.

You must supply complete user information, just as you would when provisioning them initially. Any previously existing data not provided will be deleted. To update only a specific attribute, refer to the Update an attribute for a SCIM user endpoint.

Warning: Setting active: false will suspend a user, and their handle and email will be obfuscated.

Tokens de acesso refinados para "Set SCIM information for a provisioned enterprise user"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Set SCIM information for a provisioned enterprise user"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
scim_user_id string Obrigatório

The unique identifier of the SCIM user.

enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros do corpo
Nome, Tipo, Descrição
schemas array of strings Obrigatório

The URIs that are used to indicate the namespaces of the SCIM schemas. Supported values are: urn:ietf:params:scim:schemas:core:2.0:User

externalId string Obrigatório

A unique identifier for the resource as defined by the provisioning client.

active boolean Obrigatório

Whether the user active in the IdP.

userName string Obrigatório

The username for the user.

name object
Nome, Tipo, Descrição
formatted string

The full name, including all middle names, titles, and suffixes as appropriate, formatted for display.

familyName string Obrigatório

The family name of the user.

givenName string Obrigatório

The given name of the user.

middleName string

The middle name(s) of the user.

displayName string Obrigatório

A human-readable name for the user.

emails array of objects Obrigatório

The emails for the user.

Nome, Tipo, Descrição
value string Obrigatório

The email address.

type string Obrigatório

The type of email address.

primary boolean Obrigatório

Whether this email address is the primary address.

roles array of objects

The roles assigned to the user.

Nome, Tipo, Descrição
display string
type string
value string Obrigatório

The role value representing a user role in GitHub.

Pode ser um dos: user, 27d9891d-2c17-4f45-a262-781a0e55c80a, guest_collaborator, 1ebc4a02-e56c-43a6-92a5-02ee09b90824, enterprise_owner, 981df190-8801-4618-a08a-d91f6206c954, ba4987ab-a1c3-412a-b58c-360fc407cb10, billing_manager, 0e338b8c-cc7f-498a-928d-ea3470d7e7e3, e6be2762-e4ad-4108-b72d-1bbe884a0f91

primary boolean

Is the role a primary role for the user.

Códigos de status de resposta HTTP para "Set SCIM information for a provisioned enterprise user"

Código de statusDescrição
200

User was updated

400

Bad request

401

Authorization failure

403

Permission denied

404

Resource not found

409

Duplicate record detected

429

Too many requests

500

Internal server error

Exemplos de código para "Set SCIM information for a provisioned enterprise user"

Exemplo de solicitação

put/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl -L \ -X PUT \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],"externalId":"E012345","active":true,"userName":"E012345","name":{"formatted":"Ms. Mona Lisa Octocat","familyName":"Octocat","givenName":"Mona","middleName":"Lisa"},"displayName":"Mona Lisa","emails":[{"value":"mlisa@example.com","type":"work","primary":true}],"roles":[{"value":"User","primary":false}]}'

User was updated

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "7fce0092-d52e-4f76-b727-3955bd72c939", "externalId": "E012345", "active": true, "userName": "E012345", "name": { "formatted": "Ms. Mona Lisa Octocat", "familyName": "Octocat", "givenName": "Mona", "middleName": "Lisa" }, "displayName": "Mona Lisa", "emails": [ { "value": "mlisa@example.com", "type": "work", "primary": true } ], "roles": [ { "value": "User", "primary": false } ], "meta": { "resourceType": "User", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Users/7fce0092-d52e-4f76-b727-3955bd72c939" } }

Update an attribute for a SCIM enterprise user

Note: SCIM provisioning for users and groups using the REST API is in public beta and subject to change.

Update a provisioned user's individual attributes.

To modify a user's attributes, you'll need to provide a Operations JSON formatted request that includes at least one of the following actions: add, remove, or replace. For specific examples and more information on the SCIM operations format, please refer to the SCIM specification.

Note: Complex SCIM path selectors that include filters are not supported. For example, a path selector defined as "path": "emails[type eq \"work\"]" will be ineffective.

Warning: Setting active: false will suspend a user, and their handle and email will be obfuscated.

{
  "Operations":[{
    "op":"replace",
    "value":{
      "active":false
    }
  }]
}

Tokens de acesso refinados para "Update an attribute for a SCIM enterprise user"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token não requer permissões.

Parâmetros para "Update an attribute for a SCIM enterprise user"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
scim_user_id string Obrigatório

The unique identifier of the SCIM user.

enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Parâmetros do corpo
Nome, Tipo, Descrição
Operations array of objects Obrigatório

patch operations list

Nome, Tipo, Descrição
op string Obrigatório

Pode ser um dos: add, replace, remove

path string
value string

Corresponding 'value' of that field specified by 'path'

schemas array of strings Obrigatório

undefinedSupported values are: urn:ietf:params:scim:api:messages:2.0:PatchOp

Códigos de status de resposta HTTP para "Update an attribute for a SCIM enterprise user"

Código de statusDescrição
200

Success, user was updated

400

Bad request

401

Authorization failure

403

Permission denied

404

Resource not found

409

Duplicate record detected

429

Too many requests

500

Internal server error

Exemplos de código para "Update an attribute for a SCIM enterprise user"

Exemplos de solicitação

patch/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl -L \ -X PATCH \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID \ -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"replace","path":"emails[type eq '\''work'\''].value","value":"updatedEmail@microsoft.com"},{"op":"replace","path":"name.familyName","value":"updatedFamilyName"}]}'

Success, user was updated

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "7fce0092-d52e-4f76-b727-3955bd72c939", "externalId": "E012345", "active": true, "userName": "E012345", "name": { "formatted": "Ms. Mona Lisa Octocat", "familyName": "Octocat", "givenName": "Mona", "middleName": "Lisa" }, "displayName": "Mona Lisa", "emails": [ { "value": "mlisa@example.com", "type": "work", "primary": true } ], "roles": [ { "value": "User", "primary": false } ], "meta": { "resourceType": "User", "created": "2012-03-27T19:59:26.000Z", "lastModified": "2018-03-27T19:59:26.000Z", "location": "https://api.github.localhost/scim/v2/Users/7fce0092-d52e-4f76-b727-3955bd72c939" } }

Delete a SCIM user from an enterprise

Note: SCIM provisioning using the REST API is in public beta and subject to change.

Suspends a SCIM user permanently from an enterprise. This action will: remove all the user's data, anonymize their login, email, and display name, erase all external identity SCIM attributes, delete the user's emails, avatar, PATs, SSH keys, OAuth authorizations, GPG keys, and SAML mappings. This action is irreversible.

Tokens de acesso refinados para "Delete a SCIM user from an enterprise"

Esse ponto de extremidade funciona com os seguintes tipos de token:

O token deve ter os seguintes conjuntos de permissões:

  • enterprise_administration:write

Parâmetros para "Delete a SCIM user from an enterprise"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
scim_user_id string Obrigatório

The unique identifier of the SCIM user.

enterprise string Obrigatório

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Códigos de status de resposta HTTP para "Delete a SCIM user from an enterprise"

Código de statusDescrição
204

User was deleted, no content

400

Bad request

401

Authorization failure

403

Permission denied

404

Resource not found

429

Too many requests

500

Internal server error

Exemplos de código para "Delete a SCIM user from an enterprise"

Exemplo de solicitação

delete/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID

User was deleted, no content

Status: 204