[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThe Zero-touch iframe enables embedding zero-touch enrollment directly within your EMM console for streamlined device configuration with your DPC.\u003c/p\u003e\n"],["\u003cp\u003eIT admins can link their zero-touch accounts to their enterprise through the iframe, creating a default zero-touch profile for devices.\u003c/p\u003e\n"],["\u003cp\u003eThe iframe allows IT admins to manage linked zero-touch accounts, including viewing, linking, and unlinking accounts, along with default profile and support information.\u003c/p\u003e\n"],["\u003cp\u003eDevices within linked zero-touch accounts are automatically configured with the enterprise's default zero-touch profile, viewable and manageable through the zero-touch console.\u003c/p\u003e\n"],["\u003cp\u003eEmbedding the iframe involves generating a web token using the \u003ccode\u003eEnterprises.createWebToken\u003c/code\u003e API call and rendering the iframe with necessary parameters like the token, DPC ID, and optional DPC extras.\u003c/p\u003e\n"]]],[],null,["# Zero-touch iframe\n\nWith the **Zero-touch iframe**, you can embed zero-touch directly into your EMM\nconsole to allow customers to easily configure zero-touch enabled devices with\nyour DPC. The iframe allows you to configure the DPC and provisioning extras\nused during zero-touch device setup. \n**Figure 1.** The zero-touch iframe showing the zero-touch home page.\n\nThe first time an IT admin opens the iframe, they'll be prompted to link their\nzero-touch account to their enterprise.\n\nOnce an IT admin has linked a zero-touch account to their enterprise, the iframe\nwill display the list of linked zero-touch accounts. They can also see the\ndefault zero-touch configuration set for enterprise devices.\n\n*** ** * ** ***\n\nFeatures\n--------\n\nThis section describes the features available in the Zero-touch iframe. For\ninformation on how to embed the iframe and implement these features, see\n[Add the iframe to your console](#add_the_iframe_to_your_console).\n\n### Link a zero-touch account to an enterprise\n\nThe iframe allows an IT admin to link their zero-touch account and their\nenterprise. As part of this process, the IT admin creates a default zero-touch\nprofile to be used for devices inside of the zero-touch account. This flow is\ndetailed below.\n\nIf the IT admin has not previously linked a zero-touch account to their\nenterprise, they are prompted to do so when they open the iframe. \n**Figure 2.** Start of the zero-touch iframe linking flow.\n\nThe IT admin sees a list of zero-touch accounts and can choose one or more to\nlink to their enterprise. \n**Figure 3.** Account list screen \n**Figure 4.** Configuration screen\n\nThe Zero-touch iframe automatically generates a zero-touch configuration. This\nconfiguration is not modifiable by the IT admin. You can customize the DPC or\nprovisioning extras to be used in this configuration. For more information on\nhow to do this, see [iframe URL parameters](#iframe_url_parameters). \n**Figure 5.** Support info entry screen\n\nThe IT admin enters support information that appears when zero-touch enabled\ndevices are set up. When the IT admin clicks \"save\", the linking process\ncompletes and the user is redirected to the zero-touch iframe home page, where\nthey can manage their linked accounts.\n\n### View and manage linked zero-touch accounts\n\nThe iframe allows an IT admin to view their linked zero-touch accounts and their\ndefault zero-touch profile and support information. In addition, they can link\nadditional zero-touch accounts and unlink zero-touch accounts.\n\nSee Figure 1 for an example view of the Zero-touch iframe home page.\n\n### Viewing devices for linked accounts in the zero-touch portal\n\nWhen a zero-touch account is linked to an enterprise, all devices in the\nzero-touch account that are not configured with a zero-touch profile are\nautomatically configured with the Enterprise zero-touch profile.\n\nInside of the zero-touch console, these devices are shown with the \"Enterprise\ndefault profile\" configuration. The IT admin can set and unset this profile on\nany device in the zero-touch account. However, the profile cannot be modified.\n\nIf the zero-touch account is unlinked, all devices configured with the\n\"Enterprise default profile\" will have this profile unset. These devices can be\nconfigured with a different profile.\n\n*** ** * ** ***\n\nAdd the iframe to your console\n------------------------------\n\n### Step 1: Generate a web token\n\nTo generate a web token that identifies the enterprise, call\n[`Enterprises.createWebToken`](/android/work/play/emm-api/v1/enterprises/createWebToken).\nThe following example shows how to retrieve the token using the\n[Google Play EMM API Client Library for Java](/api-client-library/java/apis/androidenterprise/v1).\nNote that the Zero-touch iframe must be enabled separately from the managed Play\niframe. \n\n```css+lasso\npublic AdministratorWebToken getAdministratorWebToken(\n String enterpriseId) throws IOException {\n AdministratorWebTokenSpec tokenSpec = new AdministratorWebTokenSpec();\n tokenSpec.setParent(\"https://my-emm-console.com\");\n tokenSpec.setZeroTouch(new AdministratorWebTokenSpecZeroTouch());\n return androidEnterprise\n .enterprise()\n .createWebToken(enterpriseId, tokenSpec)\n .execute();\n}\n```\n\nYou need to include the returned token, along with other parameters, when\nrendering the iframe in your console.\n\n### Step 2: Render the iframe\n\nHere's an example of how to render the Zero-touch iframe: \n\n \u003cscript src=\"https://apis.google.com/js/api.js\"\u003e\u003c/script\u003e\n \u003cdiv id=\"container\"\u003e\u003c/div\u003e\n \u003cscript\u003e\n gapi.load('gapi.iframes', function() {\n var options = {\n 'url': 'https://enterprise.google.com/android/zero-touch/embedded/companyhome?token=web_token&dpcId=com.example.app',,\n 'where': document.getElementById('container'),\n 'attributes': { style: 'width: 600px; height:1000px', scrolling: 'yes'}\n }\n\n var iframe = gapi.iframes.getContext().openChild(options);\n });\n \u003c/script\u003e\n\nThis code generates an iframe inside the container div. Attributes to be applied\nto the iframe tag can be set with the 'attributes' option, as above.\n\n### iframe URL parameters\n\nThe table below lists all the available parameters for the iframe that can be\nadded to the URL as URL parameters, e.g: \n\n```text\nhttps://enterprise.google.com/android/zero-touch/embedded/companyhome?token=TOKEN&dpcId=com.afwsamples.testdpc\n```\n\n| Parameter | Required | Description |\n|-------------|----------|--------------------------------------------------------------------------------------------------------------------------------------|\n| `token` | Yes | The token returned from [Step 1](#step_1_generate_a_web_token). |\n| `dpcId` | Yes | The package name of the DPC app, i.e. `com.example.app`. Setting this is required. The DPC must be associated with your EMM already. |\n| `dpcExtras` | No | URL-encoded JSON object containing provisioning extras. These are passed to the DPC during device setup. |\n\nExample URL, assuming:\n\n- Web Token from API: `abcde`\n- DPC: `com.example`\n- DPC Extras: `{\"server\":\"www.example.com\",\"enterprise\":\"example_id\"}`\n\n```scdoc\nhttps://enterprise.google.com/android/zero-touch/embedded/companyhome?token=abcde&dpcId=com.example&dpcExtras={“server”:“www.example.com”,“enterprise”:”example_id”}\n```\n\nURL encoded, this URL would be: \n\n```scdoc\nhttps://enterprise.google.com/android/zero-touch/embedded/companyhome?token=abcde&dpcId=com.example&dpcExtras=%7B%E2%80%9Cserver%E2%80%9D%3A%E2%80%9Cwww.example.com%E2%80%9D%2C%E2%80%9Centerprise%E2%80%9D%3A%E2%80%9Dexample_id%E2%80%9D%7D\n```"]]