Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Để biết danh sách các phương thức cho tài nguyên này, hãy xem ở cuối trang.
Biểu diễn tài nguyên
Tài nguyên Người dùng đại diện cho một tài khoản liên kết với một doanh nghiệp. Tài khoản có thể dành riêng cho một thiết bị hoặc cho một người dùng cá nhân (người sau đó có thể sử dụng tài khoản trên nhiều thiết bị). Tài khoản đó có thể chỉ cung cấp quyền truy cập vào Managed Google Play hoặc các dịch vụ khác của Google, tuỳ thuộc vào mô hình nhận dạng:
Mô hình nhận dạng miền do Google quản lý yêu cầu đồng bộ hoá với các nguồn của Tài khoản Google (thông qua primaryEmail).
Mô hình nhận dạng Tài khoản Google Play được quản lý cung cấp một phương tiện linh động để doanh nghiệp tạo tài khoản người dùng hoặc tài khoản thiết bị khi cần. Các tài khoản này cung cấp quyền truy cập vào Managed Google Play.
Giá trị nhận dạng duy nhất mà bạn tạo cho người dùng này, chẳng hạn như "user342" hoặc "thành phần số 44418". Đừng sử dụng thông tin nhận dạng cá nhân (PII) cho tài sản này. Phải luôn đặt cho người dùng do EMM quản lý. Không được đặt cho người dùng do Google quản lý.
accountType
string
Loại tài khoản mà người dùng này đại diện. Bạn có thể cài đặt userAccount trên nhiều thiết bị, nhưng deviceAccount chỉ dành cho một thiết bị riêng lẻ. Người dùng do Google quản lý (emmManaged) có thể thuộc một trong hai loại (userAccount, deviceAccount) nhưng người dùng do Google quản lý (googleManaged) luôn là userAccount.
Các giá trị được chấp nhận là:
"deviceAccount"
"userAccount"
displayName
string
Tên sẽ xuất hiện trong giao diện người dùng. Bạn không bắt buộc phải đặt thuộc tính này khi tạo người dùng do EMM quản lý. Nếu bạn đặt thuộc tính này, hãy sử dụng tên chung về tổ chức (chẳng hạn như "Example, Inc.") hoặc tên của bạn (như EMM). Không được sử dụng cho các tài khoản người dùng do Google quản lý.
có thể ghi
id
string
Mã nhận dạng duy nhất cho người dùng.
kind
string
managementType
string
Thực thể quản lý người dùng. Với người dùng googleManaged, nguồn thông tin đáng tin cậy là Google, vì vậy, EMM phải đảm bảo người dùng có Tài khoản Google. Với emmManaged người dùng, EMM sẽ là người chịu trách nhiệm.
Các giá trị được chấp nhận là:
"emmManaged"
"googleManaged"
primaryEmail
string
Địa chỉ email chính của người dùng, ví dụ: "jsmith@example.com". Sẽ luôn được đặt cho người dùng do Google quản lý chứ không phải cho người dùng được quản lý EMM.
Tạo mã xác thực mà ứng dụng chính sách thiết bị có thể dùng để
cấp phép tài khoản người dùng do EMM quản lý trên một thiết bị.
Mã thông báo đã tạo chỉ dùng được một lần và sẽ hết hạn sau vài phút.
Bạn có thể cấp phép cho tối đa 10 thiết bị cho mỗi người dùng.
Cuộc gọi này chỉ hoạt động với các tài khoản do EMM quản lý.
Tài nguyên Người dùng
được chuyển vào phần nội dung của yêu cầu phải bao gồm
accountIdentifier và accountType.
Nếu đã tồn tại một người dùng tương ứng có cùng mã nhận dạng tài khoản,
người dùng sẽ được cập nhật tài nguyên. Trong trường hợp này, chỉ
Bạn có thể thay đổi trường displayName.
Tìm kiếm người dùng theo địa chỉ email chính.
Tính năng này chỉ được hỗ trợ cho người dùng do Google quản lý. Không thể tra cứu mã nhận dạng
cần thiết cho người dùng được quản lý EMM vì mã nhận dạng đã được trả về trong
kết quả của lệnh gọi Users.insert.
Thu hồi quyền truy cập của tất cả các thiết bị hiện được cấp phép cho người dùng. Người dùng
sẽ không thể sử dụng Cửa hàng Play được quản lý trên bất kỳ
thiết bị được quản lý.
Cuộc gọi này chỉ hoạt động với các tài khoản do EMM quản lý.
Sửa đổi tập hợp sản phẩm mà người dùng có quyền truy cập (được gọi là
dưới dạng sản phẩm có trong danh sách cho phép). Chỉ những sản phẩm
đã phê duyệt
hoặc các sản phẩm đã được phê duyệt trước đây (sản phẩm bị thu hồi quyết định phê duyệt)
có thể được đưa vào danh sách cho phép.
Cập nhật thông tin chi tiết của người dùng do EMM quản lý.
Chỉ có thể sử dụng với người dùng được quản lý bởi EMM (không phải người dùng do Google quản lý).
Truyền chi tiết mới vào
Người dùng
trong nội dung yêu cầu. Chỉ trường displayName
chỉnh sửa được. Bạn phải bỏ đặt các trường khác hoặc đặt giá trị
giá trị hiện đang hoạt động.
[null,null,["Cập nhật lần gần đây nhất: 2024-08-19 UTC."],[[["\u003cp\u003eA Users resource represents an enterprise account that can be device- or individual-specific, granting access to managed Google Play and potentially other Google services based on the chosen identity model.\u003c/p\u003e\n"],["\u003cp\u003eTwo identity models are available: Google-managed domain identity (requiring synchronization with Google accounts) and managed Google Play Accounts (allowing dynamic creation of user/device accounts for Play access).\u003c/p\u003e\n"],["\u003cp\u003eEMM-managed users have unique identifiers and account types, while Google-managed users rely on primary email addresses for identification.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can manage users using various methods like creating, deleting, retrieving details, and controlling device access, with options varying based on management type.\u003c/p\u003e\n"],["\u003cp\u003eSome methods, like \u003ccode\u003egetAvailableProductSet\u003c/code\u003e and \u003ccode\u003esetAvailableProductSet\u003c/code\u003e, are deprecated and will be inaccessible after September 30, 2025, with alternative recommendations available.\u003c/p\u003e\n"]]],[],null,["# Users\n\n\u003cbr /\u003e\n\nFor a list of [methods](#methods) for this resource, see the end of this page.\n\nResource representations\n------------------------\n\nA Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to managed Google Play only, or to other Google services, depending on the identity model:\n\n- The Google managed domain identity model requires synchronization to Google account sources (via `primaryEmail`).\n- The managed Google Play Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to managed Google Play.\n\n\u003cbr /\u003e\n\n```text\n{\n \"kind\": \"androidenterprise#user\",\n \"id\": string,\n \"managementType\": string,\n \"accountType\": string,\n \"primaryEmail\": string,\n \"accountIdentifier\": string,\n \"displayName\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\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| `displayName` | `string` | The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use something generic about the organization (such as \"Example, Inc.\") or your name (as EMM). Not used for Google-managed user accounts. | writable |\n| `id` | `string` | The unique ID for the user. | |\n| `kind` | `string` | | |\n| `managementType` | `string` | The entity that manages the user. With `googleManaged` users, the source of truth is Google so EMMs have to make sure a Google Account exists for the user. With `emmManaged` users, the EMM is in charge. \u003cbr /\u003e Acceptable values are: - \"`emmManaged`\" - \"`googleManaged`\" | |\n| `primaryEmail` | `string` | The user's primary email address, for example, \"jsmith@example.com\". Will always be set for Google managed users and not set for EMM managed users. | |\n\nMethods\n-------\n\n[delete](/android/work/play/emm-api/v1/users/delete)\n: Deleted an EMM-managed user.\n\n[generateAuthenticationToken](/android/work/play/emm-api/v1/users/generateAuthenticationToken)\n: Generates an authentication token which the device policy client can use to\n provision the given EMM-managed user account on a device.\n The generated token is single-use and expires after a few minutes.\n\n \u003cbr /\u003e\n\n\n You can provision a maximum of 10 devices per user.\n\n \u003cbr /\u003e\n\n\n This call only works with EMM-managed accounts.\n\n[get](/android/work/play/emm-api/v1/users/get)\n: Retrieves a user's details.\n\n[getAvailableProductSet](/android/work/play/emm-api/v1/users/getAvailableProductSet)\n:\n | **Deprecated:** New integrations cannot use this method and can refer to our [new\n | recommendations](/android/work/deprecations#recommended_alternative_2). \n | **This method will no longer be accessible by\n | anyone after September 30, 2025.**\n\n Retrieves the set of products a user is entitled to access.\n\n[insert](/android/work/play/emm-api/v1/users/insert)\n: Creates a new EMM-managed user.\n\n \u003cbr /\u003e\n\n\n The [Users](/android/work/play/emm-api/v1/users) resource\n passed in the body of the request should include an\n `accountIdentifier` and an `accountType`.\n\n If a corresponding user already exists with the same account identifier,\n the user will be updated with the resource. In this case only the\n `displayName` field can be changed.\n\n[list](/android/work/play/emm-api/v1/users/list)\n: Looks up a user by primary email address.\n This is only supported for Google-managed users. Lookup of the id is not\n needed for EMM-managed users because the id is already returned in the\n result of the Users.insert call.\n\n[revokeDeviceAccess](/android/work/play/emm-api/v1/users/revokeDeviceAccess)\n: Revokes access to all devices currently provisioned to the user. The user\n will no longer be able to use the managed Play store on any of their\n managed devices.\n\n \u003cbr /\u003e\n\n\n This call only works with EMM-managed accounts.\n\n[setAvailableProductSet](/android/work/play/emm-api/v1/users/setAvailableProductSet)\n:\n | **Deprecated:** New integrations cannot use this method and can refer to our [new\n | recommendations](/android/work/deprecations#recommended_alternative_2). \n | **This method will no longer be accessible by\n | anyone after September 30, 2025.**\n\n Modifies the set of products that a user is entitled to access (referred to\n as *whitelisted* products). Only products that are\n [approved](/android/work/play/emm-api/v1/products/approve)\n or products that were previously approved (products with revoked approval)\n can be whitelisted.\n\n[update](/android/work/play/emm-api/v1/users/update)\n: Updates the details of an EMM-managed user.\n\n \u003cbr /\u003e\n\n\n Can be used with EMM-managed users only (not Google managed users).\n Pass the new details in the\n [Users](/android/work/play/emm-api/v1/users)\n resource in the request body. Only the `displayName` field\n can be changed. Other fields must either be unset or have the\n currently active value."]]