> 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/zi-dong-hua/runbooks/runbook-references/user/general/assign-groups-by-template.md).

# テンプレートによるグループ割り当て

このユーザーを事前定義されたグループ セットに追加

### 説明

このユーザーを 1 つ以上の Entra ID Groups に追加します。グループは、管理者が runbook カスタマイズで定義したテンプレートから取得されるため、実行者は個別のグループではなくテンプレートを選択します。

### runbook のカスタマイズでテンプレートを定義します

ユーザーが選択できるテンプレートは、runbook カスタマイズで Tenant ごとに 1 回定義されます。各テンプレートはグループ一覧 (`GroupsString`); `UseDisplaynames` その一覧にオブジェクト ID が含まれるかどうかを決定します (`false`）または表示名（`true`).

```json
{
    "Templates": {
        "Options": [
            {
                "$id": "GroupsTemplates",
                "$values": [
                    {
                        "Display": "ユーザーテンプレート 1 (オブジェクト ID)",
                        "Customization": {
                            "Default": {
                                "GroupsString": "c1f8e69f-e6c0-4e7e-b49d-241046958aa3,98c19df0-0bc1-4236-92b9-12559e1127d3"
                            }
                        }
                    },
                    {
                        "Display": "ユーザーテンプレート 2 (表示名)",
                        "Customization": {
                            "Default": {
                                "GroupsString": "app - Microsoft VC Redistributable 2013"
                            }
                        }
                    }
                ]
            }
        ]
    },
    "Runbooks": {
        "rjgit-user_general_assign-groups-by-template": {
            "ParameterList": [
                {
                    "Name": "GroupsTemplate",
                    "Select": {
                        "Options": {
                            "$ref": "GroupsTemplates"
                        }
                    }
                },
                {
                    "Name": "UseDisplaynames",
                    "Default": false
                }
            ]
        }
    }
}
```

ランブックのカスタマイズ方法の詳細については、 [ランブック カスタマイズ ガイド](https://docs.realmjoin.com/automation/runbooks/runbook-customization).

### 場所

ユーザー → 全般 → テンプレートでグループを割り当て

**完全な Runbook 名**

rjgit-user\_general\_assign-groups-by-template

### 詳細

| プロパティ    | 値                                   |
| -------- | ----------------------------------- |
| バージョン    | 1.0.1                               |
| 必須モジュール  | RealmJoin.RunbookHelper (>= 0.8.10) |
| スケジュール可能 | いいえ                                 |

### 権限

#### アプリケーションのアクセス許可

* **種類**: Microsoft Graph
  * Group.ReadWrite.All
    * *テンプレートのグループを解決し、そのメンバーを読み取り、<members@odata.bind> を介してユーザーを追加します*

### パラメーター

#### ユーザー ID

runbook が対象とするユーザーのオブジェクト ID。ポータルで選択したユーザーから設定されます。

| プロパティ    | 値                         |
| -------- | ------------------------- |
| 必須       | true                      |
| 既定値      |                           |
| 種類       | 文字列                       |
| ポータルで非表示 | はい (Runbook のカスタマイズで事前設定) |

#### GroupsTemplate

ユーザーがどのグループに参加するかを決定するテンプレートです。利用可能なテンプレートは runbook カスタマイズで設定されます。

| プロパティ   | 値           |
| ------- | ----------- |
| 必須      | false       |
| 既定値     |             |
| 種類      | 文字列         |
| ポータル表示名 | グループ テンプレート |

#### GroupsString

ユーザーを追加するグループをカンマ区切りで指定します。通常は選択したテンプレートによって設定されます。

| プロパティ   | 値    |
| ------- | ---- |
| 必須      | true |
| 既定値     |      |
| 種類      | 文字列  |
| ポータル表示名 | グループ |

#### UseDisplaynames

グループ一覧にオブジェクト ID の代わりに表示名が含まれるかどうか。runbook customization で事前設定されます。

| プロパティ    | 値                         |
| -------- | ------------------------- |
| 必須       | false                     |
| 既定値      | True                      |
| 種類       | ブール値                      |
| ポータルで非表示 | はい (Runbook のカスタマイズで事前設定) |

[Runbook リファレンスの概要に戻る](/ja/zi-dong-hua/runbooks/runbook-references.md)


---

# 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/zi-dong-hua/runbooks/runbook-references/user/general/assign-groups-by-template.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.
