Skip to main content

We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the Actions REST API page.

SCIM

List provisioned SCIM groups for an enterprise

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

Parámetros de consulta
Nombre, Tipo, Descripción
startIndexinteger

Used for pagination: the index of the first result to return.

countinteger

Used for pagination: the number of results to return.

filterstring

filter results

excludedAttributesstring

attributes to exclude

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

get/scim/v2/enterprises/{enterprise}/Groups
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 2, "itemsPerPage": 2, "startIndex": 1, "Resources": [ { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "display": "hubot@example.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:00", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }, { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "5e75bbbb-aa1a-11ea-8644-75ff655cdddd", "externalId": null, "displayName": "octo-docs-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T16:28:01.000+10:00", "lastModified": "2020-06-09T16:28:01.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/5e75bbbb-aa1a-11ea-8644-75ff655cdddd" } } ] }

Provision a SCIM enterprise group and invite users

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

displayNamestringRequerido

The name of the SCIM group. This must match the GitHub organization that the group maps to.

membersarray of objects
Nombre, Tipo, Descripción
valuestringRequerido

The SCIM user ID for a user.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
201

Created

Ejemplos de código

post/scim/v2/enterprises/{enterprise}/Groups
curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:Group"],"displayName":"octo-org","members":[{"value":"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc"},{"value":"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5"}]}'

Response

Status: 201
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "display": "hubot@example.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:0", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }

Get SCIM provisioning information for an enterprise group

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

scim_group_idstringRequerido

Identifier generated by the GitHub SCIM endpoint.

Parámetros de consulta
Nombre, Tipo, Descripción
excludedAttributesstring

Attributes to exclude.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

get/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "display": "hubot@example.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:0", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }

Set SCIM information for a provisioned enterprise group

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in 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

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

scim_group_idstringRequerido

Identifier generated by the GitHub SCIM endpoint.

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

displayNamestringRequerido

The name of the SCIM group. This must match the GitHub organization that the group maps to.

membersarray of objects
Nombre, Tipo, Descripción
valuestringRequerido

The SCIM user ID for a user.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

put/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:Group"],"displayName":"octo-org","members":[{"value":"92b58aaa-a1d6-11ea-8227-b9ce9e023ccc"},{"value":"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5"}]}'

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" }, { "value": "aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5", "display": "hubot@example.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:0", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }

Update an attribute for a SCIM enterprise group

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the SCIM specification.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

scim_group_idstringRequerido

Identifier generated by the GitHub SCIM endpoint.

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

Operationsarray of objectsRequerido

Array of SCIM operations.

Nombre, Tipo, Descripción
opstringRequerido

Puede ser una de las siguientes: add, Add, remove, Remove, replace, Replace

pathstring
value

Can be any value - string, number, array or object.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

patch/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ 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":"remove","path":"members","value":[{"value":"aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5"}]}]}'

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:Group" ], "id": "abcd27f8-a9aa-11ea-8221-f59b2be9cccc", "externalId": null, "displayName": "octo-org", "members": [ { "value": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "$ref": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "display": "octocat@github.com" } ], "meta": { "resourceType": "Group", "created": "2020-06-09T03:10:17.000+10:00", "lastModified": "2020-06-09T03:10:17.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Groups/abcd27f8-a9aa-11ea-8221-f59b2be9cccc" } }

Delete a SCIM group from an enterprise

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

scim_group_idstringRequerido

Identifier generated by the GitHub SCIM endpoint.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
204

No Content

Ejemplos de código

delete/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID

Response

Status: 204

List SCIM provisioned identities for an enterprise

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Retrieves a paginated list of all provisioned enterprise members, including pending invitations.

When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:

  • When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future.
  • When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).
  • When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.

The returned list of external identities can include an entry for a null user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:

  1. The user is granted access by the IdP and is not a member of the GitHub enterprise.

  2. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account.

  3. After successfully authenticating with the SAML SSO IdP, the null external identity entry is created and the user is prompted to sign in to their GitHub account:

    • If the user signs in, their GitHub account is linked to this entry.
    • If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity null entry remains in place.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

