> 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/userinfo/update-user.md).

# ユーザーを更新

このユーザーのプロファイル詳細、グループ、メールボックス設定を更新します

### 説明

このユーザーのプロファイルを Entra ID で更新します。名前、会社、住所、役職、上司などが対象です。ライセンス グループやその他のグループにユーザーを追加することもでき、Exchange Online アーカイブを有効にして、パスワードをリセットすることもできます。変更されるのは入力したフィールドのみで、表示名や会社が未入力の場合は自動的に補完されます。

### 場所、会社、ライセンス、部署をテンプレートとして提供します

この runbook のほとんどのフィールドは自由入力です。runbook カスタマイズ テンプレートを使うと、代わりにオペレーターは事前定義されたリストから選択します。また、場所テンプレートを使えば、住所全体のブロックを入力して固定できます。以下の例では、そのようなテンプレートを定義し、それらを runbook のフィールドに関連付けています:

```json
"Templates": {
    "Options": [
        {
            "$id": "LocationOptions",
            "$values": [
                {
                    "Display": "Contoso DE",
                    "Value": "ContosoDe",
                    "Customization": {
                        "Default": {
                            "StreetAddress": "Demostr. 22",
                            "PostalCode": "80333",
                            "City": "ミュンヘン",
                            "State": "バイエルン",
                            "Country": "ドイツ",
                            "UsageLocation": "DE"
                        },
                        "ReadOnly": [
                            "StreetAddress",
                            "PostalCode",
                            "City",
                            "Country",
                            "UsageLocation"
                        ]
                    }
                }
            ]
        },
        {
            "$id": "CompanyOptions",
            "$values": [
                {
                    "Display": "CONTOSO",
                    "Value": "Contoso"
                }
            ]
        },
        {
            "$id": "LicenseOptions",
            "$values": [
                {
                    "Display": "M365 E3 + E5 Security + Audio Conferencing",
                    "Value": "LIC_M365_E3&E5_SecurityPlan&AudioConf"
                },
                {
                    "Display": "なし",
                    "Value": ""
                }
            ]
        },
        {
            "$id": "DepartmentOptions",
            "$values": [
                {
                    "Display": "M&A",
                    "Value": "M&A"
                },
                {
                    "Display": "税務・法務",
                    "Value": "Tax & Legal"
                },
                {
                    "Display": "管理・運用",
                    "Value": "Controlling & Operations"
                },
                {
                    "Display": "IT",
                    "Value": "IT"
                },
                {
                    "Display": "コミュニケーション",
                    "Value": "Communications"
                },
                {
                    "Display": "戦略・経営",
                    "Value": "Strategy & Management"
                },
                {
                    "Display": "経理",
                    "Value": "Accounting"
                },
                {
                    "Display": "保険",
                    "Value": "Insurance"
                },
                {
                    "Display": "財務",
                    "Value": "Treasury"
                }
            ]
        }
    ]
},
"Runbooks": {
    "rjgit-user_userinfo_update-user": {
        "ParameterList": [
            {
                "Name": "LocationName",
                "DisplayName": "Office の所在地",
                "DisplayBefore": "StreetAddress",
                "Select": {
                    "Options": {
                        "$ref": "LocationOptions"
                    }
                },
                "Default": "ContosoDe"
            },
            {
                "Name": "CompanyName",
                "Select": {
                    "Options": {
                        "$ref": "CompanyOptions"
                    },
                    "AllowEdit": false
                },
                "Default": "Contoso"
            },
            {
                "Name": "DefaultLicense",
                "DisplayName": "ライセンス",
                "Select": {
                    "Options": {
                        "$ref": "LicenseOptions"
                    },
                    "AllowEdit": true
                },
                "Default": "LIC_M365_E3&E5_SecurityPlan&AudioConf"
            },
            {
                "Name": "Department",
                "Select": {
                    "Options": {
                        "$ref": "DepartmentOptions"
                    },
                    "AllowEdit": true
                }
            },
            {
                "Name": "ResetPassword",
                "Hide": true
            },
            {
                "Name": "DefaultGroups",
                "Default": "app - 7-Zip,app - Adobe Reader DC Continuous Track,app - glueckkanja-gab KONNEKT"
            }
        ]
    }
}
```

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

