> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/ja/to/permission/custom-roles.md).

# カスタム ロール

RealmJoin のカスタム ロールでは、きめ細かなアクセス許可を JSON として定義し、組み込みの JSON エディターを介して Entra グループまたはユーザーに関連付けます。

## 概要

**カスタムロール** は RealmJoin Portal のオプション機能であり、追加の RealmJoin 内部ロールを作成できます。これらのロールにはきめ細かな / 個別の権限を割り当て、Entra グループまたは特定のユーザーに関連付けることができます。

{% hint style="info" %}
カスタムロールが必要な場合は、 **RealmJoin サポート経由で有効化を依頼してください**.
{% endhint %}

Custom Roles は JSON として定義されます。RealmJoin Portal に含まれる JSON エディターは、構文チェックとハイライト表示を提供し、Custom Roles JSON スキーマに対して定義を検証します。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FNifuPdTWlMiAniHWFyov%2Fimage.png?alt=media&amp;token=189d5359-6632-4d41-a9ca-14a886fce7c1" alt=""><figcaption><p>Custom Roles JSON エディター</p></figcaption></figure>

## エディターの使用方法

### 構文チェック / エラー

入力中にエディターが構文をチェックします。構文エラーが検出されると、エラーメッセージ **x 件のエラーを表示** とバグアイコンが **保存。**

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2F9KdtoXuHIptOvZot6fHy%2Fimage.png?alt=media&amp;token=6337d312-d237-48bf-a7fa-2e0ae3ffe67f" alt=""><figcaption><p>JSON エラーメッセージ/ボタン</p></figcaption></figure>

このメッセージをクリックすると、エラーの詳細を確認できます。

### 書式設定

をクリックすると JSON を自動整形できます **書式設定** ページの右上隅にあります。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FBcvly75klfY71hEA0oMj%2Fimage.png?alt=media&amp;token=009be309-82ff-4dac-828b-146c29def86e" alt=""><figcaption><p>書式設定ボタン</p></figcaption></figure>

### 自動補完

エディターは、スキーマから既知のキーワード（権限など）を自動補完として提案できます。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FwyhuLYTSuCJyhdK3K0lX%2Fimage.png?alt=media&amp;token=20ab28f4-6b98-4349-96fc-1586d609449a" alt=""><figcaption><p>キーワードの自動補完</p></figcaption></figure>

"Ctrl" + "Space" をいつでも押すと、自動補完を呼び出せます。

## ルール

ロールは、権限の組と、その権限が付与されるユーザーおよび/またはグループとして説明されます。

ロールは、キーワードの下に配列（リスト）の一部として列挙されます **ルール**.

ルールの例:

```json
{
  "Rules": [
    {
      "Name": "Default: サポーターはメインユーザーを変更できます [27e589a7]",
      "Description": "サポーター グループのメンバーが RealmJoin に参加しているデバイスのメインユーザーを変更できるようにする既定のルールです。名前に含まれている ID はそのまま保持してください。",
      "Groups": [
        "f31f5765-f56f-47fa-9248-ac2d77221634",
        "422e6b7c-bd99-4082-be1c-88cbc2bb2734"
      ],
      "Permissions": [
        "CanChangeRealmJoinPrimaryUser"
      ]
    },{
      "Name": "John が新しいセルフサービスフォームを追加できるようにする",
      "Users": [
        "b31f5765-f56f-47fa-9248-ac2d77221622"
      ],
      "Permissions": [
        "CanAddSelfServiceForms"
      ]
    }
  ]
}
```

### 名前と説明

**名前** が必要です。 **説明** 任意です。

どちらもプレーンテキストのフィールド（文字列）です。

### アクセス許可

権限とは、RealmJoin Portal 内の特定のアクションを識別する一意の文字列です。 **アクセス許可** は権限のリスト（配列）です。

参照 [利用可能な権限](https://docs.realmjoin.com/ja/to/permission/custom-roles/available-permissions.md) 一般的な権限の一覧と説明については、

### グループ

Entra グループ オブジェクト ID のリスト（配列）です。与えられた [アクセス許可](#permissions) は、これらのグループのメンバーであるすべてのユーザーに割り当てられます。

### ユーザー

Entra ユーザー オブジェクト ID のリスト（配列）です。与えられた [アクセス許可](#permissions) は、これらのユーザーに割り当てられます。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmjoin.com/ja/to/permission/custom-roles.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