Parámetros de consulta
Nombre, Tipo, Descripción
startIndexinteger

Used for pagination: the index of the first result to return.

countinteger

Used for pagination: the number of results to return.

filterstring

filter results

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

get/scim/v2/enterprises/{enterprise}/Users
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 2, "itemsPerPage": 2, "startIndex": 1, "Resources": [ { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "externalId": "00dowz5dr9oSfDFRA0h7", "userName": "octocat@github.com", "name": { "givenName": "Mona", "familyName": "Octocat" }, "emails": [ { "value": "octocat@github.com", "primary": true, "type": "work" } ], "groups": [ { "value": "468dd3fa-a1d6-11ea-9031-15a1f0d7811d" } ], "active": true, "meta": { "resourceType": "User", "created": "2020-05-30T04:02:34.000+10:00", "lastModified": "2020-05-30T04:05:04.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc" } }, { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "e18b8c34-a6b2-11ea-9d70-54abbd1c8fd5", "externalId": "sdfoiausdofiua", "userName": "hubot@example.com", "name": { "givenName": "hu", "familyName": "bot" }, "emails": [ { "value": "hubot@example.com", "type": "work", "primary": true } ], "groups": [], "active": true, "meta": { "resourceType": "User", "created": "2020-06-05T08:29:40.000+10:00", "lastModified": "2020-06-05T08:30:19.000+10:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/e18b8c34-a6b2-11ea-9d70-54abbd1c8fd5" } } ] }

Provision and invite a SCIM enterprise user

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Provision enterprise membership for a user, and send organization invitation emails to the email address.

You can optionally include the groups a user will be invited to join. If you do not provide a list of groups, the user is provisioned for the enterprise, but no organization invitation emails will be sent.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

userNamestringRequerido

The username for the user.

nameobjectRequerido
Nombre, Tipo, Descripción
givenNamestringRequerido

The first name of the user.

familyNamestringRequerido

The last name of the user.

emailsarray of objectsRequerido

List of user emails.

Nombre, Tipo, Descripción
valuestringRequerido

The email address.

typestringRequerido

The type of email address.

primarybooleanRequerido

Whether this email address is the primary address.

groupsarray of objects

List of SCIM group IDs the user is a member of.

Nombre, Tipo, Descripción
valuestring

Códigos de estado de respuesta HTTP

Código de estadoDescripción
201

Created

Ejemplos de código

post/scim/v2/enterprises/{enterprise}/Users
curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],"userName":"mona.octocat@okta.example.com","name":{"familyName":"Octocat","givenName":"Mona"},"emails":[{"value":"mona.octocat@okta.example.com","type":"work","primary":true}],"groups":[{"value":"468dd3fa-a1d6-11ea-9031-15a1f0d7811d"}]}'

Response

Status: 201
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "externalId": "00dowz5dr9oSfDFRA0h7", "userName": "mona.octocat@okta.example.com", "name": { "givenName": "Mona", "familyName": "Octocat" }, "emails": [ { "value": "mona.octocat@okta.example.com", "type": "work", "primary": true } ], "groups": [ { "value": "468dd3fa-a1d6-11ea-9031-15a1f0d7811d" } ], "active": true, "meta": { "resourceType": "User", "created": "2017-03-09T16:11:13-05:00", "lastModified": "2017-03-09T16:11:13-05:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc" } }

Get SCIM provisioning information for an enterprise user

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

scim_user_idstringRequerido

The unique identifier of the SCIM user.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

get/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "externalId": "00dowz5dr9oSfDFRA0h7", "userName": "mona.octocat@okta.example.com", "name": { "givenName": "Mona", "familyName": "Octocat" }, "emails": [ { "value": "mona.octocat@okta.example.com", "type": "work", "primary": true } ], "groups": [ { "value": "468dd3fa-a1d6-11ea-9031-15a1f0d7811d" } ], "active": true, "meta": { "resourceType": "User", "created": "2017-03-09T16:11:13-05:00", "lastModified": "2017-03-09T16:11:13-05:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc" } }

