> 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/add-primary-users-of-devices-to-group_scheduled.md).

# デバイスのプライマリ ユーザーをグループに追加（スケジュール）

### 説明

この runbook は、選択したプラットフォームに一致するすべての Intune 管理デバイスのプライマリ ユーザーを収集し、対象の Entra ID グループに同期します。いずれかの一致デバイスでプライマリ ユーザーとして割り当てられなくなったユーザーは、グループから削除されます。任意の include グループにより対象ユーザーを制限でき、任意の exclude グループにより特定ユーザーの追加を防止したり、既に除外された状態のままにしたりできます。

### 場所

組織 → 全般 → デバイスのプライマリ ユーザーをグループに追加 (スケジュール済み)

**完全な Runbook 名**

rjgit-org\_general\_add-primary-users-of-devices-to-group\_scheduled

### アクセス許可

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

* **種類**: Microsoft Graph
  * DeviceManagementManagedDevices.Read.All
  * Group.Read.All
  * GroupMember.ReadWrite.All
  * User.Read.All

### パラメーター

#### TargetGroupId

プライマリ ユーザーを同期する対象の Entra ID グループです。このグループのメンバーは、この runbook によってのみ管理されます。

| プロパティ | 値    |
| ----- | ---- |
| 必須    | true |
| 既定値   |      |
| 種類    | 文字列  |

#### Windows

Windows デバイスのプライマリ ユーザーを含めます。(OData フィルターで "operatingSystem eq 'Windows'")

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | False |
| 種類    | ブール値  |

#### MacOS

macOS デバイスのプライマリ ユーザーを含めます。(OData フィルターで "operatingSystem eq 'macOS'")

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | False |
| 種類    | ブール値  |

#### iOS

iOS および iPadOS デバイスのプライマリ ユーザーを含めます。(OData フィルターで "operatingSystem eq 'iOS'")

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | False |
| 種類    | ブール値  |

#### Android

Android デバイスのプライマリ ユーザーを含めます。(OData フィルターで "operatingSystem eq 'Android'")

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | False |
| 種類    | ブール値  |

#### AdvancedFilter

任意。デバイス取得時に適用するカスタム OData フィルターです。指定した場合、プラットフォーム ベースのフィルターより優先されます。例: startsWith(deviceName,'FWP-') and operatingSystem eq 'Windows' 。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   |       |
| 種類    | 文字列   |

#### RemoveUsersWhenNoDeviceMatch

有効にすると (既定)、選択したプラットフォームに一致するプライマリ デバイスをもはや持たないユーザーは対象グループから削除されます。追加のみモードにするには無効にします。既存のメンバーは削除されません。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### IncludeGroupId

任意。このグループのメンバーであるユーザーのみが対象グループに追加対象として適格です。すべてのプライマリ ユーザーを対象にするには空欄のままにしてください。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   |       |
| 種類    | 文字列   |

#### ExcludeGroupId

任意。このグループのメンバーであるユーザーは追加されず、すでに対象グループに存在する場合は削除されます。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   |       |
| 種類    | 文字列   |

[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 dynamically by asking a question.

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

```
GET https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-references/org/general/add-primary-users-of-devices-to-group_scheduled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
