Skip to main content

このバージョンの GitHub Enterprise サーバーはこの日付をもって終了となりました: 2024-07-09. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの向上、新機能の向上を図るために、最新バージョンの GitHub Enterprise サーバーにアップグレードしてください。 アップグレードに関するヘルプについては、GitHub Enterprise サポートにお問い合わせください

REST API はバージョン管理になりました。 詳細については、「API のバージョン管理について」を参照してください。

SCIM の REST API エンドポイント

REST API を使って、SCIM でのユーザー作成とチーム メンバーシップを自動化します。

SCIM の概要

注: GitHub Enterprise Server の SCIM は現在プライベート ベータ版であり、変更される可能性があります。 ベータ版にアクセスするには、GitHub の営業チーム のアカウント マネージャーにお問い合わせください。 [GitHub Community ディスカッション] にフィードバックをお寄せください。

警告: ベータ版はテストとフィードバック専用であり、サポートは利用できません。 GitHub では、ステージング インスタンスを使用したテストをお勧めします。 詳しくは、「ステージングインスタンスのセットアップ」を参照してください。

GitHub Enterprise Server には、SCIM 対応 ID プロバイダー (IdP) で使うためのエンドポイントが用意されています。 IdP の統合では、REST API を使って、認証に SAML シングル サインオン (SSO) を使う GitHub Enterprise Server インスタンスでユーザー アカウントを自動的にプロビジョニング、管理、またはプロビジョニング解除できます。 SAML SSO の詳細については、「エンタープライズ IAM の SAML について」を参照してください。

これらのエンドポイントは SCIM 2.0 に基づいています。 詳しくは、IdP のドキュメントを参照するか、IETF Web サイトの仕様を参照してください。

ルート URL

IdP は、次のルート URL を使って、GitHub Enterprise Server インスタンス用のこのカテゴリのエンドポイントと通信できます。

http(s)://HOSTNAME/api/v3/scim/v2/

このカテゴリのエンドポイントでは、大文字と小文字が区別されます。 たとえば、Users エンドポイントの最初の文字は大文字にする必要があります。

GET /scim/v2/Users/{scim_user_id}

認証

IdP での SCIM 統合では、GitHub Enterprise Server インスタンスの Enterprise 所有者に代わってアクションが実行されます。 詳しくは、「Enterprise におけるロール」を参照してください。

API 要求の認証を行うには、IdP で SCIM を構成するユーザーは、admin:enterprise スコープで personal access token を使う必要があります。これは、IdP が要求の Authorization ヘッダーで指定する必要があります。 personal access tokens の詳細については、「個人用アクセス トークンを管理する」を参照してください。

注: エンタープライズ所有者は、このカテゴリのエンドポイントへの要求の認証のために personal access token を生成して使う必要があります。 Fine-grained personal access token と GitHub アプリの呼び出し元は、現時点ではサポートされていません。

SAML および SCIM データのマッピング

GitHub Enterprise Server インスタンスにより、SAML SSO で正常に認証された各ユーザーが SCIM ID にリンクされます。 ID を正常にリンクするには、SAML IdP と SCIM の統合で、各ユーザーに一致する SAML NameID と SCIM userName の値を使用する必要があります。

注: GitHub Enterprise Server で SAML IdP として Entra ID が使用されている場合、NameIDuserName が使用されるのではななく、GitHub Enterprise Server ではまず SCIM externalId 要求および SAML http://schemas.microsoft.com/identity/claims/objectidentifier 要求がユーザーと一致していることも確認されます。

サポートされている SCIM ユーザー属性

このカテゴリの User エンドポイントでは、要求のパラメーター内で次の属性がサポートされています。

