REST-API-Endpunkte für SCIM
Nutze die REST-API, um die Erstellung von Benutzern und Teammitgliedschaften mit SCIM zu automatisieren.
Hinweise:
- Mit diesen Endpunkten können Sie den Zugriff auf Ihr Unternehmen über GitHub Enterprise Cloud mithilfe von SCIM bereitstellen. Der Vorgang ist nur für die Verwendung mit Enterprise Managed Users verfügbar. Wenn du Enterprise Managed Users nicht verwendest und den Zugriff auf deine Organisationen mit SCIM bereitstellen möchtest, siehe „REST-API-Endpunkte für SCIM“.
- GitHub empfiehlt, die Bereitstellung in einer Umgebung zu testen, die von den Produktionsdaten auf Ihrem IdP und GitHub isoliert ist.
About SCIM (Informationen zu SCIM)
Zum Erstellen, Verwalten und Deaktivieren von Benutzerkonten für Ihre Unternehmensmitglieder auf GitHub mussmuss Ihr IdP SCIM für die Kommunikation mit GitHub implementieren. SCIM ist eine offene Spezifikation für die Verwaltung von Benutzeridentitäten zwischen Systemen. Verschiedene IdPs bieten unterschiedliche Erfahrungen für die Konfiguration der SCIM-Bereitstellung. Wenn Sie keinen Partner-IdP mit einer vorhandenen Integration verwenden, können Sie diese mithilfe der folgenden API-Endpunkte integrieren. Weitere Informationen findest du unter Bereitstellen von Benutzern und Gruppen mit SCIM mithilfe der REST-API.
Basis-URL
Zur Verwaltung der Benutzer und Gruppen deines Unternehmens mithilfe von SCIM verwendest du die folgende Basis-URL, um mit den Endpunkten in dieser Kategorie zu kommunizieren.
https://api.github.com/scim/v2/enterprises/{enterprise}/
Authentifizierung
Zur Authentifizierung von API-Anforderungen ist für die SCIM-Konfiguration beim Identitätsanbieter personal access token (classic) mit dem Bereich scim:enterprise
erforderlich, die der Identitätsanbieter im Authorization
-Header der Anforderung bereitstellen muss. Weitere Informationen zu personal access tokens (classic) findest du unter Verwalten deiner persönlichen Zugriffstoken.
GitHub empfiehlt die Authentifizierung als Setupbenutzer für das Unternehmen. Über SCIM werden auch andere Benutzerkontentypen erstellt, sodass die Authentifizierung als anderer Benutzer zu unbeabsichtigten Folgen führen könnte, z. B. Sperrung des Zugangs zu deinem Unternehmen. Schreibanforderungen an diese APIs sind über unsere veröffentlichten IdP-Anwendungen oder über den direkten API-Zugriff auf unsere SCIM-Endpunkte möglich. Wenn ein anderer Unternehmensnutzer Informationen aus der API lesen muss, ist personal access token (classic) mit dem Reservierungsumfang admin:enterprise
für GET
-Anforderungen an die aktuelle SCIM-Implementierung zu verwenden. Weitere Informationen findest du unter Konfigurieren der SCIM-Bereitstellung für vom Unternehmen verwaltete Benutzer.
Zuordnen von SAML- und SCIM-Daten
Nachdem ein verwaltetes Benutzerkonto erfolgreich authentifiziert wurde, um mithilfe von SAML SSO auf dein Unternehmen zuzugreifen, verknüpft GitHub Enterprise Cloud den Benutzer mit einer bereitgestellten SCIM-Identität. Um die Identitäten erfolgreich zu verknüpfen, müssen der SAML-Identitätsanbieter und die SCIM-Integration übereinstimmende eindeutige Bezeichner verwenden.
GitHub benötigt den folgenden SAML-Anspruch und das SCIM-Attribut, um den Benutzer erfolgreich mit der von SCIM bereitgestellten Identität abzugleichen. In dem zur eindeutigen Benutzeridentifizierung verwendeten Feld können die Angaben zum Identitätsanbieter abweichen.
Microsoft Entra ID für SAML
Um Entra-ID (zuvor als Azure AD bezeichnet) für SAML zu verwenden, muss das folgende SAML-Anspruchs- und SCIM-Attribut übereinstimmen.
SAML-Anspruch | Abgleich des SCIM-Attributs |
---|---|
http://schemas.microsoft.com/identity/claims/objectidentifier | externalId |
Andere IdPs für SAML
Um andere IDPs für SAML zu verwenden, muss das folgende SAML-Anspruchs- und SCIM-Attribut übereinstimmen.
SAML-Anspruch | Abgleich des SCIM-Attributs |
---|---|
NameID | userName |
Unterstützte SCIM-Benutzerattribute
Users
-Endpunkte in dieser Kategorie unterstützen innerhalb eines Anforderungsparameters die folgenden Attribute.
Name | Typ | Beschreibung |
---|---|---|
displayName | String | Für Menschen lesbarer Benutzername. |
name.formatted | String | Der vollständige und für die Anzeige formatierte Name des Benutzers/der Benutzerin, einschließlich aller zweiter Vornamen, Titel und Namenszusätze. |
name.givenName | String | Der Vorname des Benutzers. |
name.familyName | String | Der Nachname des Benutzers. |
userName | String | Der vom SCIM-Anbieter generierte Benutzername des Benutzers/der Benutzerin. Wird vor der Verwendung einer Normalisierung unterzogen. Muss pro Benutzer eindeutig sein. |
emails | Array | Liste der Benutzer-E-Mails. |
roles | Array | Liste der Benutzerrollen. |
externalId | String | Dieser Bezeichner wird von einem SCIM-Anbieter generiert. Muss pro Benutzer eindeutig sein. |
id | String | Bezeichner, der vom GitHub-SCIM-Endpunkt generiert wurde |
active | Boolean | Gibt an, ob die Identität aktiv ist (true ) oder angehalten werden soll (false ). |
Unterstützte SCIM-Gruppenattribute
Groups
-Endpunkte in dieser Kategorie unterstützen innerhalb eines Anforderungsparameters die folgenden Attribute.
Name | Typ | Beschreibung |
---|---|---|
displayName | String | Für Menschen lesbarer Gruppenname. |
members | String | Liste der Mitglieder, die der Gruppe im SCIM-Anbieter zugewiesen sind |
externalId | String | Dieser Bezeichner wird von einem SCIM-Anbieter generiert. Muss pro Benutzer eindeutig sein. |
List provisioned SCIM groups for an enterprise
Note
SCIM provisioning for users and groups using the REST API is in public preview 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.
Differenzierte Zugriffstoken für "List provisioned SCIM groups for an enterprise"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „List provisioned SCIM groups for an enterprise“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG |
---|
filter string If specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are |
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. Standard: |
count integer Used for pagination: the number of results to return per page. Standard: |
HTTP-Antwortstatuscodes für „List provisioned SCIM groups for an enterprise“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „List provisioned SCIM groups for an enterprise“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
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 preview 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.
Differenzierte Zugriffstoken für "Provision a SCIM enterprise group"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Provision a SCIM enterprise group“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG | |||
---|---|---|---|
schemas array of strings ErforderlichThe URIs that are used to indicate the namespaces of the SCIM schemas.
Supported values are: | |||
externalId string ErforderlichA unique identifier for the resource as defined by the provisioning client. | |||
displayName string ErforderlichA human-readable name for a security group. | |||
members array of objects ErforderlichThe group members. | |||
Properties of |
Name, type, BESCHREIBUNG |
---|
value string ErforderlichThe local unique identifier for the member |
displayName string ErforderlichThe display name associated with the member |
HTTP-Antwortstatuscodes für „Provision a SCIM enterprise group“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Provision a SCIM enterprise group“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
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 preview and subject to change.
Gets information about a SCIM group.
Differenzierte Zugriffstoken für "Get SCIM provisioning information for an enterprise group"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Get SCIM provisioning information for an enterprise group“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
scim_group_id string ErforderlichA unique identifier of the SCIM group. |
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG |
---|
excludedAttributes string Excludes the specified attribute from being returned in the results. Using this parameter can speed up response time. |
HTTP-Antwortstatuscodes für „Get SCIM provisioning information for an enterprise group“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Get SCIM provisioning information for an enterprise group“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
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 preview 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.
Differenzierte Zugriffstoken für "Set SCIM information for a provisioned enterprise group"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Set SCIM information for a provisioned enterprise group“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
scim_group_id string ErforderlichA unique identifier of the SCIM group. |
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG | |||
---|---|---|---|
schemas array of strings ErforderlichThe URIs that are used to indicate the namespaces of the SCIM schemas.
Supported values are: | |||
externalId string ErforderlichA unique identifier for the resource as defined by the provisioning client. | |||
displayName string ErforderlichA human-readable name for a security group. | |||
members array of objects ErforderlichThe group members. | |||
Properties of |
Name, type, BESCHREIBUNG |
---|
value string ErforderlichThe local unique identifier for the member |
displayName string ErforderlichThe display name associated with the member |
HTTP-Antwortstatuscodes für „Set SCIM information for a provisioned enterprise group“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Set SCIM information for a provisioned enterprise group“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Beispiele für Anforderungen
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 preview 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.
Differenzierte Zugriffstoken für "Update an attribute for a SCIM enterprise group"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Update an attribute for a SCIM enterprise group“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
scim_group_id string ErforderlichA unique identifier of the SCIM group. |
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG | ||||
---|---|---|---|---|
Operations array of objects Erforderlichpatch operations list | ||||
Properties of |
Name, type, BESCHREIBUNG |
---|
op string ErforderlichKann eine der Folgenden sein: |
path string |
value string Corresponding 'value' of that field specified by 'path' |
schemas
array of strings ErforderlichundefinedSupported values are: urn:ietf:params:scim:api:messages:2.0:PatchOp
HTTP-Antwortstatuscodes für „Update an attribute for a SCIM enterprise group“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Update an attribute for a SCIM enterprise group“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Beispiele für Anforderungen
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 preview and subject to change.
Deletes a SCIM group from an enterprise.
Differenzierte Zugriffstoken für "Delete a SCIM group from an enterprise"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Delete a SCIM group from an enterprise“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
scim_group_id string ErforderlichA unique identifier of the SCIM group. |
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
HTTP-Antwortstatuscodes für „Delete a SCIM group from an enterprise“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Delete a SCIM group from an enterprise“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
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 preview 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.
Differenzierte Zugriffstoken für "List SCIM provisioned identities for an enterprise"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „List SCIM provisioned identities for an enterprise“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG |
---|
filter string If specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are |
startIndex integer Used for pagination: the starting index of the first result to return when paginating through values. Standard: |
count integer Used for pagination: the number of results to return per page. Standard: |
HTTP-Antwortstatuscodes für „List SCIM provisioned identities for an enterprise“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „List SCIM provisioned identities for an enterprise“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
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 preview 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.
Differenzierte Zugriffstoken für "Provision a SCIM enterprise user"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Provision a SCIM enterprise user“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG | |||||
---|---|---|---|---|---|
schemas array of strings ErforderlichThe URIs that are used to indicate the namespaces of the SCIM schemas.
Supported values are: | |||||
externalId string ErforderlichA unique identifier for the resource as defined by the provisioning client. | |||||
active boolean ErforderlichWhether the user active in the IdP. | |||||
userName string ErforderlichThe username for the user. | |||||
name object | |||||
Properties of |
Name, type, BESCHREIBUNG |
---|
formatted string The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. |
familyName string ErforderlichThe family name of the user. |
givenName string ErforderlichThe given name of the user. |
middleName string The middle name(s) of the user. |
displayName
string ErforderlichA human-readable name for the user.
emails
array of objects ErforderlichThe emails for the user.
Properties of emails
Name, type, BESCHREIBUNG |
---|
value string ErforderlichThe email address. |
type string ErforderlichThe type of email address. |
primary boolean ErforderlichWhether this email address is the primary address. |
roles
array of objects The roles assigned to the user.
Properties of roles
Name, type, BESCHREIBUNG |
---|
display string |
type string |
value string ErforderlichThe role value representing a user role in GitHub. Kann eine der Folgenden sein: |
primary boolean Is the role a primary role for the user. |
HTTP-Antwortstatuscodes für „Provision a SCIM enterprise user“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Provision a SCIM enterprise user“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Beispiele für Anforderungen
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 preview and subject to change.
Gets information about a SCIM user.
Differenzierte Zugriffstoken für "Get SCIM provisioning information for an enterprise user"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Get SCIM provisioning information for an enterprise user“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
scim_user_id string ErforderlichThe unique identifier of the SCIM user. |
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
HTTP-Antwortstatuscodes für „Get SCIM provisioning information for an enterprise user“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Get SCIM provisioning information for an enterprise user“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
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 preview 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.
Differenzierte Zugriffstoken für "Set SCIM information for a provisioned enterprise user"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Set SCIM information for a provisioned enterprise user“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
scim_user_id string ErforderlichThe unique identifier of the SCIM user. |
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG | |||||
---|---|---|---|---|---|
schemas array of strings ErforderlichThe URIs that are used to indicate the namespaces of the SCIM schemas.
Supported values are: | |||||
externalId string ErforderlichA unique identifier for the resource as defined by the provisioning client. | |||||
active boolean ErforderlichWhether the user active in the IdP. | |||||
userName string ErforderlichThe username for the user. | |||||
name object | |||||
Properties of |
Name, type, BESCHREIBUNG |
---|
formatted string The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. |
familyName string ErforderlichThe family name of the user. |
givenName string ErforderlichThe given name of the user. |
middleName string The middle name(s) of the user. |
displayName
string ErforderlichA human-readable name for the user.
emails
array of objects ErforderlichThe emails for the user.
Properties of emails
Name, type, BESCHREIBUNG |
---|
value string ErforderlichThe email address. |
type string ErforderlichThe type of email address. |
primary boolean ErforderlichWhether this email address is the primary address. |
roles
array of objects The roles assigned to the user.
Properties of roles
Name, type, BESCHREIBUNG |
---|
display string |
type string |
value string ErforderlichThe role value representing a user role in GitHub. Kann eine der Folgenden sein: |
primary boolean Is the role a primary role for the user. |
HTTP-Antwortstatuscodes für „Set SCIM information for a provisioned enterprise user“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Set SCIM information for a provisioned enterprise user“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
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 preview 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
}
}]
}
Differenzierte Zugriffstoken für "Update an attribute for a SCIM enterprise user"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Update an attribute for a SCIM enterprise user“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
scim_user_id string ErforderlichThe unique identifier of the SCIM user. |
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Name, type, BESCHREIBUNG | ||||
---|---|---|---|---|
Operations array of objects Erforderlichpatch operations list | ||||
Properties of |
Name, type, BESCHREIBUNG |
---|
op string ErforderlichKann eine der Folgenden sein: |
path string |
value string Corresponding 'value' of that field specified by 'path' |
schemas
array of strings ErforderlichundefinedSupported values are: urn:ietf:params:scim:api:messages:2.0:PatchOp
HTTP-Antwortstatuscodes für „Update an attribute for a SCIM enterprise user“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Update an attribute for a SCIM enterprise user“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Beispiele für Anforderungen
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 preview 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.
Differenzierte Zugriffstoken für "Delete a SCIM user from an enterprise"
Dieser Endpunkt funktioniert mit den folgenden differenzierten Tokentypen.:
- GitHub-App-Benutzerzugriffstoken
- Zugriffstoken für GitHub App-Installation
- Differenzierte persönliche Zugriffstoken
Das differenzierte Token muss einen der folgenden Berechtigungssätze aufweisen.:
- "Enterprise administration" business permissions (write)
Parameter für „Delete a SCIM user from an enterprise“
Name, type, BESCHREIBUNG |
---|
accept string Setting to |
Name, type, BESCHREIBUNG |
---|
scim_user_id string ErforderlichThe unique identifier of the SCIM user. |
enterprise string ErforderlichThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
HTTP-Antwortstatuscodes für „Delete a SCIM user from an enterprise“
Statuscode | BESCHREIBUNG |
---|---|
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 |
Codebeispiele für „Delete a SCIM user from an enterprise“
If you access GitHub at GHE.com, replace api.github.com
with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com
.
Anforderungsbeispiel
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