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
Use a API REST para automatizar a criação de usuários e as associações de equipe com o SCIM.
Sobre o SCIM
Observação: o SCIM do GitHub Enterprise Server está em versão beta e sujeito a alterações no momento. Para obter acesso ao beta, entre em contato com o gerente de conta no Equipe de vendas do GitHub. Forneça comentários na discussão da Comunidade do GitHub.
Aviso: a versão beta é exclusivamente para testes e comentários e não conta com suporte. O GitHub recomenda fazer testes com uma instância de preparo. Para obter mais informações, confira "Configurar uma instância de preparo".
O GitHub Enterprise Server fornece pontos de extremidade para uso pelos IdPs (provedores de identidade) habilitados para SCIM. Uma integração no IdP pode usar a API REST para provisionar, gerenciar ou desprovisionar automaticamente contas de usuário em uma instância do GitHub Enterprise Server que usa o SSO (logon único) do SAML para autenticação. Para obter mais informações sobre o SSO de SAML, confira "Sobre o SAML para IAM empresarial".
Esses pontos de extremidade são baseados no SCIM 2.0. Para obter mais informações, confira as especificações.
URLs raiz
Um IdP pode usar a URL raiz a seguir para se comunicar com os pontos de extremidade desta categoria em uma instância do GitHub Enterprise Server.
http(s)://HOSTNAME/api/v3/scim/v2/
Os pontos de extremidade desta categoria diferenciam maiúsculas de minúsculas. Por exemplo, a primeira letra no ponto de extremidade Users
precisa ser maiúscula.
GET /scim/v2/Users/{scim_user_id}
Autenticação
A integração do SCIM no IdP executa ações em nome de um proprietário corporativo na instância do GitHub Enterprise Server. Para obter mais informações, confira "Funções em uma empresa".
Para autenticar as solicitações da API, a pessoa que configura o SCIM no IdP precisa usar um personal access token com o escopo admin:enterprise
, que o IdP precisa fornecer no cabeçalho da solicitação Authorization
. Para obter mais informações sobre personal access tokens, confira "Como criar um personal access token".
Observação: os proprietários corporativos precisam gerar e usar um personal access token para a autenticação de solicitações aos pontos de extremidade desta categoria. os chamadores de aplicativo do GitHub.
Mapear dados do SAML e SCIM
A instância do GitHub Enterprise Server vincula cada usuário que se autentica com êxito com o SSO do SAML a uma identidade do SCIM. Para vincular as identidades com êxito, o IdP do SAML e a integração ao SCIM precisam usar os de valores NameID
do SAML e de userName
do SCIM correspondentes para cada usuário.
Atributos de usuário do SCIM com suporte
Os pontos de extremidade de User
desta categoria dão suporte aos atributos a seguir dentro dos parâmetros de uma solicitação.
Nome | Tipo | Descrição |
---|---|---|
displayName | String | Nome de usuário legível por pessoas. |
name.formatted | String | O nome completo do usuário, incluindo todos os nomes do meio, títulos e sufixos, formatados para exibição. |
name.givenName | String | Primeiro nome do usuário. |
name.familyName | String | Sobrenome do usuário. |
userName | String | O nome de usuário do usuário, gerado pelo IdP. Passa por normalização antes de ser usado. |
emails | Array | Lista de emails do usuário. |
roles | Array | Lista de funções do usuário. |
externalId | String | Esse identificador é gerado por um provedor IdP. Você pode encontrar a externalId de um usuário no IdP ou usando o ponto de extremidade Listar identidades provisionadas do SCIM e a filtragem de outros atributos conhecidos, como o nome de usuário ou o endereço de email de um usuário na instância do GitHub Enterprise Server. |
id | String | Identificador gerado pelo ponto de extremidade do SCIM da instância. |
active | Boolean | Indica se a identidade está ativa (true ) ou deve ser suspensa (false ). |
List provisioned SCIM groups for an enterprise
Note: The SCIM API endpoints for enterprise accounts are currently 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.
Parameters for "List provisioned SCIM groups for an enterprise"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Query parameters |
Name, Type, Description |
filter stringIf specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are |
excludedAttributes stringExcludes the specified attribute from being returned in the results. Using this parameter can speed up response time. |
startIndex integerUsed for pagination: the starting index of the first result to return when paginating through values. Default: |
count integerUsed for pagination: the number of results to return per page. Default: |
HTTP response status codes for "List provisioned SCIM groups for an enterprise"
Status code | Description |
---|---|
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 |
Code samples for "List provisioned SCIM groups for an enterprise"
curl -L \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Creates a SCIM group for an enterprise.
If members are included as part of the group provisioning payload, they will be created as external group members. It is up to a provider to store a mapping between the externalId
and id
of each user.
Parameters for "Provision a SCIM enterprise group"
Headers | ||||||
---|---|---|---|---|---|---|
Name, Type, Description | ||||||
accept stringSetting to | ||||||
Body parameters | ||||||
Name, Type, Description | ||||||
schemas array of stringsRequiredThe URIs that are used to indicate the namespaces of the SCIM schemas. | ||||||
externalId stringRequiredA unique identifier for the resource as defined by the provisioning client. | ||||||
displayName stringRequiredA human-readable name for a security group. | ||||||
members array of objectsRequiredThe group members. | ||||||
Properties of |
Name, Type, Description |
---|
value stringRequiredThe local unique identifier for the member |
displayName stringRequiredThe display name associated with the member |
HTTP response status codes for "Provision a SCIM enterprise group"
Status code | Description |
---|---|
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 |
Code samples for "Provision a SCIM enterprise group"
curl -L \
-X POST \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Gets information about a SCIM group.
Parameters for "Get SCIM provisioning information for an enterprise group"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Path parameters |
Name, Type, Description |
scim_group_id stringRequiredA unique identifier of the SCIM group. |
Query parameters |
Name, Type, Description |
excludedAttributes stringExcludes the specified attribute from being returned in the results. Using this parameter can speed up response time. |
HTTP response status codes for "Get SCIM provisioning information for an enterprise group"
Status code | Description |
---|---|
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 |
Code samples for "Get SCIM provisioning information for an enterprise group"
curl -L \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently 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.
Parameters for "Set SCIM information for a provisioned enterprise group"
Headers | ||||||
---|---|---|---|---|---|---|
Name, Type, Description | ||||||
accept stringSetting to | ||||||
Path parameters | ||||||
Name, Type, Description | ||||||
scim_group_id stringRequiredA unique identifier of the SCIM group. | ||||||
Body parameters | ||||||
Name, Type, Description | ||||||
schemas array of stringsRequiredThe URIs that are used to indicate the namespaces of the SCIM schemas. | ||||||
externalId stringRequiredA unique identifier for the resource as defined by the provisioning client. | ||||||
displayName stringRequiredA human-readable name for a security group. | ||||||
members array of objectsRequiredThe group members. | ||||||
Properties of |
Name, Type, Description |
---|
value stringRequiredThe local unique identifier for the member |
displayName stringRequiredThe display name associated with the member |
HTTP response status codes for "Set SCIM information for a provisioned enterprise group"
Status code | Description |
---|---|
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 |
Code samples for "Set SCIM information for a provisioned enterprise group"
curl -L \
-X PUT \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Update 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. Update can also be used to add group memberships.
Group memberships can be sent one at a time or in batches for faster performance. Note: The memberships are referenced through a local user id
, and the user will need to be created before they are referenced here.
Parameters for "Update an attribute for a SCIM enterprise group"
Headers | |||||||
---|---|---|---|---|---|---|---|
Name, Type, Description | |||||||
accept stringSetting to | |||||||
Path parameters | |||||||
Name, Type, Description | |||||||
scim_group_id stringRequiredA unique identifier of the SCIM group. | |||||||
Body parameters | |||||||
Name, Type, Description | |||||||
Operations array of objectsRequiredpatch operations list | |||||||
Properties of |
Name, Type, Description |
---|
op stringRequiredCan be one of: |
path string |
value stringCorresponding 'value' of that field specified by 'path' |
schemas
array of stringsRequiredHTTP response status codes for "Update an attribute for a SCIM enterprise group"
Status code | Description |
---|---|
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 |
Code samples for "Update an attribute for a SCIM enterprise group"
curl -L \
-X PATCH \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Deletes a SCIM group from an enterprise.
Parameters for "Delete a SCIM group from an enterprise"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Path parameters |
Name, Type, Description |
scim_group_id stringRequiredA unique identifier of the SCIM group. |
HTTP response status codes for "Delete a SCIM group from an enterprise"
Status code | Description |
---|---|
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 |
Code samples for "Delete a SCIM group from an enterprise"
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Lists provisioned SCIM enterprise members.
When a user with a SCIM-provisioned external identity is removed from an enterprise through a patch
with active
flag set to false
, the account's metadata is preserved to allow the user to re-join the enterprise in the future. However, the user's account will be suspended and the user will not be able to sign-in. In order to permanently suspend the users account with no ability to re-join the enterprise in the future, use the delete
request. Users that were not permanently deleted will be visible in the returned results.
You can improve query search time by using the excludedAttributes
query parameter with a value of groups
to exclude groups from the response.
Parameters for "List SCIM provisioned identities for an enterprise"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Query parameters |
Name, Type, Description |
filter stringIf specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are |
excludedAttributes stringExcludes the specified attribute from being returned in the results. Using this parameter can speed up response time. |
startIndex integerUsed for pagination: the starting index of the first result to return when paginating through values. Default: |
count integerUsed for pagination: the number of results to return per page. Default: |
HTTP response status codes for "List SCIM provisioned identities for an enterprise"
Status code | Description |
---|---|
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 |
Code samples for "List SCIM provisioned identities for an enterprise"
curl -L \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Creates an external identity for a new SCIM enterprise user.
SCIM does not authenticate users, it only provisions them. The authentication of users is done by SAML. However, when SCIM is enabled, all users need to be provisioned through SCIM before a user can sign in through SAML. The matching of a user to a SCIM provisioned user is done when the SAML assertion is consumed. The user will be matched on SAML response NameID
to SCIM userName
.
When converting existing enterprise to use SCIM, the user handle (userName
) from the SCIM payload will be used to match the provisioned user to an already existing user in the enterprise. Since the new identity record is created for newly provisioned users the matching for those records is done using a user's handle. Currently the matching will be performed to all of the users no matter if they were SAML JIT provisioned or created as local users.
Parameters for "Provision a SCIM enterprise user"
Headers | ||||||||
---|---|---|---|---|---|---|---|---|
Name, Type, Description | ||||||||
accept stringSetting to | ||||||||
Body parameters | ||||||||
Name, Type, Description | ||||||||
schemas array of stringsRequiredThe URIs that are used to indicate the namespaces of the SCIM schemas. | ||||||||
externalId stringRequiredA unique identifier for the resource as defined by the provisioning client. | ||||||||
active booleanRequiredWhether the user active in the IdP. | ||||||||
userName stringRequiredThe username for the user. | ||||||||
name object | ||||||||
Properties of |
Name, Type, Description |
---|
formatted stringThe full name, including all middle names, titles, and suffixes as appropriate, formatted for display. |
familyName stringRequiredThe family name of the user. |
givenName stringRequiredThe given name of the user. |
middleName stringThe middle name(s) of the user. |
displayName
stringRequiredA human-readable name for the user.
emails
array of objectsRequiredThe emails for the user.
Properties of emails
Name, Type, Description |
---|
value stringRequiredThe email address. |
type stringRequiredThe type of email address. |
primary booleanRequiredWhether this email address is the primary address. |
roles
array of objectsThe roles assigned to the user.
Properties of roles
Name, Type, Description |
---|
display string |
type string |
value stringRequiredThe role value representing a user role in GitHub. Can be one of: |
primary booleanIs the role a primary role for the user. |
HTTP response status codes for "Provision a SCIM enterprise user"
Status code | Description |
---|---|
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 |
Code samples for "Provision a SCIM enterprise user"
curl -L \
-X POST \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Gets information about a SCIM user.
Parameters for "Get SCIM provisioning information for an enterprise user"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Path parameters |
Name, Type, Description |
scim_user_id stringRequiredThe unique identifier of the SCIM user. |
HTTP response status codes for "Get SCIM provisioning information for an enterprise user"
Status code | Description |
---|---|
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 |
Code samples for "Get SCIM provisioning information for an enterprise user"
curl -L \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private 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.
Warning: Setting active: false
will suspend a user and obfuscate the user handle and user email. Since the implementation is a generic SCIM implementation and does not differentiate yet between different IdP providers, for Okta, the user GDPR data will not be purged and the credentials will not be removed.
Parameters for "Set SCIM information for a provisioned enterprise user"
Headers | ||||||||
---|---|---|---|---|---|---|---|---|
Name, Type, Description | ||||||||
accept stringSetting to | ||||||||
Path parameters | ||||||||
Name, Type, Description | ||||||||
scim_user_id stringRequiredThe unique identifier of the SCIM user. | ||||||||
Body parameters | ||||||||
Name, Type, Description | ||||||||
schemas array of stringsRequiredThe URIs that are used to indicate the namespaces of the SCIM schemas. | ||||||||
externalId stringRequiredA unique identifier for the resource as defined by the provisioning client. | ||||||||
active booleanRequiredWhether the user active in the IdP. | ||||||||
userName stringRequiredThe username for the user. | ||||||||
name object | ||||||||
Properties of |
Name, Type, Description |
---|
formatted stringThe full name, including all middle names, titles, and suffixes as appropriate, formatted for display. |
familyName stringRequiredThe family name of the user. |
givenName stringRequiredThe given name of the user. |
middleName stringThe middle name(s) of the user. |
displayName
stringRequiredA human-readable name for the user.
emails
array of objectsRequiredThe emails for the user.
Properties of emails
Name, Type, Description |
---|
value stringRequiredThe email address. |
type stringRequiredThe type of email address. |
primary booleanRequiredWhether this email address is the primary address. |
roles
array of objectsThe roles assigned to the user.
Properties of roles
Name, Type, Description |
---|
display string |
type string |
value stringRequiredThe role value representing a user role in GitHub. Can be one of: |
primary booleanIs the role a primary role for the user. |
HTTP response status codes for "Set SCIM information for a provisioned enterprise user"
Status code | Description |
---|---|
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 |
Code samples for "Set SCIM information for a provisioned enterprise user"
curl -L \
-X PUT \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Update 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: Setting active: false
will suspend a user and obfuscate the user handle and user email. Since the implementation is a generic SCIM implementation and does not differentiate yet between different IdP providers, for Okta, the user GDPR data will not be purged and the credentials will not be removed.
{
"Operations":[{
"op":"replace",
"value":{
"active":false
}
}]
}
Parameters for "Update an attribute for a SCIM enterprise user"
Headers | |||||||
---|---|---|---|---|---|---|---|
Name, Type, Description | |||||||
accept stringSetting to | |||||||
Path parameters | |||||||
Name, Type, Description | |||||||
scim_user_id stringRequiredThe unique identifier of the SCIM user. | |||||||
Body parameters | |||||||
Name, Type, Description | |||||||
Operations array of objectsRequiredpatch operations list | |||||||
Properties of |
Name, Type, Description |
---|
op stringRequiredCan be one of: |
path string |
value stringCorresponding 'value' of that field specified by 'path' |
schemas
array of stringsRequiredHTTP response status codes for "Update an attribute for a SCIM enterprise user"
Status code | Description |
---|---|
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 |
Code samples for "Update an attribute for a SCIM enterprise user"
curl -L \
-X PATCH \
-H "Accept: application/scim+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/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 enterprise accounts are currently in private beta and are subject to change.
Permanently suspends a SCIM user from an enterprise, removes all data for the user, obfuscates the login, email, and display name of the user, removes all external-identity SCIM attributes, and deletes the emails, avatar, PATs, SSH keys, OAuth authorizations credentials, GPG keys, and SAML mappings for the user. You will not be able to undo this action.
Parameters for "Delete a SCIM user from an enterprise"
Headers |
---|
Name, Type, Description |
accept stringSetting to |
Path parameters |
Name, Type, Description |
scim_user_id stringRequiredThe unique identifier of the SCIM user. |
HTTP response status codes for "Delete a SCIM user from an enterprise"
Status code | Description |
---|---|
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 |
Code samples for "Delete a SCIM user from an enterprise"
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/scim/v2/Users/SCIM_USER_ID
User was deleted, no content
Status: 204