重要資訊:我們目前不接受新的 Play EMM API 註冊。
瞭解詳情。
升級使用者帳戶
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
在裝置上升級使用者帳戶時,系統會將 Google Play 管理版帳戶遷移至 Google 管理帳戶。這個程序會將使用者的身分從以裝置為中心的非個人帳戶,轉移至與公司 Google 身分相關聯的帳戶。這個公司身分連結是基礎,可讓所有 Google 服務提供更完善且整合度更高的使用者體驗。
總覽
本次升級的主要目標是為客戶提供強化功能,例如透過 Google 管理控制台改善使用者管理、提升安全性,以及存取 Google 服務和 Gemini 等 AI 功能。
升級使用者帳戶的主要優點:
適用於所有 Google 服務:與代管 Google Play 帳戶不同,這項新身分可順暢搭配所有 Google 服務使用,包括 Google 雲端硬碟、文件和 Meet。如果 IT 管理員啟用這項功能,您也可以備份裝置資料。
流暢的使用者體驗:透過單一登入 (SSO) 整合,使用者會自動登入公司環境和所有 Google 服務,例如 Gmail。
直接控管身分:機構可透過手動、自動或同步處理方法,直接控管身分生命週期。
使用者熟悉的 ID:新帳戶會使用使用者已知的電子郵件地址,方便使用者辨識。
帳戶升級
如要將先前透過 Google Play 管理版帳戶註冊的裝置升級為受管理 Google 帳戶,您可以採用類似標準裝置註冊流程的設定,但權杖建立和設定後動作有重大差異。
1. 建立帳戶升級的註冊權杖
這個步驟需要建立專為帳戶遷移作業設定的註冊憑證。權杖會強制執行 Google 驗證,將裝置連結至受管理 Google 帳戶。
- 呼叫 Play EMM API 的
EnrollmentTokens.create()
方法。
- 將
enrollmentTokenType
設為 USER_DEVICE
。
- 在
googleAuthenticationOptions
物件中:
- 將
authenticationRequirement
設為 REQUIRED
。因此註冊時必須使用 Google 帳戶。
- 將
requiredAccountEmail
設為目標受管理 Google 帳戶的電子郵件地址。這會引導裝置上的流程,提示使用者提供特定帳戶,或是在裝置上已有該帳戶時,在無須進一步驗證使用者身分的情況下,以無聲模式執行升級。
2. 在裝置上啟動帳戶設定並處理驗證
取得註冊權杖後 (例如由 EMM 解決方案推送,或透過使用者介面提供),您可以使用標準裝置註冊的相同 AccountSetupClient.startAccountSetup()
整合功能新增或關聯帳戶。
- 如果裝置上已存在
requiredAccountEmail
中指定的受管理 Google 帳戶,系統就不會提示使用者驗證身分,並會自動進行升級。
- 如果帳戶不存在,系統會強制使用者以必要電子郵件登入。由於權杖中的
authenticationRequirement
設為 REQUIRED
,因此系統不會提供略過 Google 驗證的選項。
3. 完成管理並移除舊帳戶
使用 AccountSetupListener
收到 ADDED_ACCOUNT
狀態,且 EMM 後端已成功將裝置與新的受管理 Google 帳戶建立關聯後,請確認政策是否已套用至新使用者。建議您先套用目標使用者的裝置政策,再使用 Devices.update
API 啟動升級程序,確保順利完成轉換。如要呼叫 Devices.update
,您需要先呼叫 Users.list
,才能擷取受管理 Google 帳戶的使用者 ID。
您必須從裝置中移除舊帳戶。
為此,DPC 支援程式庫提供了 dpcSupport.removeAllAndroidForWorkAccounts()
。
4. 啟用 Google 服務
如果知識工作者裝置使用受管理 Google 帳戶,請記得在裝置符合企業政策後撥打 Devices.setState()
。這是啟用裝置的必要步驟,可讓使用者完整存取 Google 服務。
特殊用途
帳戶升級程序在下列特殊用途中也很有幫助:
套件和第三方註冊服務
帳戶升級流程會透過下列程序,簡化套件和第三方註冊服務:
初始程序:裝置註冊為無使用者裝置。系統會自動新增受管理的 Google Play 帳戶,並套用一組預設政策。
政策更新:EMM 會將新政策套用至裝置。這項政策規定使用者必須先登入,才能使用裝置。接著,裝置就會交付給使用者。
使用者升級:終端使用者開啟裝置電源時,系統會提示他們登入。這項操作會觸發帳戶升級流程,屆時代管 Google 帳戶會取代代管 Google Play 帳戶。
最後清除:EMM 會從裝置中移除舊的受管理 Google Play 帳戶。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-25 (世界標準時間)。
[null,null,["上次更新時間:2025-08-25 (世界標準時間)。"],[],[],null,["# Upgrade user accounts\n\nUpgrading a user account on a device involves a migration from a\n**managed Google Play Account** to a **managed Google Account**. This process\nshifts the user's identity from a device-centric, non-personal\naccount to one that is tied to their corporate Google identity. This link to a\ncorporate identity is the foundation for an improved and more integrated user\nexperience across all Google services.\n\nOverview\n--------\n\nThe primary goal of this upgrade is to provide customers with enhanced features,\nsuch as improved user management through the Google Admin console, stronger\nsecurity, and access to Google services and AI capabilities like Gemini.\n\n### Key benefits of upgrading user accounts:\n\n- **Works with all Google services:** Unlike managed Google Play Accounts,\n this new identity works seamlessly with all Google services, including Google\n Drive, Docs, and Meet. It also supports device backup when enabled by the IT\n admin.\n\n- **Seamless user experience:** Through single sign-on (SSO) integration, users\n are automatically signed in to their corporate environment and all their Google\n services, such as Gmail.\n\n- **Direct identity control:** The organization can directly control the\n identity lifecycle through manual, automated, or sync-based methods.\n\n- **Familiar user identifier:** For better visibility, the new account uses the\n same email address that the user already knows and uses.\n\nAccount upgrade\n---------------\n\nTo upgrade a device previously enrolled with a **managed Google Play Account**\nto a **managed Google Account**, you can adopt a setup similar to the\nstandard device enrollment flow, but with key differences in token creation\nand post-setup actions.\n\n### 1. Create an enrollment token for account upgrade\n\nThis step involves creating an enrollment token specifically configured for\naccount migration. The token will force Google authentication to link the\ndevice to a managed Google Account.\n\n- Call the `EnrollmentTokens.create()` method of the Play EMM API.\n- Set `enrollmentTokenType` to `USER_DEVICE`.\n- Within the `googleAuthenticationOptions` object:\n- Set `authenticationRequirement` to `REQUIRED`. This makes a Google account mandatory for enrollment.\n- Set `requiredAccountEmail` to the email address of the target managed Google Account. This guides the on-device flow to either prompt the user for this specific account or, if it already exists on the device, perform the upgrade silently without further user authentication.\n\n### 2. Initiate account setup and handle authentication on the device\n\nOnce the enrollment token is available (e.g., pushed by your EMM solution\nor provided using a user interface), you can use the same\n[`AccountSetupClient.startAccountSetup()`](/android/management/reference/amapi/com/google/android/managementapi/setupactions/AccountSetupClient#startAccountSetup(android.content.Context,%20java.lang.String))\nintegration from standard device enrollment to add or associate the account.\n\n- If the managed Google Account specified in `requiredAccountEmail` already exists on the device, the user won't be prompted to authenticate, and the upgrade will proceed silently.\n- If the account does not exist, the user will be forced to sign in with the required email. Because `authenticationRequirement` is set to `REQUIRED` in the token, the option to skip Google authentication won't be available.\n\n### 3. Finalize management and remove the old account\n\nAfter the `ADDED_ACCOUNT` state is received using your `AccountSetupListener`\nand your EMM backend has successfully associated the device with the new managed\nGoogle Account, verify your policies are applied to the new user. We recommend\napplying the target user's device policies *before* initiating the upgrade using\nthe [`Devices.update`](/android/work/play/emm-api/v1/devices/update) API for a\nsmooth transition. You can retrieve the User ID of the managed Google Account,\nwhich is needed in order to call\n[`Devices.update`](/android/work/play/emm-api/v1/devices/update), by calling\n[`Users.list`](/android/work/play/emm-api/v1/users/list).\n\nRemoving the old account from the device is a required step.\nThe DPC Support Library provides `dpcSupport.removeAllAndroidForWorkAccounts()`\nfor this purpose.\n\n### 4. Enable Google services\n\nFor knowledge worker devices with a managed Google Account, remember to\ncall [`Devices.setState()`](/android/work/play/emm-api/v1/devices/setState)\nonce the device is compliant with your enterprise policies. This is necessary to\nactivate the device and grant the user full access to Google services.\n\nSpecial use case\n----------------\n\nThe account upgrade process is also beneficial in the following special\nuse case:\n\n*** ** * ** ***\n\n### Kitting and third-party enrollment services\n\nThe account upgrade flow simplifies **kitting** and **third-party\nenrollment services** by the following process:\n\n1. **Initial process:** A device is enrolled as a userless\n device. This automatically adds a managed Google Play Account and\n applies a set of default policies.\n\n2. **Policy update:** The EMM applies a new policy to the device. This policy\n requires a user login before the device can be used. The device is then\n delivered to the end user.\n\n3. **User upgrade:** When the end user powers on the device, they are\n prompted to sign in. This action triggers the account upgrade flow,\n where their managed Google Account replaces the managed Google Play\n Account.\n\n4. **Final cleanup:** The EMM removes the old managed Google\n Play Account from the device."]]