### 場所

User → Userinfo → ユーザーの更新

**完全な Runbook 名**

rjgit-user\_userinfo\_update-user

### 詳細

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

### アクセス許可

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

* **型**: Microsoft Graph
  * UserAuthenticationMethod.Read.All
    * *MFA が存在する場合はパスワードのリセットをスキップするために、ユーザーの登録済み MFA メソッドを読み取ります*
* **型**: Office 365 Exchange Online
  * Exchange.ManageAsApp
    * *配布グループとオンラインアーカイブの有効化に使用する、アプリ専用の Exchange Online セッションを開きます*

#### RBAC ロール

* ユーザー管理者
  * *プロファイル更新、パスワードのリセット、上司の割り当て、グループ追加を元に戻します*
* Exchange Administrator
  * *配布グループとオンラインアーカイブを管理するアプリ専用の Exchange Online セッションに必要です*

### パラメーター

#### ユーザー名

Runbook が操作対象とするユーザーのユーザー プリンシパル名です。ポータルで選択したユーザーから設定されます。

| プロパティ    | 値                        |
| -------- | ------------------------ |
| 必須       | true                     |
| 既定値      |                          |
| 型        | 文字列                      |
| ポータルで非表示 | はい（runbook のカスタマイズで事前設定） |

#### GivenName

新しい名。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 名     |

#### Surname

新しい姓。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 姓     |

#### DisplayName

Microsoft 365 に表示される新しい表示名。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 表示名   |

#### CompanyName

ユーザーが所属する会社。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 会社    |

#### City

ユーザーの住所の市区町村。

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

#### Country

ユーザーの住所の国。

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

#### JobTitle

プロファイルに表示される役職。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 役職    |

#### 部署

ユーザーが所属する部署。

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

#### OfficeLocation

ユーザーが勤務する Office または建物。

| プロパティ    | 値           |
| -------- | ----------- |
| 必須       | false       |
| 既定値      |             |
| 型        | 文字列         |
| ポータルの表示名 | Office の所在地 |

#### PostalCode

ユーザーの住所の郵便番号。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 郵便番号  |

#### PreferredLanguage

en-US や de-DE などの言語コード。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 優先言語  |

#### State

ユーザーの住所の州または地域。

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

#### StreetAddress

ユーザーの住所の通り名と番地。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 番地    |

#### UsageLocation

ユーザーが取得できるライセンスを決定する 2 文字の国コード。たとえば DE。

| プロパティ    | 値     |
| -------- | ----- |
| 必須       | false |
| 既定値      |       |
| 型        | 文字列   |
| ポータルの表示名 | 使用場所  |

#### ManagerId

このユーザーの上司になるユーザー。

| プロパティ    | 値      |
| -------- | ------ |
| 必須       | false  |
| 既定値      |        |
| 型        | 文字列    |
| ポータルの表示名 | マネージャー |

#### DefaultLicense

ライセンスを割り当てるグループの表示名。このユーザーが追加されます。

| プロパティ    | 値              |
| -------- | -------------- |
| 必須       | false          |
| 既定値      |                |
| 型        | 文字列            |
| ポータルの表示名 | 割り当てるライセンスグループ |

#### DefaultGroups

ユーザーが追加されるグループの表示名。カンマ区切り。

| プロパティ    | 値        |
| -------- | -------- |
| 必須       | false    |
| 既定値      |          |
| 型        | 文字列      |
| ポータルの表示名 | 追加するグループ |

#### EnableEXOArchive

ユーザーの Exchange Online アーカイブ メールボックスを有効にします。

| プロパティ    | 値                      |
| -------- | ---------------------- |
| 必須       | false                  |
| 既定値      | False                  |
| 型        | ブール値                   |
| ポータルの表示名 | アーカイブ メールボックスを有効にしますか? |

#### ResetPassword

生成された初期パスワードを設定します。これは出力に表示され、次回のサインイン時に変更する必要があります。ユーザーにすでに MFA メソッドがある場合はスキップされます。

| プロパティ    | 値               |
| -------- | --------------- |
| 必須       | false           |
| 既定値      | False           |
| 型        | ブール値            |
| ポータルの表示名 | パスワードをリセットしますか? |

[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/user/userinfo/update-user.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.