Set SCIM information for a provisioned enterprise user

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

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

You must at least provide the required values for the user: userName, name, and emails.

Warning: Setting active: false removes the user from the enterprise, deletes the external identity, and deletes the associated {scim_user_id}.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

scim_user_idstringRequerido

The unique identifier of the SCIM user.

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

userNamestringRequerido

The username for the user.

nameobjectRequerido
Nombre, Tipo, Descripción
givenNamestringRequerido

The first name of the user.

familyNamestringRequerido

The last name of the user.

emailsarray of objectsRequerido

List of user emails.

Nombre, Tipo, Descripción
valuestringRequerido

The email address.

typestringRequerido

The type of email address.

primarybooleanRequerido

Whether this email address is the primary address.

groupsarray of objects

List of SCIM group IDs the user is a member of.

Nombre, Tipo, Descripción
valuestring

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

put/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID \ -d '{"schemas":["urn:ietf:params:scim:schemas:core:2.0:User"],"userName":"mona.octocat@okta.example.com","name":{"familyName":"Octocat","givenName":"Mona"},"emails":[{"value":"mona.octocat@okta.example.com","type":"work","primary":true}],"groups":[{"value":"468dd3fa-a1d6-11ea-9031-15a1f0d7811d"}]}'

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "externalId": "00dowz5dr9oSfDFRA0h7", "userName": "mona.octocat@okta.example.com", "name": { "givenName": "Mona", "familyName": "Octocat" }, "emails": [ { "value": "mona.octocat@okta.example.com", "type": "work", "primary": true } ], "groups": [ { "value": "468dd3fa-a1d6-11ea-9031-15a1f0d7811d" } ], "active": true, "meta": { "resourceType": "User", "created": "2017-03-09T16:11:13-05:00", "lastModified": "2017-03-09T16:11:13-05:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc" } }

Update an attribute for a SCIM enterprise user

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the SCIM specification.

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

Warning: If you set active:false using the replace operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated :scim_user_id.

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

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

scim_user_idstringRequerido

The unique identifier of the SCIM user.

Parámetros de cuerpo
Nombre, Tipo, Descripción
schemasarray of stringsRequerido

The SCIM schema URIs.

Operationsarray of objectsRequerido

Array of SCIM operations.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
200

OK

Ejemplos de código

patch/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ 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":"add","path":"emails","value":[{"value":"monalisa@octocat.github.com","type":"home"}]},{"op":"replace","path":"name.givenName","value":"Monalisa"}]}'

Response

Status: 200
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User" ], "id": "92b58aaa-a1d6-11ea-8227-b9ce9e023ccc", "externalId": "00dowz5dr9oSfDFRA0h7", "userName": "mona.octocat@okta.example.com", "name": { "givenName": "Monalisa", "familyName": "Octocat" }, "emails": [ { "value": "mona.octocat@okta.example.com", "type": "work", "primary": true }, { "value": "monalisa@octocat.github.com", "type": "home" } ], "groups": [ { "value": "468dd3fa-a1d6-11ea-9031-15a1f0d7811d" } ], "active": true, "meta": { "resourceType": "User", "created": "2017-03-09T16:11:13-05:00", "lastModified": "2017-03-09T16:11:13-05:00", "location": "https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc" } }

Delete a SCIM user from an enterprise

Funciona con GitHub Apps

Note: The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Parámetros

Encabezados
Nombre, Tipo, Descripción
acceptstring

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

Parámetros de ruta
Nombre, Tipo, Descripción
enterprisestringRequerido

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

scim_user_idstringRequerido

The unique identifier of the SCIM user.

Códigos de estado de respuesta HTTP

Código de estadoDescripción
204

No Content

Ejemplos de código

delete/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token <TOKEN>" \ https://api.github.com/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID

Response

Status: 204