Users: insert

  • Creating a new EMM-managed user requires authorization and a POST request to the specified URL.

  • The request body must include a Users resource withaccountIdentifier andaccountType.

  • If a user with the same account identifier exists, the existing user will be updated, with only thedisplayName field being changeable.

  • The request requires authorization with thehttps://www.googleapis.com/auth/androidenterprise scope.

Note:Requiresauthorization.

Creates a new EMM-managed user.

TheUsers resourcepassed in the body of the request should include anaccountIdentifier and anaccountType.

If a corresponding user already exists with the same account identifier,the user will be updated with the resource. In this case only thedisplayName field can be changed.

Request

HTTP request

POST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/users

Parameters

Parameter nameValueDescription
Path parameters
enterpriseIdstring The ID of the enterprise.

Authorization

This request requires authorization with the following scope:

Scope
https://www.googleapis.com/auth/androidenterprise

For more information, see theauthentication and authorization page.

Request body

In the request body, supply aUsers resource with the following properties:

Property nameValueDescriptionNotes
Required Properties
accountIdentifierstringA 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.
accountTypestringThe type of account that this user represents. AuserAccount can be installed on multiple devices, but adeviceAccount 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 auserAccount.

Acceptable values are:
  • "deviceAccount"
  • "userAccount"

Response

If successful, this method returns aUsers resource in the response body.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-31 UTC.