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

Works with GitHub Apps

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

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

Query parameters
Name, Type, Description
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

HTTP response status codes

Status codeDescription
200

OK

Code samples

get/scim/v2/enterprises/{enterprise}/Groups
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with 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.

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

Body parameters
Name, Type, Description
schemasarray of stringsRequired

The SCIM schema URIs.

displayNamestringRequired

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

membersarray of objects
Name, Type, Description
valuestringRequired

The SCIM user ID for a user.

HTTP response status codes

Status codeDescription
201

Created

Code samples

post/scim/v2/enterprises/{enterprise}/Groups
curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with GitHub Apps

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

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

scim_group_idstringRequired

Identifier generated by the GitHub SCIM endpoint.

Query parameters
Name, Type, Description
excludedAttributesstring

Attributes to exclude.

HTTP response status codes

Status codeDescription
200

OK

Code samples

get/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with 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.

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

scim_group_idstringRequired

Identifier generated by the GitHub SCIM endpoint.

Body parameters
Name, Type, Description
schemasarray of stringsRequired

The SCIM schema URIs.

displayNamestringRequired

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

membersarray of objects
Name, Type, Description
valuestringRequired

The SCIM user ID for a user.

HTTP response status codes

Status codeDescription
200

OK

Code samples

put/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with 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.

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

scim_group_idstringRequired

Identifier generated by the GitHub SCIM endpoint.

Body parameters
Name, Type, Description
schemasarray of stringsRequired

The SCIM schema URIs.

Operationsarray of objectsRequired

Array of SCIM operations.

Name, Type, Description
opstringRequired

Can be one of: add, Add, remove, Remove, replace, Replace

pathstring
value

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

HTTP response status codes

Status codeDescription
200

OK

Code samples

patch/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with GitHub Apps

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

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

scim_group_idstringRequired

Identifier generated by the GitHub SCIM endpoint.

HTTP response status codes

Status codeDescription
204

No Content

Code samples

delete/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID

Response

Status: 204

List SCIM provisioned identities for an enterprise

Works with 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 Enterprise Server. 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 Enterprise Server account after completing SSO:

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

  2. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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 Enterprise Server account:

    • If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity null entry remains in place.

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

Query parameters
Name, Type, Description
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

HTTP response status codes

Status codeDescription
200

OK

Code samples

get/scim/v2/enterprises/{enterprise}/Users
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with 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.

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

Body parameters
Name, Type, Description
schemasarray of stringsRequired

The SCIM schema URIs.

userNamestringRequired

The username for the user.

nameobjectRequired
Name, Type, Description
givenNamestringRequired

The first name of the user.

familyNamestringRequired

The last name of the user.

emailsarray of objectsRequired

List of user emails.

Name, Type, Description
valuestringRequired

The email address.

typestringRequired

The type of email address.

primarybooleanRequired

Whether this email address is the primary address.

groupsarray of objects

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

Name, Type, Description
valuestring

HTTP response status codes

Status codeDescription
201

Created

Code samples

post/scim/v2/enterprises/{enterprise}/Users
curl \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with GitHub Apps

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

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

scim_user_idstringRequired

The unique identifier of the SCIM user.

HTTP response status codes

Status codeDescription
200

OK

Code samples

get/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with 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}.

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

scim_user_idstringRequired

The unique identifier of the SCIM user.

Body parameters
Name, Type, Description
schemasarray of stringsRequired

The SCIM schema URIs.

userNamestringRequired

The username for the user.

nameobjectRequired
Name, Type, Description
givenNamestringRequired

The first name of the user.

familyNamestringRequired

The last name of the user.

emailsarray of objectsRequired

List of user emails.

Name, Type, Description
valuestringRequired

The email address.

typestringRequired

The type of email address.

primarybooleanRequired

Whether this email address is the primary address.

groupsarray of objects

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

Name, Type, Description
valuestring

HTTP response status codes

Status codeDescription
200

OK

Code samples

put/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

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

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

scim_user_idstringRequired

The unique identifier of the SCIM user.

Body parameters
Name, Type, Description
schemasarray of stringsRequired

The SCIM schema URIs.

Operationsarray of objectsRequired

Array of SCIM operations.

HTTP response status codes

Status codeDescription
200

OK

Code samples

patch/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/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

Works with GitHub Apps

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

Parameters

Headers
Name, Type, Description
acceptstring

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

Path parameters
Name, Type, Description
enterprisestringRequired

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

scim_user_idstringRequired

The unique identifier of the SCIM user.

HTTP response status codes

Status codeDescription
204

No Content

Code samples

delete/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Users/SCIM_USER_ID

Response

Status: 204