SCIM
Usa la API REST para automatizar la creación de usuarios y las pertenencias a equipos con SCIM.
Acerca de SCIM
Nota: La compatibilidad con el aprovisionamiento de usuarios con el esquema SCIM público de GitHub está en versión beta pública y sujeta a cambios. GitHub recomienda probar el aprovisionamiento en un entorno aislado de los datos de producción en tu IdP y GitHub.com.
Para crear, administrar y desactivar cuentas de usuario para los miembros de tu empresa en GitHub.com, el IdP debe implementar SCIM para la comunicación con GitHub. SCIM es una especificación abierta para la administración de identidades de usuario entre sistemas. Distintos IdP proporcionan experiencias diferentes para la configuración del aprovisionamiento de SCIM. Si no usa un IdP de asociado con una integración existente, puede realizar la integración mediante los siguientes puntos de conexión de API. Para obtener más información, vea «Aprovisionamiento de usuarios con SCIM mediante la API de REST».
URL base
Para administrar los usuarios y grupos de la empresa mediante SCIM, usa la siguiente dirección URL base para la comunicación con los puntos de conexión de esta categoría.
https://api.github.com/scim/v2/enterprises/{enterprise}/
Autenticación
Para autenticar las solicitudes en la API, la persona que configura SCIM en el IdP debe usar un personal access token (classic) con ámbito admin:enterprise
, que el IdP debe proporcionar en el encabezado Authorization
de la solicitud. Para más información sobre personal access tokens (classic), consulta "Administración de tokens de acceso personal".
GitHub recomienda autenticarse como usuario de configuración para la empresa. Otras cuentas de usuario se crean a través de SCIM, por lo que la autenticación como un usuario diferente podría dar lugar a consecuencias no deseadas, como bloquearse de la empresa. Las solicitudes de escritura a estas API son posibles a través de nuestras aplicaciones IdP publicadas o a través de la versión beta del acceso directo de API a nuestros puntos de conexión SCIM. Si otro propietario de la empresa necesita leer información de la API, usa un personal access token (classic) con el ámbito admin:enterprise
para realizar solicitudes GET
en tu implementación de SCIM actual. Para obtener más información, vea «Configurar el aprovisionamiento de SCIM para los Usuarios Administrados Empresariales».
Mapeo de los datos de SAML y de SCIM
Después de que un cuenta de usuario administrada se autentique correctamente para acceder a la empresa mediante el inicio de sesión único de SAML, GitHub Enterprise Cloud vincula al usuario a una identidad aprovisionada de SCIM. Para vincular correctamente las identidades, el proveedor de identidades de SAML y la integración de SCIM deben usar identificadores únicos coincidentes.
Es necesario que la siguiente notificación SAML y el atributo SCIM coincidan correctamente con el usuario con la identidad aprovisionada por SCIM en GitHub. Los proveedores de identidades pueden diferir en el campo utilizado para identificar de forma única a un usuario.
Azure AD para SAML
Notificaciones SAML | Atributo SCIM coincidente |
---|---|
http://schemas.microsoft.com/identity/claims/objectidentifier | externalId |
Otro proveedor de identidades para SAML
Notificaciones SAML | Atributo SCIM coincidente |
---|---|
NameID | userName |
Atributos de usuario de SCIM compatibles
Los puntos de conexión Users
de esta categoría admiten los atributos siguientes en los parámetros de una solicitud.
Nombre | Type | Description |
---|---|---|
displayName | String | Nombre legible para el usuario. |
name.formatted | String | El nombre completo del usuario, incluido el segundo nombre, los títulos y los sufijos, con formato para mostrar. |
name.givenName | String | El nombre del usuario. |
name.familyName | String | Los apellidos del usuario. |
userName | String | Nombre de usuario del usuario, que genera el proveedor de SCIM. Se somete a la normalización antes de su uso. Debe ser único por usuario. |
emails | Matriz | Lista de correos electrónicos del usuario. |
roles | Array | Lista de roles del usuario. |
externalId | String | Este identificador lo genera un proveedor de SCIM. Debe ser único por usuario. |
id | String | Identificador que genera el punto de conexión de SCIM de GitHub. |
active | Booleano | Indica si la identidad está activa (true ) o debe suspenderse (false ). |
Atributos de grupo de SCIM admitidos
Los puntos de conexión Groups
de esta categoría admiten los atributos siguientes en los parámetros de una solicitud.
Nombre | Type | Description |
---|---|---|
displayName | String | Nombre legible para el grupo. |
members | String | Lista de miembros asignados al grupo en el proveedor SCIM |
externalId | String | Este identificador lo genera un proveedor de SCIM. Debe ser único por usuario. |
List provisioned SCIM groups for an enterprise
Note: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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.
Parámetros para "List provisioned SCIM groups for an enterprise"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
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. Valor predeterminado: |
count integer Used for pagination: the number of results to return per page. Valor predeterminado: |
Códigos de estado de respuesta HTTP para "List provisioned SCIM groups for an enterprise"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "List provisioned SCIM groups for an enterprise"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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.
Parámetros para "Provision a SCIM enterprise group"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción | |||
---|---|---|---|
schemas array of strings RequeridoThe URIs that are used to indicate the namespaces of the SCIM schemas.
Supported values are: | |||
externalId string RequeridoA unique identifier for the resource as defined by the provisioning client. | |||
displayName string RequeridoA human-readable name for a security group. | |||
members array of objects RequeridoThe group members. | |||
Properties of |
Nombre, Tipo, Descripción |
---|
value string RequeridoThe local unique identifier for the member |
displayName string RequeridoThe display name associated with the member |
Códigos de estado de respuesta HTTP para "Provision a SCIM enterprise group"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Provision a SCIM enterprise group"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are subject to change.
Gets information about a SCIM group.
Parámetros para "Get SCIM provisioning information for an enterprise group"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
scim_group_id string RequeridoA unique identifier of the SCIM group. |
Nombre, Tipo, Descripción |
---|
excludedAttributes string Excludes the specified attribute from being returned in the results. Using this parameter can speed up response time. |
Códigos de estado de respuesta HTTP para "Get SCIM provisioning information for an enterprise group"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Get SCIM provisioning information for an enterprise group"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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.
Parámetros para "Set SCIM information for a provisioned enterprise group"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
scim_group_id string RequeridoA unique identifier of the SCIM group. |
Nombre, Tipo, Descripción | |||
---|---|---|---|
schemas array of strings RequeridoThe URIs that are used to indicate the namespaces of the SCIM schemas.
Supported values are: | |||
externalId string RequeridoA unique identifier for the resource as defined by the provisioning client. | |||
displayName string RequeridoA human-readable name for a security group. | |||
members array of objects RequeridoThe group members. | |||
Properties of |
Nombre, Tipo, Descripción |
---|
value string RequeridoThe local unique identifier for the member |
displayName string RequeridoThe display name associated with the member |
Códigos de estado de respuesta HTTP para "Set SCIM information for a provisioned enterprise group"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Set SCIM information for a provisioned enterprise group"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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.
Parámetros para "Update an attribute for a SCIM enterprise group"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
scim_group_id string RequeridoA unique identifier of the SCIM group. |
Nombre, Tipo, Descripción | ||||
---|---|---|---|---|
Operations array of objects Requeridopatch operations list | ||||
Properties of |
Nombre, Tipo, Descripción |
---|
op string RequeridoPuede ser uno de los siguientes: |
path string |
value string Corresponding 'value' of that field specified by 'path' |
schemas
array of strings RequeridoundefinedSupported values are: urn:ietf:params:scim:api:messages:2.0:PatchOp
Códigos de estado de respuesta HTTP para "Update an attribute for a SCIM enterprise group"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Update an attribute for a SCIM enterprise group"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are subject to change.
Deletes a SCIM group from an enterprise.
Parámetros para "Delete a SCIM group from an enterprise"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
scim_group_id string RequeridoA unique identifier of the SCIM group. |
Códigos de estado de respuesta HTTP para "Delete a SCIM group from an enterprise"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Delete a SCIM group from an enterprise"
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/Groups/SCIM_GROUP_ID
Group was deleted, no content
Status: 204
List SCIM provisioned identities for an enterprise
Note: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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.
Parámetros para "List SCIM provisioned identities for an enterprise"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
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. Valor predeterminado: |
count integer Used for pagination: the number of results to return per page. Valor predeterminado: |
Códigos de estado de respuesta HTTP para "List SCIM provisioned identities for an enterprise"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "List SCIM provisioned identities for an enterprise"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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.
Parámetros para "Provision a SCIM enterprise user"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción | |||||
---|---|---|---|---|---|
schemas array of strings RequeridoThe URIs that are used to indicate the namespaces of the SCIM schemas.
Supported values are: | |||||
externalId string RequeridoA unique identifier for the resource as defined by the provisioning client. | |||||
active boolean RequeridoWhether the user active in the IdP. | |||||
userName string RequeridoThe username for the user. | |||||
name object | |||||
Properties of |
Nombre, Tipo, Descripción |
---|
formatted string The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. |
familyName string RequeridoThe family name of the user. |
givenName string RequeridoThe given name of the user. |
middleName string The middle name(s) of the user. |
displayName
string RequeridoA human-readable name for the user.
emails
array of objects RequeridoThe emails for the user.
Properties of emails
Nombre, Tipo, Descripción |
---|
value string RequeridoThe email address. |
type string RequeridoThe type of email address. |
primary boolean RequeridoWhether this email address is the primary address. |
roles
array of objects The roles assigned to the user.
Properties of roles
Nombre, Tipo, Descripción |
---|
display string |
type string |
value string RequeridoThe role value representing a user role in GitHub. Puede ser uno de los siguientes: |
primary boolean Is the role a primary role for the user. |
Códigos de estado de respuesta HTTP para "Provision a SCIM enterprise user"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Provision a SCIM enterprise user"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are subject to change.
Gets information about a SCIM user.
Parámetros para "Get SCIM provisioning information for an enterprise user"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
scim_user_id string RequeridoThe unique identifier of the SCIM user. |
Códigos de estado de respuesta HTTP para "Get SCIM provisioning information for an enterprise user"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Get SCIM provisioning information for an enterprise user"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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.
Parámetros para "Set SCIM information for a provisioned enterprise user"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
scim_user_id string RequeridoThe unique identifier of the SCIM user. |
Nombre, Tipo, Descripción | |||||
---|---|---|---|---|---|
schemas array of strings RequeridoThe URIs that are used to indicate the namespaces of the SCIM schemas.
Supported values are: | |||||
externalId string RequeridoA unique identifier for the resource as defined by the provisioning client. | |||||
active boolean RequeridoWhether the user active in the IdP. | |||||
userName string RequeridoThe username for the user. | |||||
name object | |||||
Properties of |
Nombre, Tipo, Descripción |
---|
formatted string The full name, including all middle names, titles, and suffixes as appropriate, formatted for display. |
familyName string RequeridoThe family name of the user. |
givenName string RequeridoThe given name of the user. |
middleName string The middle name(s) of the user. |
displayName
string RequeridoA human-readable name for the user.
emails
array of objects RequeridoThe emails for the user.
Properties of emails
Nombre, Tipo, Descripción |
---|
value string RequeridoThe email address. |
type string RequeridoThe type of email address. |
primary boolean RequeridoWhether this email address is the primary address. |
roles
array of objects The roles assigned to the user.
Properties of roles
Nombre, Tipo, Descripción |
---|
display string |
type string |
value string RequeridoThe role value representing a user role in GitHub. Puede ser uno de los siguientes: |
primary boolean Is the role a primary role for the user. |
Códigos de estado de respuesta HTTP para "Set SCIM information for a provisioned enterprise user"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Set SCIM information for a provisioned enterprise user"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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
}
}]
}
Parámetros para "Update an attribute for a SCIM enterprise user"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
scim_user_id string RequeridoThe unique identifier of the SCIM user. |
Nombre, Tipo, Descripción | ||||
---|---|---|---|---|
Operations array of objects Requeridopatch operations list | ||||
Properties of |
Nombre, Tipo, Descripción |
---|
op string RequeridoPuede ser uno de los siguientes: |
path string |
value string Corresponding 'value' of that field specified by 'path' |
schemas
array of strings RequeridoundefinedSupported values are: urn:ietf:params:scim:api:messages:2.0:PatchOp
Códigos de estado de respuesta HTTP para "Update an attribute for a SCIM enterprise user"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Update an attribute for a SCIM enterprise user"
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/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: The SCIM API endpoints for GitHub Enterprise Cloud accounts with enterprise managed users are currently only accessible through published identity provider applications. Public access to SCIM API endpoints are in private beta and are 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.
Parámetros para "Delete a SCIM user from an enterprise"
Nombre, Tipo, Descripción |
---|
accept string Setting to |
Nombre, Tipo, Descripción |
---|
scim_user_id string RequeridoThe unique identifier of the SCIM user. |
Códigos de estado de respuesta HTTP para "Delete a SCIM user from an enterprise"
status code | Descripción |
---|---|
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 |
Ejemplos de código para "Delete a SCIM user from an enterprise"
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/Users/SCIM_USER_ID
User was deleted, no content
Status: 204