重要: Play EMM API の新しい登録受け付けは終了しました。
詳細
Users: insert
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
EMM の管理対象ユーザーを新規作成します。
ユーザー リソース
渡す必要があります。
accountIdentifier
と accountType
。
対応するユーザーが同じアカウント ID ですでに存在する場合、
リソースで更新されます。この例では
displayName
フィールドは変更できます。
リクエスト
HTTP リクエスト
POST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/users
パラメータ
パラメータ名 |
値 |
説明 |
パスパラメータ |
enterpriseId |
string |
企業の ID。
|
承認
このリクエストには、次のスコープによる認証が必要です。
スコープ |
https://www.googleapis.com/auth/androidenterprise |
詳細については、認証と認可のページをご覧ください。
リクエスト本文
リクエストの本文には、以下のプロパティを使用してユーザー リソースを指定します。
プロパティ名 |
値 |
説明 |
メモ |
必須プロパティ |
accountIdentifier |
string |
このユーザーに対して作成する一意の識別子(「user342」など)または「asset#44418」を入力します。このプロパティに個人情報(PII)を使用しないでください。EMM の管理対象ユーザーに対しては常に設定する必要があります。Google が管理するユーザーに対しては設定されません。 |
|
accountType |
string |
このユーザーが代表するアカウントの種類。userAccount は複数のデバイスにインストールできますが、deviceAccount は 1 つのデバイスに固有のものです。EMM の管理対象ユーザー(emmManaged )は、いずれかのタイプ(userAccount 、deviceAccount )になりますが、Google の管理対象ユーザー(googleManaged )は常に userAccount です。
指定できる値は次のとおりです。
<ph type="x-smartling-placeholder"></ph>
- "
deviceAccount "
- 「
userAccount 」
|
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eCreates or updates an EMM-managed user within a specified enterprise.\u003c/p\u003e\n"],["\u003cp\u003eRequires an \u003ccode\u003eaccountIdentifier\u003c/code\u003e and \u003ccode\u003eaccountType\u003c/code\u003e to define the user.\u003c/p\u003e\n"],["\u003cp\u003eUses a POST request to the \u003ccode\u003e/enterprises/enterpriseId/users\u003c/code\u003e endpoint.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003edisplayName\u003c/code\u003e is the only field that can be updated for existing users.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidenterprise\u003c/code\u003e scope is necessary.\u003c/p\u003e\n"]]],[],null,["# Users: insert\n\n| **Note:** Requires [authorization](#auth).\n\nCreates a new EMM-managed user.\n\n\u003cbr /\u003e\n\n\nThe [Users](/android/work/play/emm-api/v1/users) resource\npassed in the body of the request should include an\n`accountIdentifier` and an `accountType`.\n\nIf a corresponding user already exists with the same account identifier,\nthe user will be updated with the resource. In this case only the\n`displayName` field can be changed.\n\n\u003cbr /\u003e\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/users\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|---------------------------|\n| **Path parameters** |||\n| `enterpriseId` | `string` | The ID of the enterprise. |\n\n### Authorization\n\nThis request requires authorization with the following scope:\n\n| Scope |\n|-----------------------------------------------------|\n| `https://www.googleapis.com/auth/androidenterprise` |\n\nFor more information, see the [authentication and authorization](/android/work/play/emm-api/v1/how-tos/authorizing) page.\n\n### Request body\n\nIn the request body, supply a [Users resource](/android/work/play/emm-api/v1/users#resource) with the following properties:\n\n| Property name | Value | Description | Notes |\n|---------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| **Required Properties** ||||\n| `accountIdentifier` | `string` | A unique identifier you create for this user, such as \"user342\" or \"asset#44418\". Do not use personally identifiable information (PII) for this property. Must always be set for EMM-managed users. Not set for Google-managed users. | |\n| `accountType` | `string` | The type of account that this user represents. A `userAccount` can be installed on multiple devices, but a `deviceAccount` is specific to a single device. An EMM-managed user (`emmManaged`) can be either type (`userAccount`, `deviceAccount`), but a Google-managed user (`googleManaged`) is always a `userAccount`. \u003cbr /\u003e Acceptable values are: - \"`deviceAccount`\" - \"`userAccount`\" | |\n\nResponse\n--------\n\nIf successful, this method returns a [Users resource](/android/work/play/emm-api/v1/users#resource) in the response body."]]