Skip to main content
L’API REST est maintenant versionnée. Pour plus d’informations, consultez « À propos des versions de l’API ».

Points de terminaison d’API REST pour SCIM

Utilisez l’API REST pour automatiser la création d’utilisateurs et les appartenances aux équipes avec SCIM.

Remarques :

  • Ces points de terminaison vous permettent d'approvisionner des comptes d'utilisateurs pour votre entreprise sur GitHub Enterprise Cloud à l'aide de SCIM. L’opération est disponible uniquement pour une utilisation avec Enterprise Managed Users. Si vous n’utilisez pas Enterprise Managed Users et que vous souhaitez provisionner l’accès à vos organisations à l’aide de SCIM, consultez « Points de terminaison d’API REST pour SCIM ».
  • La prise en charge de l'approvisionnement des utilisateurs avec le schéma SCIM public de GitHub est en phase bêta publique et sujette à modification.
  • GitHub vous recommande de tester l’approvisionnement dans un environnement isolé des données de production sur votre fournisseur d’identité et GitHub.com.

À propos de SCIM

Pour créer, gérer et désactiver des comptes d’utilisateurs pour les membres de votre entreprise sur GitHub.com, votre fournisseur d’identité doit implémenter SCIM pour la communication avec GitHub. SCIM est une spécification ouverte pour la gestion des identités utilisateur entre différents systèmes. Chaque IdP aura une expérience de configuration différente pour l’approvisionnement SCIM. Si vous n’utilisez pas de fournisseur d’identité de partenaire avec une intégration existante, vous pouvez l’intégrer à l’aide des points de terminaison d’API suivants. Pour plus d’informations, consultez « Approvisionnement des utilisateurs et des groupes avec SCIM à l'aide de l'API REST ».

URL de base

Pour gérer les utilisateurs et les groupes de votre entreprise à l’aide de SCIM, utilisez l’URL de base suivante pour communiquer avec les points de terminaison de cette catégorie.

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

Authentification

Pour authentifier les demandes adressées à l’API, la personne qui configure SCIM sur l’IdP doit utiliser un personal access token (classic) avec l’étendue admin:enterprise, que l’IdP doit fournir dans l’en-tête Authorization de la demande. Pour plus d’informations sur les personal access tokens (classic), consultez « Gestion de vos jetons d'accès personnels ».

GitHub recommande l’authentification en tant qu’utilisateur d’installation pour l’entreprise. D’autres comptes d’utilisateur sont créés via SCIM, si bien que l’authentification en tant qu’utilisateur différent peut entraîner des conséquences inattendues, telles que le verrouillage de votre entreprise. Les demandes d’écriture adressées à ces API sont possibles via nos applications IdP publiées ou via la version bêta de l’accès direct API à nos points de terminaison SCIM. Si un autre propriétaire d’entreprise souhaite lire des informations à partir de l’API, utilisez un personal access token (classic) avec admin:enterprise l’étendue pour faire des demandes GET sur l’implémentation de votre SCIM actuelle. Pour plus d’informations, consultez « Configuration du provisionnement SCIM pour Enterprise Managed Users ».

Mappage des données SAML et SCIM

Une fois qu’une compte d’utilisateur managé s’authentifie correctement pour accéder à votre entreprise à l’aide du protocole SAML SSO, GitHub Enterprise Cloud lie l’utilisateur à une identité provisionnée SCIM. Pour lier correctement les identités, le fournisseur d’identité SAML et l’intégration SCIM doivent utiliser des identificateurs uniques correspondants.

GitHub a besoin de la revendication SAML et de l’attribut SCIM suivants pour qu’ils correspondent correctement à l’utilisateur avec l’identité approvisionnée par SCIM. Les fournisseurs d’identité peuvent différer dans le champ utilisé pour identifier un utilisateur de manière unique.

Microsoft Entra ID pour SAML

Pour utiliser Entra ID (précédemment appelé Azure AD) pour SAML, les revendications SAML et l’attribut SCIM suivants doivent correspondre.

Revendication SAMLAttribut SCIM correspondant
http://schemas.microsoft.com/identity/claims/objectidentifierexternalId

Autres IdP pour SAML

Pour utiliser d’autres IdP pour SAML, les revendications SAML et l’attribut SCIM suivants doivent correspondre.

Revendication SAMLAttribut SCIM correspondant
NameIDuserName

Attributs utilisateur SCIM pris en charge

Les points de terminaison Users dans cette catégorie prennent en charge les attributs suivants dans les paramètres d’une demande.

