privateStringcreateEnterprise(AndroidManagementandroidManagementClient)throwsIOException{SignupUrlsignupUrl=androidManagementClient.signupUrls().create().setProjectId("myProject").setCallbackUrl("https://example.com/myEmmConsole").execute();StringenterpriseToken=displayUrlToAdmin(signupUrl.getUrl());Enterpriseenterprise=androidManagementClient.enterprises().create(newEnterprise()).setProjectId("myProject").setSignupUrlName(signupUrl.getName()).setEnterpriseToken(enterpriseToken).execute();returnenterprise.getName();}/** * Displays the signup URL to the admin and returns the enterprise token which * is generated after the admin goes through the signup flow. This functionality * must be implemented by your management console. */privateStringdisplayUrlToAdmin(Stringurl){...}
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eAn Enterprise resource in Android Management binds an organization to your EMM solution, enabling management of devices and policies.\u003c/p\u003e\n"],["\u003cp\u003eEMM partners must utilize the Google Play EMM API to establish this enterprise binding for organizations.\u003c/p\u003e\n"],["\u003cp\u003eCreating an enterprise binding involves a three-step process: retrieving a signup URL, having the IT admin complete signup, and finally, using the API to create the binding with specific settings like color and logo.\u003c/p\u003e\n"],["\u003cp\u003eMultiple enterprise bindings can be created for a single organization to accommodate different departments or regions, offering flexibility in management.\u003c/p\u003e\n"]]],["EMM partners managing devices via the Google Play EMM API must use it to create enterprise bindings. This process involves: 1) Retrieving a sign-up URL using `signupUrls.create`, specifying a `callbackUrl` and `projectId`. 2) An IT admin uses the URL to sign up, receiving an `enterpriseToken`. 3) Calling `enterprises.create` to bind, setting display options like `primaryColor`, `enterpriseDisplayName`, and `logo`, using the generated `enterpriseToken` and `SignupUrlName`. Multiple bindings per organization are allowed.\n"],null,["# Create an enterprise binding\n\n| **Note:** EMM partners intending to manage devices for an organization using the Google Play EMM API **must use** the Google Play EMM API to create the enterprise binding. For more information, see the [Guide for Existing EMM Partners](/android/management/existing-emms).\n\nAn [`Enterprise`](/android/management/reference/rest/v1/enterprises)\nresource binds an organization to your Android Management solution.\n[`Devices`](/android/management/reference/rest/v1/enterprises.devices)\nand [`Policies`](/android/management/reference/rest/v1/enterprises.policies)\nboth belong to an enterprise. Multiple enterprise bindings can be\nassociated with a single organization. For example, an organization may want\nseparate enterprise bindings for its different departments or regions.\n\nThe basic steps on how to create an enterprise binding are described in the\n[Quickstart guide](/android/management/quickstart#create_an_enterprise).\nThis page outlines the process in more detail.\n\n### 1. Retrieve the sign up url\n\nCall [`signupUrls.create`](/android/management/reference/rest/v1/signupUrls/create)\nto retrieve the sign up URL and specify the following two parameters:\n\n- `callbackUrl`: An https URL the setup wizard redirects to after sign-up is complete. This is typically your management console.\n- `projectId`: Your project ID.\n\nThe response contains a `url` and `name`. Open the `url` and note the `name`.\n\n### 2. Enterprise IT admin completes the sign up flow\n\nThe `url` guides the IT admin through the sign-up process. If your EMM has not\nbeen enabled for the BTE sign-up flow, then advise the IT admin that they need a\nGmail account that's not already associated with an enterprise binding.\nAfter successfully registering their organization, the sign-up flow redirects to\nyour `callbackUrl`. An `enterpriseToken` is appended to the\n`callbackUrl`.\n\n#### Example\n\n```\nhttps://example.com/?enterpriseToken=EAH2pBTtGCs2K28dqhq5uw0uCyVzYMqGivap4wdlH7KNlPtCmlC8uyl\n```\n\n### 3. Create an enterprise binding\n\nTo create an enterprise binding, call\n[`enterprises.create`](/android/management/reference/rest/v1/enterprises/create).\nIn addition to creating a unique enterprise binding ID, this method allows you\nto define certain binding-specific settings. For instance, you can set the\npredominant color displayed during device provisioning (`primaryColor`), along\nwith the name or title (`enterpriseDisplayName`) and logo\n(`logo`) that's shown to end users.\n\n### Example\n\nThe following example uses the [Java client library]() to create an enterprise\nbinding and return its name. See the [sample](/android/management/sample-app)\npage for more details about using the library. \n\n```carbon\nprivate String createEnterprise(AndroidManagement androidManagementClient)\n throws IOException {\n SignupUrl signupUrl =\n androidManagementClient\n .signupUrls()\n .create()\n .setProjectId(\"myProject\")\n .setCallbackUrl(\"https://example.com/myEmmConsole\")\n .execute();\n\n String enterpriseToken = displayUrlToAdmin(signupUrl.getUrl());\n\n Enterprise enterprise =\n androidManagementClient\n .enterprises()\n .create(new Enterprise())\n .setProjectId(\"myProject\")\n .setSignupUrlName(signupUrl.getName())\n .setEnterpriseToken(enterpriseToken)\n .execute();\n\n return enterprise.getName();\n}\n\n/**\n * Displays the signup URL to the admin and returns the enterprise token which\n * is generated after the admin goes through the signup flow. This functionality\n * must be implemented by your management console.\n */\nprivate String displayUrlToAdmin(String url) {\n ...\n}\n```"]]