> 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 です。単一のオブジェクトによってトリガーされるのではなく、繰り返しスケジュールで実行されるように設計されています。詳細は [スケジューリング](https://docs.realmjoin.com/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
                }
            ]
        }
    }
}
```

runbook のカスタマイズ方法の詳細については、 [Runbook カスタマイズ ガイド](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 リファレンスの概要に戻る](https://docs.realmjoin.com/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.