NomTypeDescription
displayNameStringNom lisible pour un utilisateur.
name.formattedStringNom complet de l’utilisateur, y compris tous les prénoms, titres et suffixes, mis en forme pour l’affichage.
name.givenNameStringPrénom de l’utilisateur.
name.familyNameStringNom de l’utilisateur.
userNameChaîneNom d’utilisateur de l’utilisateur, généré par le fournisseur SCIM. Subit la normalisation avant d’être utilisé. Doit être unique par utilisateur.
emailsTableauListe des e-mails de l’utilisateur.
rolesArrayListe des rôles de l’utilisateur.
externalIdChaîneCet identificateur est généré par un fournisseur SCIM. Doit être unique par utilisateur.
idChaîneIdentificateur généré par le point de terminaison SCIM de GitHub.
activeBooleanIndique si l’identité est active (true) ou doit être suspendue (false).

Attributs de groupe SCIM pris en charge

Les points de terminaison Groups dans cette catégorie prennent en charge les attributs suivants dans les paramètres d’une demande.

NomTypeDescription
displayNameChaîneNom lisible par l’homme pour un groupe.
membersChaîneListe des membres affectés au groupe dans le fournisseur SCIM
externalIdChaîneCet identificateur est généré par un fournisseur SCIM. Doit être unique par utilisateur.

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.

Jetons d’accès affinés pour « List provisioned SCIM groups for an enterprise »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « List provisioned SCIM groups for an enterprise »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
enterprise string Obligatoire

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

Paramètres de requête
Nom, Type, Description
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.

Default: 1

count integer

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

Default: 30

Codes d’état de la réponse HTTP pour « List provisioned SCIM groups for an enterprise »

Code d’étatDescription
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

Exemples de code pour « List provisioned SCIM groups for an enterprise »

Exemple de requête

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.

Jetons d’accès affinés pour « Provision a SCIM enterprise group »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Provision a SCIM enterprise group »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
enterprise string Obligatoire

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

Paramètres du corps
Nom, Type, Description
schemas array of strings Obligatoire

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 Obligatoire

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

displayName string Obligatoire

A human-readable name for a security group.

members array of objects Obligatoire

The group members.

Nom, Type, Description
value string Obligatoire

The local unique identifier for the member

displayName string Obligatoire

The display name associated with the member

Codes d’état de la réponse HTTP pour « Provision a SCIM enterprise group »

Code d’étatDescription
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

Exemples de code pour « Provision a SCIM enterprise group »

Exemple de requête

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.

Jetons d’accès affinés pour « Get SCIM provisioning information for an enterprise group »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Get SCIM provisioning information for an enterprise group »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
scim_group_id string Obligatoire

A unique identifier of the SCIM group.

enterprise string Obligatoire

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

Paramètres de requête
Nom, Type, Description
excludedAttributes string

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

Codes d’état de la réponse HTTP pour « Get SCIM provisioning information for an enterprise group »

Code d’étatDescription
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

Exemples de code pour « Get SCIM provisioning information for an enterprise group »

Exemple de requête

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.

Jetons d’accès affinés pour « Set SCIM information for a provisioned enterprise group »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Set SCIM information for a provisioned enterprise group »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
scim_group_id string Obligatoire

A unique identifier of the SCIM group.

enterprise string Obligatoire

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

Paramètres du corps
Nom, Type, Description
schemas array of strings Obligatoire

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 Obligatoire

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

displayName string Obligatoire

A human-readable name for a security group.

members array of objects Obligatoire

The group members.

Nom, Type, Description
value string Obligatoire

The local unique identifier for the member

displayName string Obligatoire

The display name associated with the member

Codes d’état de la réponse HTTP pour « Set SCIM information for a provisioned enterprise group »

Code d’étatDescription
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

Exemples de code pour « Set SCIM information for a provisioned enterprise group »

Exemples de requête

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.

Jetons d’accès affinés pour « Update an attribute for a SCIM enterprise group »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Update an attribute for a SCIM enterprise group »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
scim_group_id string Obligatoire

A unique identifier of the SCIM group.

enterprise string Obligatoire

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

Paramètres du corps
Nom, Type, Description
Operations array of objects Obligatoire

patch operations list

Nom, Type, Description
op string Obligatoire

Peut être: add, replace, remove

path string
value string

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

schemas array of strings Obligatoire

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

Codes d’état de la réponse HTTP pour « Update an attribute for a SCIM enterprise group »

Code d’étatDescription
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

Exemples de code pour « Update an attribute for a SCIM enterprise group »

Exemples de requête

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.

Jetons d’accès affinés pour « Delete a SCIM group from an enterprise »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Delete a SCIM group from an enterprise »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
scim_group_id string Obligatoire

A unique identifier of the SCIM group.

enterprise string Obligatoire

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

Codes d’état de la réponse HTTP pour « Delete a SCIM group from an enterprise »

Code d’étatDescription
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

Exemples de code pour « Delete a SCIM group from an enterprise »

Exemple de requête

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.

Jetons d’accès affinés pour « List SCIM provisioned identities for an enterprise »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « List SCIM provisioned identities for an enterprise »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
enterprise string Obligatoire

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

