> 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 Portal のオプション機能で、追加の RealmJoin 内部ロールを作成できます。これらのロールには粒度の細かい / アトミックな権限を割り当て、Entra グループまたは専用ユーザーに紐付けることができます。

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

カスタムロールは JSON として定義されます。RealmJoin Portal に含まれる JSON エディターは、構文チェックとハイライト表示を提供し、あなたの定義をカスタムロールの JSON スキーマに照らして検証します。

<figure><img src="/files/a73478e0172839507407a29a0fe9f4cb9deb9229" alt=""><figcaption><p>カスタムロール JSON エディター</p></figcaption></figure>

## エディターの使用

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

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

<figure><img src="/files/dba22c9ea20cb7330fc6118b2c1b3d56bbb5f6f1" alt=""><figcaption><p>JSON エラーメッセージ/ボタン</p></figcaption></figure>

このメッセージをクリックすると、エラーの詳細が表示されます。

### 書式設定

をクリックして JSON を自動整形できます **整形** ページ右上隅の

<figure><img src="/files/e49ddea8be3e80a153def9aca08aa8d9392e75d8" alt=""><figcaption><p>整形ボタン</p></figcaption></figure>

### オートコンプリート

エディターはスキーマから既知のキーワード（permissions など）のオートコンプリート候補を提示できます。

<figure><img src="/files/b79492dcfffaba8d2f04b7316af4910f63552663" 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": "ジョンが新しいセルフサービスフォームを追加できるようにする",
      "Users": [
        "b31f5765-f56f-47fa-9248-ac2d77221622"
      ],
      "Permissions": [
        "CanAddSelfServiceForms"
      ]
    }
  ]
}
```

### 名前と説明

**名前** は必須です, **説明** は任意です。

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

### 権限

権限は、RealmJoin Portal 内の特定の操作を識別する一意の文字列です。 **権限** は権限のリスト（配列）です。

参照 [利用可能な権限](/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
