Users: insert

创建新的 EMM 管理的用户。

在请求正文中传递的 Users 资源应包含 accountIdentifieraccountType

如果已存在使用相同帐号标识符的对应用户,则系统会使用资源更新该用户。在这种情况下,只能更改 displayName 字段。

请求

HTTP 请求

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

参数

参数名称 说明
路径参数
enterpriseId string 企业 ID。

授权

此请求需要获得以下范围的授权:

范围
https://www.googleapis.com/auth/androidenterprise

如需了解详情,请参阅身份验证和授权页面。

请求正文

在请求正文中,提供具有以下属性的 Users 资源

属性名称 说明 备注
必需属性
accountIdentifier string 您为此用户创建的唯一标识符,例如“user342”或“asset#44418”。请勿为此资源使用个人身份信息 (PII)。必须始终为 EMM 管理的用户设置此值。不适用于由 Google 管理的用户。
accountType string 此用户代表的帐号类型。一个 userAccount 可以安装在多台设备上,但 deviceAccount 只适用于单个设备。EMM 管理的用户 (emmManaged) 可以是类型(userAccountdeviceAccount),但 Google 管理的用户 (googleManaged) 始终是 userAccount

可接受的值:
  • deviceAccount
  • userAccount

响应

如果成功,此方法将在响应正文中返回 Users 资源