Paramètres de requête
Nom, Type, Description
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.

Default: 1

count integer

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

Default: 30

Codes d’état de la réponse HTTP pour « List SCIM provisioned identities for an enterprise »

Code d’étatDescription
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

Exemples de code pour « List SCIM provisioned identities for an enterprise »

Exemple de requête

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.

Jetons d’accès affinés pour « Provision a SCIM enterprise user »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Provision a SCIM enterprise user »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
enterprise string Obligatoire

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

Paramètres du corps
Nom, Type, Description
schemas array of strings Obligatoire

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 Obligatoire

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

active boolean Obligatoire

Whether the user active in the IdP.

userName string Obligatoire

The username for the user.

name object
Nom, Type, Description
formatted string

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

familyName string Obligatoire

The family name of the user.

givenName string Obligatoire

The given name of the user.

middleName string

The middle name(s) of the user.

displayName string Obligatoire

A human-readable name for the user.

emails array of objects Obligatoire

The emails for the user.

Nom, Type, Description
value string Obligatoire

The email address.

type string Obligatoire

The type of email address.

primary boolean Obligatoire

Whether this email address is the primary address.

roles array of objects

The roles assigned to the user.

Nom, Type, Description
display string
type string
value string Obligatoire

The role value representing a user role in GitHub.

Peut être: 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.

Codes d’état de la réponse HTTP pour « Provision a SCIM enterprise user »

Code d’étatDescription
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

Exemples de code pour « Provision a SCIM enterprise user »

Exemples de requête

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.

Jetons d’accès affinés pour « Get SCIM provisioning information for an enterprise user »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Get SCIM provisioning information for an enterprise user »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
scim_user_id string Obligatoire

The unique identifier of the SCIM user.

enterprise string Obligatoire

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

Codes d’état de la réponse HTTP pour « Get SCIM provisioning information for an enterprise user »

Code d’étatDescription
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

Exemples de code pour « Get SCIM provisioning information for an enterprise user »

Exemple de requête

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.

Jetons d’accès affinés pour « Set SCIM information for a provisioned enterprise user »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Set SCIM information for a provisioned enterprise user »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
scim_user_id string Obligatoire

The unique identifier of the SCIM user.

enterprise string Obligatoire

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

Paramètres du corps
Nom, Type, Description
schemas array of strings Obligatoire

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 Obligatoire

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

active boolean Obligatoire

Whether the user active in the IdP.

userName string Obligatoire

The username for the user.

name object
Nom, Type, Description
formatted string

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

familyName string Obligatoire

The family name of the user.

givenName string Obligatoire

The given name of the user.

middleName string

The middle name(s) of the user.

displayName string Obligatoire

A human-readable name for the user.

emails array of objects Obligatoire

The emails for the user.

Nom, Type, Description
value string Obligatoire

The email address.

type string Obligatoire

The type of email address.

primary boolean Obligatoire

Whether this email address is the primary address.

roles array of objects

The roles assigned to the user.

Nom, Type, Description
display string
type string
value string Obligatoire

The role value representing a user role in GitHub.

Peut être: 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.

Codes d’état de la réponse HTTP pour « Set SCIM information for a provisioned enterprise user »

Code d’étatDescription
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

Exemples de code pour « Set SCIM information for a provisioned enterprise user »

Exemple de requête

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
    }
  }]
}

Jetons d’accès affinés pour « Update an attribute for a SCIM enterprise user »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton ne nécessite aucune autorisation.

Paramètres pour « Update an attribute for a SCIM enterprise user »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
scim_user_id string Obligatoire

The unique identifier of the SCIM user.

enterprise string Obligatoire

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

Paramètres du corps
Nom, Type, Description
Operations array of objects Obligatoire

patch operations list

Nom, Type, Description
op string Obligatoire

Peut être: add, replace, remove

path string
value string

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

schemas array of strings Obligatoire

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

Codes d’état de la réponse HTTP pour « Update an attribute for a SCIM enterprise user »

Code d’étatDescription
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

Exemples de code pour « Update an attribute for a SCIM enterprise user »

Exemples de requête

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.

Jetons d’accès affinés pour « Delete a SCIM user from an enterprise »

Ce point de terminaison fonctionne avec les types de jetons suivants:

Le jeton doit avoir l’ensemble d’autorisations suivant:

  • enterprise_administration:write

Paramètres pour « Delete a SCIM user from an enterprise »

En-têtes
Nom, Type, Description
accept string

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

Paramètres de chemin d’accès
Nom, Type, Description
scim_user_id string Obligatoire

The unique identifier of the SCIM user.

enterprise string Obligatoire

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

Codes d’état de la réponse HTTP pour « Delete a SCIM user from an enterprise »

Code d’étatDescription
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

Exemples de code pour « Delete a SCIM user from an enterprise »

Exemple de requête

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