> 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/org/general/assign-groups-by-template_scheduled.md).

# テンプレートに基づいてグループを割り当て（スケジュール済み）

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

{% hint style="info" %}
これはスケジュールされた runbook です。単一のオブジェクトに対してトリガーされるのではなく、繰り返しのスケジュールで実行されるように設計されています。詳細は [スケジューリング](/ja/zi-dong-hua/runbooks/scheduling.md) runbook のスケジュールの設定方法の詳細については
{% endhint %}

### 説明

ソース グループのすべてのユーザーを、スケジュールに従ってテンプレートのターゲット グループに追加し、全体に同じグループ セットを適用します。除外グループのユーザーはスキップされます。テンプレートは runbook のカスタマイズで定義されます。

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

テンプレートは、ソース グループのユーザーが参加するターゲット グループを決定します。各テンプレートはグループ一覧（`GroupsString`）と、その一覧にオブジェクト ID（`UseDisplaynames` = `false`）または表示名（`true`).

```json
{
    "Templates": {
        "Options": [
            {
                "$id": "GroupsTemplates",
                "$values": [
                    {
                        "Display": "テンプレート 1 (UseDisplaynames=false)",
                        "Customization": {
                            "Default": {
                                "GroupsString": "c1f8e69f-e6c0-4e7e-b49d-241046958aa3,98c19df0-0bc1-4236-92b9-12559e1127d3",
                                "UseDisplaynames": false
                            }
                        }
                    },
                    {
                        "Display": "テンプレート 2 (UseDisplaynames=true)",
                        "Customization": {
                            "Default": {
                                "GroupsString": "app - Microsoft VC Redistributable 2013,app - VLC Player",
                                "UseDisplaynames": true
                            }
                        }
                    }
                ]
            }
        ]
    },
    "Runbooks": {
        "rjgit-org_general_assign-groups-by-template_scheduled": {
            "ParameterList": [
                {
                    "Name": "GroupsTemplate",
                    "Select": {
                        "Options": {
                            "$ref": "GroupsTemplates"
                        }
                    }
                },
                {
                    "Name": "UseDisplaynames",
                    "Default": false
                }
            ]
        }
    }
}
```

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

### 場所

組織 → 全般 → テンプレートによるグループ割り当て（スケジュール済み）

**完全な Runbook 名**

rjgit-org\_general\_assign-groups-by-template\_scheduled

### 詳細

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

### 権限

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

* **種類**: Microsoft Graph
  * User.Read.All
    * *追加対象を算出するため、ソース、除外、ターゲット グループのメンバー ユーザーを読み取ります*
  * Group.ReadWrite.All
    * *グループを解決し、<members@odata.bind> のバッチを使用してユーザーをターゲット グループに追加します*

### パラメーター

#### SourceGroupId

このグループ内のすべてのユーザーが処理されます。

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

#### ExclusionGroupId

このグループのユーザーはスキップされます。すべてのユーザーを処理するには空のままにしてください。

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

#### GroupsTemplate

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

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

#### GroupsString

ターゲット グループをカンマ区切りで指定します。通常は選択したテンプレートによって入力されます。

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

#### UseDisplaynames

グループ一覧にオブジェクト ID ではなく表示名が含まれる場合はオンにします。テンプレートごとに事前設定できます。

| プロパティ   | 値                |
| ------- | ---------------- |
| 必須      | false            |
| 既定値     | True             |
| 種類      | ブール値             |
| ポータル表示名 | グループは表示名で指定しますか？ |

[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/org/general/assign-groups-by-template_scheduled.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.