名前種類説明
displayNameString人が判読できるユーザーの名前。
name.formattedString表示用に書式設定された、すべてのミドル ネーム、役職、サフィックスを含む、ユーザーのフル ネーム。
name.givenNameStringユーザーの名。
name.familyNameStringユーザーの姓。
userNameStringIdP によって生成されたユーザーのユーザー名。 使用する前に正規化を行います。
emailsArrayユーザーのメールの一覧。
rolesArrayユーザーのロールの一覧。
externalIdStringこの識別子は、IdP プロバイダーによって生成されます。 ユーザーの externalId は、IdP で、または SCIM でプロビジョニングされたアイデンティティの一覧表示エンドポイントを使用し、GitHub Enterprise Server インスタンスのユーザーのユーザー名やメール アドレスなどの他の既知の属性でフィルター処理して見つけることができます。
idStringインスタンスの SCIM エンドポイントによって生成された識別子。
activeBooleanID がアクティブである (true) か、中断する必要がある (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.

"List provisioned SCIM groups for an enterprise" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
enterprise string 必須

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

クエリ パラメーター
名前, Type, 説明
filter string

If specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are externalId, id, and displayName. For example, ?filter="externalId eq '9138790-10932-109120392-12321'".

excludedAttributes string

Excludes the specified attribute from being returned in the results. Using this parameter can speed up response time.

startIndex integer

Used for pagination: the starting index of the first result to return when paginating through values.

Default: 1

count integer

Used for pagination: the number of results to return per page.

Default: 30

"List provisioned SCIM groups for an enterprise" の HTTP 応答状態コード

状態コード説明
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

"List provisioned SCIM groups for an enterprise" のコード サンプル

要求の例

get/scim/v2/enterprises/{enterprise}/Groups
curl -L \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/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.

"Provision a SCIM enterprise group" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
enterprise string 必須

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

本文のパラメーター
名前, Type, 説明
schemas array of strings 必須

The URIs that are used to indicate the namespaces of the SCIM schemas. Supported values are: urn:ietf:params:scim:schemas:core:2.0:Group

externalId string 必須

A unique identifier for the resource as defined by the provisioning client.

displayName string 必須

A human-readable name for a security group.

members array of objects 必須

The group members.

名前, Type, 説明
value string 必須

The local unique identifier for the member

displayName string 必須

The display name associated with the member

"Provision a SCIM enterprise group" の HTTP 応答状態コード

状態コード説明
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

"Provision a SCIM enterprise group" のコード サンプル

要求の例

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

"Get SCIM provisioning information for an enterprise group" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
scim_group_id string 必須

A unique identifier of the SCIM group.

enterprise string 必須

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

クエリ パラメーター
名前, Type, 説明
excludedAttributes string

Excludes the specified attribute from being returned in the results. Using this parameter can speed up response time.

"Get SCIM provisioning information for an enterprise group" の HTTP 応答状態コード

状態コード説明
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

"Get SCIM provisioning information for an enterprise group" のコード サンプル

要求の例

get/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl -L \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/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.

"Set SCIM information for a provisioned enterprise group" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
scim_group_id string 必須

A unique identifier of the SCIM group.

enterprise string 必須

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

本文のパラメーター
名前, Type, 説明
schemas array of strings 必須

The URIs that are used to indicate the namespaces of the SCIM schemas. Supported values are: urn:ietf:params:scim:schemas:core:2.0:Group

externalId string 必須

A unique identifier for the resource as defined by the provisioning client.

displayName string 必須

A human-readable name for a security group.

members array of objects 必須

The group members.

名前, Type, 説明
value string 必須

The local unique identifier for the member

displayName string 必須

The display name associated with the member

"Set SCIM information for a provisioned enterprise group" の HTTP 応答状態コード

状態コード説明
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

"Set SCIM information for a provisioned enterprise group" のコード サンプル

要求の例

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

"Update an attribute for a SCIM enterprise group" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
scim_group_id string 必須

A unique identifier of the SCIM group.

enterprise string 必須

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

本文のパラメーター
名前, Type, 説明
Operations array of objects 必須

patch operations list

名前, Type, 説明
op string 必須

次のいずれかにできます: add, replace, remove

path string
value string

Corresponding 'value' of that field specified by 'path'

schemas array of strings 必須

undefinedSupported values are: urn:ietf:params:scim:api:messages:2.0:PatchOp

"Update an attribute for a SCIM enterprise group" の HTTP 応答状態コード

状態コード説明
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

"Update an attribute for a SCIM enterprise group" のコード サンプル

要求の例

patch/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl -L \ -X PATCH \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ 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":"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.

"Delete a SCIM group from an enterprise" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
scim_group_id string 必須

A unique identifier of the SCIM group.

enterprise string 必須

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

"Delete a SCIM group from an enterprise" の HTTP 応答状態コード

状態コード説明
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

"Delete a SCIM group from an enterprise" のコード サンプル

要求の例

delete/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/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.

"List SCIM provisioned identities for an enterprise" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
enterprise string 必須

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

クエリ パラメーター
名前, Type, 説明
filter string

If specified, only results that match the specified filter will be returned. Multiple filters are not supported. Possible filters are userName, externalId, id, and displayName. For example, ?filter="externalId eq '9138790-10932-109120392-12321'".

startIndex integer

Used for pagination: the starting index of the first result to return when paginating through values.

Default: 1

count integer

Used for pagination: the number of results to return per page.

Default: 30

"List SCIM provisioned identities for an enterprise" の HTTP 応答状態コード

状態コード説明
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

"List SCIM provisioned identities for an enterprise" のコード サンプル

要求の例

get/scim/v2/enterprises/{enterprise}/Users
curl -L \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/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": "[email protected]", "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.

"Provision a SCIM enterprise user" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
enterprise string 必須

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

本文のパラメーター
名前, Type, 説明
schemas array of strings 必須

The URIs that are used to indicate the namespaces of the SCIM schemas. Supported values are: urn:ietf:params:scim:schemas:core:2.0:User

externalId string 必須

A unique identifier for the resource as defined by the provisioning client.

active boolean 必須

Whether the user active in the IdP.

userName string 必須

The username for the user.

name object
名前, Type, 説明
formatted string

The full name, including all middle names, titles, and suffixes as appropriate, formatted for display.

familyName string 必須

The family name of the user.

givenName string 必須

The given name of the user.

middleName string

The middle name(s) of the user.

displayName string 必須

A human-readable name for the user.

emails array of objects 必須

The emails for the user.

名前, Type, 説明
value string 必須

The email address.

type string 必須

The type of email address.

primary boolean 必須

Whether this email address is the primary address.

roles array of objects

The roles assigned to the user.

名前, Type, 説明
display string
type string
value string 必須

The role value representing a user role in GitHub.

次のいずれかにできます: user, 27d9891d-2c17-4f45-a262-781a0e55c80a, guest_collaborator, 1ebc4a02-e56c-43a6-92a5-02ee09b90824, enterprise_owner, 981df190-8801-4618-a08a-d91f6206c954, ba4987ab-a1c3-412a-b58c-360fc407cb10, billing_manager, 0e338b8c-cc7f-498a-928d-ea3470d7e7e3, e6be2762-e4ad-4108-b72d-1bbe884a0f91

primary boolean

Is the role a primary role for the user.

"Provision a SCIM enterprise user" の HTTP 応答状態コード

状態コード説明
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

"Provision a SCIM enterprise user" のコード サンプル

要求の例

post/scim/v2/enterprises/{enterprise}/Users
curl -L \ -X POST \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/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":"[email protected]","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": "[email protected]", "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.

"Get SCIM provisioning information for an enterprise user" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
scim_user_id string 必須

The unique identifier of the SCIM user.

enterprise string 必須

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

"Get SCIM provisioning information for an enterprise user" の HTTP 応答状態コード

状態コード説明
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

"Get SCIM provisioning information for an enterprise user" のコード サンプル

要求の例

get/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl -L \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/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": "[email protected]", "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.

"Set SCIM information for a provisioned enterprise user" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
scim_user_id string 必須

The unique identifier of the SCIM user.

enterprise string 必須

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

本文のパラメーター
名前, Type, 説明
schemas array of strings 必須

The URIs that are used to indicate the namespaces of the SCIM schemas. Supported values are: urn:ietf:params:scim:schemas:core:2.0:User

externalId string 必須

A unique identifier for the resource as defined by the provisioning client.

active boolean 必須

Whether the user active in the IdP.

userName string 必須

The username for the user.

name object
名前, Type, 説明
formatted string

The full name, including all middle names, titles, and suffixes as appropriate, formatted for display.

familyName string 必須

The family name of the user.

givenName string 必須

The given name of the user.

middleName string

The middle name(s) of the user.

displayName string 必須

A human-readable name for the user.

emails array of objects 必須

The emails for the user.

名前, Type, 説明
value string 必須

The email address.

type string 必須

The type of email address.

primary boolean 必須

Whether this email address is the primary address.

roles array of objects

The roles assigned to the user.

名前, Type, 説明
display string
type string
value string 必須

The role value representing a user role in GitHub.

次のいずれかにできます: user, 27d9891d-2c17-4f45-a262-781a0e55c80a, guest_collaborator, 1ebc4a02-e56c-43a6-92a5-02ee09b90824, enterprise_owner, 981df190-8801-4618-a08a-d91f6206c954, ba4987ab-a1c3-412a-b58c-360fc407cb10, billing_manager, 0e338b8c-cc7f-498a-928d-ea3470d7e7e3, e6be2762-e4ad-4108-b72d-1bbe884a0f91

primary boolean

Is the role a primary role for the user.

"Set SCIM information for a provisioned enterprise user" の HTTP 応答状態コード

状態コード説明
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

"Set SCIM information for a provisioned enterprise user" のコード サンプル

要求の例

put/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl -L \ -X PUT \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/scim/v2/enterprises/ENTERPRISE/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":"[email protected]","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": "[email protected]", "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
    }
  }]
}

