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: token <TOKEN>" \ https://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: token <TOKEN>" \ https://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: token <TOKEN>" \ https://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: token <TOKEN>" \ https://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: token <TOKEN>" \ https://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: token <TOKEN>" \ https://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/Groups/SCIM_GROUP_ID

Response

Status: 204