> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enterprise Groups にロールを割り当てる

> Auth0 Dashboard または Management API を使用して、Enterprise Groups にロールを割り当てたり削除したりする方法を説明します。

Auth0 では、Auth0 Dashboard または Management API を使用して、SCIM (System for Cross-domain Identity Management (SCIM): システム間でユーザー ID とグループのプロビジョニングおよび管理を行うための標準化されたプロトコルです。) でプロビジョニングされた Enterprise Groups に[ロール](https://auth0.com/docs/ja-jp/manage-users/access-control/rbac.md)を割り当てたり、削除したりできます。グループにロールを割り当てると、すべてのメンバーがログイン時にそのロールを継承します。グループのロールは、次の 2 つのスコープで管理できます。

* **Organization グループ** — 特定の [Organization](https://auth0.com/docs/ja-jp/manage-users/organizations.md) 内の Enterprise Groups。グループのロール継承を有効にするには、エンタープライズ接続で [Auto-Membership](https://auth0.com/docs/ja-jp/manage-users/organizations/configure-organizations/grant-just-in-time-membership.md) を有効にする必要があります。
* **Enterprise Groups** — Auth0 テナント内の Enterprise Groups。

## ロールの割り当て

### Organization グループ

Organization 内の SCIM でプロビジョニングされた Enterprise Groups にロールを割り当てます。Enterprise Groups は、SCIM を介してエンタープライズ アイデンティティプロバイダー (Okta や Microsoft Entra ID など) から同期されます。organization のメンバーがログインすると、自分が所属する Enterprise Groups に割り当てられているロールを継承します。

グループのロール継承を有効にするには、Organization のエンタープライズ接続で [Auto-Membership enabled](https://auth0.com/docs/ja-jp/manage-users/organizations/configure-organizations/grant-just-in-time-membership.md) が有効になっている必要があります。Enterprise Groups がどのようにプロビジョニングされるかについて詳しくは、[インバウンドSCIMを設定する](https://auth0.com/docs/ja-jp/authenticate/protocols/scim/configure-inbound-scim.md#use-groups-with-organizational-roles) を参照してください。

organization 内のエンタープライズグループには、テナントロールと組織ロールの両方を割り当てることができます。組織ロールについて詳しくは、[組織ロール](https://auth0.com/docs/ja-jp/manage-users/organizations/organization-roles.md) を参照してください。

> [!WARNING]
>
> **Organization Roles機能は現在、です。**

> [tab] Auth0 Dashboard
>
> 1. [Auth0 Dashboard > Organizations](https://manage.auth0.com/#/organizations) に移動し、Organization を選択します。
> 2. **Groups** タブを選択します。
> 3. ロールを割り当てるグループを選択します。
> 4. **Assign Roles** を選択します。
> 5. 割り当てるロールを検索して選択し、**Assign** を選択します。
>
> 割り当てられたロールは、グループの詳細に表示されます。この Organization にスコープが設定されたテナントロールと組織ロールの両方を割り当てることができます。

> [tab] Management API
>
> [Assign Organization Group Roles](https://auth0.com/docs/ja-jp/api/management/v2.md) エンドポイントに `POST` リクエストを送信します。必要な情報は次のとおりです。
>
> | Parameter | Description |
> | - | - |
> | `org_id` | Organization の ID。 |
> | `group_id` | Enterprise Group の ID。 |
> | `role_id` | 割り当てる組織ロールの ID。複数のロールを一度に割り当てるには、配列内に複数指定します。 |
> | `YOUR_MGMT_API_ACCESS_TOKEN` | `create:organization_group_roles` スコープを持つ [Management API access token](https://auth0.com/docs/ja-jp/secure/tokens/access-tokens/management-api-access-tokens.md)。 |
>
> > [tab] Auth0 CLI
> >
> > Auth0 CLI を使用していますか？まだの場合は、このコマンドを実行する前に [CLI セッションを設定して認証します](https://auth0.com/docs/ja-jp/deploy-monitor/auth0-cli.md)。
> >
> > ```bash theme={null}
> > auth0 api post "organizations/{ORG_ID}/groups/{GROUP_ID}/roles" \
> >   --data '{ "roles": [ "ROLE_ID" ] }'
> > ```
>
> > [tab] cURL
> >
> > ```bash wrap lines theme={null}
> > curl --request POST \
> >   --url 'https://{YOUR_AUTH0_DOMAIN}/api/v2/organizations/{ORG_ID}/groups/{GROUP_ID}/roles' \
> >   --header 'authorization: Bearer YOUR_MGMT_API_ACCESS_TOKEN' \
> >   --header 'content-type: application/json' \
> >   --data '{ "roles": [ "ROLE_ID" ] }'
> > ```
>
> リクエストが成功すると、`204 No Content` レスポンスが返されます。

### Enterprise Groups

SCIM でプロビジョニングされた Enterprise Groups にロールを割り当てます。グループにロールを割り当てると、そのグループのすべてのメンバーに、ログイン時にそのロールが自動的に付与されます。

エンタープライズ アイデンティティプロバイダーから Enterprise Groups がどのようにプロビジョニングされるかについては、[インバウンドSCIMを設定する](https://auth0.com/docs/ja-jp/authenticate/protocols/scim/configure-inbound-scim.md) を参照してください。

> [tab] Auth0 Dashboard
>
> 1. [Auth0 Dashboard > User Management > Enterprise Groups](https://manage.auth0.com/#/groups) に移動します。
> 2. ロールを割り当てるグループを選択します。
> 3. **Roles** タブを選択し、**Assign Roles** を選択します。
> 4. 割り当てるロールを検索して選択し、**Assign** を選択します。
>
> 割り当てられたロールは、グループの **Roles** タブに表示されます。

> [tab] Management API
>
> [Assign Roles to a Group](https://auth0.com/docs/ja-jp/api/management/v2.md) エンドポイントに `POST` リクエストを送信します。必要な情報は次のとおりです。
>
> | Parameter | Description |
> | - | - |
> | `group_id` | Enterprise Group の ID。 |
> | `role_id` | 割り当てるロールの ID。複数のロールを一度に割り当てるには、配列内で繰り返し指定します。 |
> | `YOUR_MGMT_API_ACCESS_TOKEN` | `update:groups` スコープを持つ [Management API access token](https://auth0.com/docs/ja-jp/secure/tokens/access-tokens/management-api-access-tokens.md)。 |
>
> > [tab] Auth0 CLI
> >
> > ```bash theme={null}
> > auth0 api post "groups/{group_id}/roles" \
> >   --data '{ "roles": [ "ROLE_ID" ] }'
> > ```
>
> > [tab] cURL
> >
> > ```bash wrap lines theme={null}
> > curl --request POST \
> >   --url 'https://{YOUR_AUTH0_DOMAIN}/api/v2/groups/{group_id}/roles' \
> >   --header 'authorization: Bearer YOUR_MGMT_API_ACCESS_TOKEN' \
> >   --header 'content-type: application/json' \
> >   --data '{ "roles": [ "ROLE_ID" ] }'
> > ```
>
> リクエストが成功すると、`204 No Content` レスポンスが返されます。

## ロールを削除

### Organization グループ

Organization 内の SCIM でプロビジョニングされた Enterprise Group からロールを削除します。ロールを削除すると、そのグループに属する Organization メンバーは、ログイン時にそのロールを継承しなくなります。

グループのロール継承を有効にするには、その Organization の エンタープライズ接続 で [Auto-Membership を有効化](https://auth0.com/docs/ja-jp/manage-users/organizations/configure-organizations/grant-just-in-time-membership.md) しておく必要があります。

> [tab] Auth0 Dashboard
>
> 1. [Auth0 Dashboard > Organizations](https://manage.auth0.com/#/organizations) に移動し、対象の Organization を選択します。
> 2. **Groups** タブを選択します。
> 3. 更新するグループを選択します。
> 4. 削除するロールを見つけて、その横にあるごみ箱アイコンを選択します。
> 5. 削除を確認します。
>
> 削除したロールは、グループの詳細に表示されなくなります。

> [tab] Management API
>
> [Delete Organization Group Roles](https://auth0.com/docs/ja-jp/api/management/v2.md) エンドポイントに `DELETE` リクエストを送信します。必要な情報は次のとおりです。
>
> | Parameter | Description |
> | - | - |
> | `org_id` | Organization の ID。 |
> | `group_id` | Enterprise Group の ID。 |
> | `role_id` | 削除する Organization ロールの ID。複数のロールを一度に削除するには、配列内に複数指定します。 |
> | `YOUR_MGMT_API_ACCESS_TOKEN` | `delete:organization_group_roles` スコープを持つ [Management API access token](https://auth0.com/docs/ja-jp/secure/tokens/access-tokens/management-api-access-tokens.md)。 |
>
> > [tab] Auth0 CLI
> >
> > ```bash theme={null}
> > auth0 api delete "organizations/ORG_ID/groups/GROUP_ID/roles" \
> >   --data '{ "roles": [ "ROLE_ID" ] }'
> > ```
>
> > [tab] cURL
> >
> > ```bash wrap lines theme={null}
> > curl --request DELETE \
> >   --url 'https://{YOUR_AUTH0_DOMAIN}/api/v2/organizations/ORG_ID/groups/GROUP_ID/roles' \
> >   --header 'authorization: Bearer YOUR_MGMT_API_ACCESS_TOKEN' \
> >   --header 'content-type: application/json' \
> >   --data '{ "roles": [ "ROLE_ID" ] }'
> > ```
>
> リクエストが成功すると、`204 No Content` レスポンスが返されます。

### Enterprise Groups

SCIM でプロビジョニングされた Enterprise Groups からロールを削除します。ロールを削除すると、グループメンバーはログイン時にそのロールを継承しなくなります。

> [tab] Auth0 Dashboard
>
> 1. [Auth0 Dashboard > User Management > Enterprise Groups](https://manage.auth0.com/#/groups) に移動します。
> 2. 更新するグループを選択します。
> 3. **Roles** タブを選択します。
> 4. 削除するロールを見つけ、横にあるごみ箱アイコンを選択します。
> 5. 削除を確定します。
>
> 削除したロールは、グループの **Roles** タブに表示されなくなります。

> [tab] Management API
>
> [Remove Roles from a Group](https://auth0.com/docs/ja-jp/api/management/v2.md) エンドポイント に `DELETE` リクエストを送信します。必要な情報は次のとおりです。
>
> | Parameter | Description |
> | - | - |
> | `group_id` | Enterprise Group の ID。 |
> | `role_id` | 削除するロールの ID。一度に複数のロールを削除する場合は、配列内に複数指定します。 |
> | `YOUR_MGMT_API_ACCESS_TOKEN` | `update:groups` スコープ を持つ [Management API access token](https://auth0.com/docs/ja-jp/secure/tokens/access-tokens/management-api-access-tokens.md)。 |
>
> > [tab] Auth0 CLI
> >
> > ```bash theme={null}
> > auth0 api delete "groups/GROUP_ID/roles" \
> >   --data '{ "roles": [ "ROLE_ID" ] }'
> > ```
>
> > [tab] cURL
> >
> > ```bash wrap lines theme={null}
> > curl --request DELETE \
> >   --url 'https://{YOUR_AUTH0_DOMAIN}/api/v2/groups/GROUP_ID/roles' \
> >   --header 'authorization: Bearer YOUR_MGMT_API_ACCESS_TOKEN' \
> >   --header 'content-type: application/json' \
> >   --data '{ "roles": [ "ROLE_ID" ] }'
> > ```
>
> リクエスト が成功すると、`204 No Content` レスポンスが返されます。

## 詳しくはこちら

* [Organizationのロール](https://auth0.com/docs/ja-jp/manage-users/organizations/organization-roles.md)
* [インバウンドSCIMを設定する](https://auth0.com/docs/ja-jp/authenticate/protocols/scim/configure-inbound-scim.md)
* [Organization の接続にJust-In-Timeメンバーシップを付与する](https://auth0.com/docs/ja-jp/manage-users/organizations/configure-organizations/grant-just-in-time-membership.md)
* [organization のメンバーにロールを追加する](https://auth0.com/docs/ja-jp/manage-users/organizations/configure-organizations/add-member-roles.md)
* [organization のメンバーからロールを削除する](https://auth0.com/docs/ja-jp/manage-users/organizations/configure-organizations/remove-member-roles.md)
* [Usersからロールを削除する](https://auth0.com/docs/ja-jp/manage-users/access-control/configure-core-rbac/rbac-users/remove-roles-from-users.md)
* [Usersに割り当てられたロールを表示する](https://auth0.com/docs/ja-jp/manage-users/access-control/configure-core-rbac/rbac-users/view-user-roles.md)