"Update an attribute for a SCIM enterprise user" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
scim_user_id string 必須

The unique identifier of the SCIM user.

enterprise string 必須

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

本文のパラメーター
名前, Type, 説明
Operations array of objects 必須

patch operations list

名前, Type, 説明
op string 必須

次のいずれかにできます: add, replace, remove

path string
value string

Corresponding 'value' of that field specified by 'path'

schemas array of strings 必須

undefinedSupported values are: urn:ietf:params:scim:api:messages:2.0:PatchOp

"Update an attribute for a SCIM enterprise user" の HTTP 応答状態コード

状態コード説明
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

"Update an attribute for a SCIM enterprise user" のコード サンプル

要求の例

patch/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}
curl -L \ -X PATCH \ -H "Accept: application/scim+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ 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":"replace","path":"emails[type eq '\''work'\''].value","value":"[email protected]"},{"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": "[email protected]", "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.

"Delete a SCIM user from an enterprise" のパラメーター

ヘッダー
名前, Type, 説明
accept string

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

パス パラメーター
名前, Type, 説明
scim_user_id string 必須

The unique identifier of the SCIM user.

enterprise string 必須

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

"Delete a SCIM user from an enterprise" の HTTP 応答状態コード

状態コード説明
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

"Delete a SCIM user from an enterprise" のコード サンプル

要求の例

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

User was deleted, no content

Status: 204