EMM 統合ガイド

このガイドは、企業向けモバイル管理(EMM)プロバイダが コンソールにゼロタッチ登録できます。 以下では、登録の詳細や、 DPC(Device Policy Controller)によるデバイスのプロビジョニングを支援します。DPC をお持ちの場合は デバイスのプロビジョニングに関するベスト プラクティスと、 必要があります。

IT 管理者向けの機能

カスタマー API を使用して、IT 管理者がゼロタッチ登録を直接設定できるようにします。 できます。IT 管理者がコンソールで行う作業には、次のようなものがあります。

  • 以下に基づいてゼロタッチ登録の設定を作成、編集、削除する モバイルポリシーも参照できます
  • デフォルト構成を設定して、DPC が今後追加されるデバイスをプロビジョニングするように 組織による購入です。
  • デバイスに個別の設定を適用する、またはゼロタッチからデバイスを削除する 登録できます。

ゼロタッチ登録について詳しくは、 概要

前提条件

EMM コンソールにゼロタッチ登録を追加する前に、 ソリューションは以下をサポートしています。

  • EMM ソリューションで会社所有の Android 8.0 以降(Google Pixel 7.1 以降)をプロビジョニングする必要がある 管理できます。会社所有の Android 10 以降のデバイスは 完全管理対象または仕事用プロファイルとしてプロビジョニングされている。
  • ゼロタッチ登録では DPC が自動的にダウンロード、インストールされるため、 DPC は Google Play から入手可能である必要があります。対応する DPC のリストは IT 管理者が Customer API またはポータルを使用して構成できます。送信 EMM プロバイダ コミュニティからのサービス変更リクエスト DPC をリストに追加します
  • 顧客 API を呼び出すには、顧客がゼロタッチ登録アカウントを持っている必要があります。 販売パートナーが IT 管理者の組織のアカウントを設定するのは、 組織がデバイスを購入します。
  • デバイスが Google モバイル サービス(GMS)に対応している必要があります。 ゼロタッチ登録を行うには、Google Play 開発者サービスを常に有効にする必要があります 必要があります。

API を呼び出す

コンソールのユーザーが(Google アカウントを使用して)API リクエストを承認し、 使用します。このフローは、サービスに対して行う承認とは異なります。 使用できますアプリでこれを行う方法については、承認をご覧ください。

利用規約を処理する

ユーザーは、事前に最新の利用規約に同意しておく必要があります。 API 呼び出し。API 呼び出しが HTTP 403 Forbidden ステータス コードを返し、かつ レスポンスの本文に TosError が含まれている場合は、ユーザーに承認を求める ゼロタッチ登録ポータルにログインして利用規約に同意します。以下の例 は、その方法の一つを示しています。

Java

// Authorize this method call as a user that hasn't yet accepted the ToS.
final String googleApiFormatHttpHeader = "X-GOOG-API-FORMAT-VERSION";
final String googleApiFormatVersion = "2";
final String tosErrorType =
      "type.googleapis.com/google.android.device.provisioning.v1.TosError";

try {
  // Send an API request to list all the DPCs available including the HTTP header
  // X-GOOG-API-FORMAT-VERSION with the value 2. Import the  exception:
  // from googleapiclient.errors import HttpError
  AndroidProvisioningPartner.Customers.Dpcs.List request =
        service.customers().dpcs().list(customerAccount);
  request.getRequestHeaders().put(googleApiFormatHttpHeader, googleApiFormatVersion);
  CustomerListDpcsResponse response = request.execute();
  return response.getDpcs();

} catch (GoogleJsonResponseException e) {
  // Get the error details. In your app, check details exists first.
  ArrayList<Map> details = (ArrayList<Map>) e.getDetails().get("details");
  for (Map detail : details) {
    if (detail.get("@type").equals(tosErrorType)
          && (boolean) detail.get("latestTosAccepted") != true) {
      // Ask the user to accept the ToS. If they agree, open the portal in a browser.
      // ...
    }
  }
  return null;
}

.NET

// Authorize this method call as a user that hasn't yet accepted the ToS.
try
{
    var request = service.Customers.Dpcs.List(customerAccount);
    CustomerListDpcsResponse response = request.Execute();
    return response.Dpcs;
}
catch (GoogleApiException e)
{
    foreach (SingleError error in e.Error?.Errors)
    {
        if (error.Message.StartsWith("The user must agree the terms of service"))
        {
            // Ask the user to accept the ToS. If they agree, open the portal in a browser.
            // ...
        }
    }
}

Python

# Authorize this method call as a user that hasn't yet accepted the ToS.
tos_error_type = ('type.googleapis.com/'
                  'google.android.device.provisioning.v1.TosError')
portal_url = 'https://partner.android.com/zerotouch'

# Send an API request to list all the DPCs available including the HTTP
# header X-GOOG-API-FORMAT-VERSION with the value 2. Import the exception:
# from googleapiclient.errors import HttpError
try:
  request = service.customers().dpcs().list(parent=customer_account)
  request.headers['X-GOOG-API-FORMAT-VERSION'] = '2'
  response = request.execute()
  return response['dpcs']

except HttpError as err:
  # Parse the JSON content of the error. In your app, check ToS exists first.
  error = json.loads(err.content)
  tos_error = error['error']['details'][0]

  # Ask the user to accept the ToS (not shown here). If they agree, then open
  # the portal in a browser.
  if (tos_error['@type'] == tos_error_type
      and tos_error['latestTosAccepted'] is not True):
    if raw_input('Accept the ToS in the zero-touch portal? y|n ') == 'y':
      webbrowser.open(portal_url)

Google API クライアントが詳細なエラー(Java、Python、HTTP)をサポートしているかどうか HTTP ヘッダー X-GOOG-API-FORMAT-VERSION と値を含めます。 リクエストの 2。クライアントが詳細なエラー(.NET および エラー メッセージと一致します。

今後 Google が利用規約を更新した場合、このアプローチを採用すると、 新しい利用規約に再度同意するようユーザーに指示する。

IT 管理者はゼロタッチ登録ポータルを使用して、組織のユーザーの Customer API を通じてこれを提供することはできません。IT 管理者は ポータルを使用してデバイスと構成を管理するリンク先の URL を ポータルから取得するには、次の URL を使用します。

https://partner.android.com/zerotouch

Google アカウントでのログインを求められることを IT 管理者に伝えることをおすすめします。 Google アカウント。

デバイスの登録

ゼロタッチ登録はデバイスを登録するメカニズムであり、NFC に似ています 登録や QR コード登録を行えます。コンソールで管理対象デバイスをサポートする必要があります また、DPC が完全管理対象デバイスモードで実行できる必要があります。

ゼロタッチ登録は、Android 8.0 以降を搭載したサポート対象デバイスで利用できます。 後で説明しますIT 管理者は、サポートされているデバイスをパートナーから購入する必要があります 販売パートナーにお問い合わせください。コンソールでは IT 管理者のどのデバイスが ゼロタッチ登録を利用できるか customers.devices.list の呼び出し。

登録の流れは次のとおりです。

  1. デバイスは初回起動時(または工場出荷後)に Google サーバーにチェックインします ゼロタッチ登録)について説明します。
  2. IT 管理者がデバイスに設定を適用している場合は、ゼロタッチ 登録すると、完全管理対象デバイスの Android 設定ウィザードが実行され、 メタデータを表示します。
  3. ゼロタッチ登録では、Google Play から DPC をダウンロードしてインストールします。
  4. DPC は ACTION_PROVISION_MANAGED_DEVICE インテントと デバイスをプロビジョニングします。

インターネットに接続していない場合は、 できます。ゼロタッチ登録によるデバイスのプロビジョニングについて詳しくは、 後述のプロビジョニングをご覧ください。

デフォルト構成。

ゼロタッチ登録はデフォルトの設定時にほとんどの IT 管理者にとって役立つ 組織で購入する新しいデバイスに適用されます。プロモート設定 デフォルト構成が設定されていない場合は、コンソールからデフォルト構成を変更できます。詳しくは、 customers.configurations.isDefault の値を 組織がデフォルト構成を設定しているかどうかを確認できます。

以下の例は、既存の構成を構成ファイルに default:

Java

// Send minimal data with the request. Just the 2 required fields.
// targetConfiguration is an existing configuration that we want to make the default.
Configuration configuration = new Configuration();
configuration.setIsDefault(true);
configuration.setConfigurationId(targetConfiguration.getConfigurationId());

// Call the API, including the FieldMask to avoid setting other fields to null.
AndroidProvisioningPartner.Customers.Configurations.Patch request = service
      .customers()
      .configurations()
      .patch(targetConfiguration.getName(), configuration);
request.setUpdateMask("isDefault");
Configuration results = request.execute();

.NET

// Send minimal data with the request. Just the 2 required fields.
// targetConfiguration is an existing configuration that we want to make the default.
Configuration configuration = new Configuration
{
    IsDefault = true,
    ConfigurationId = targetConfiguration.ConfigurationId,
};

// Call the API, including the FieldMask to avoid setting other fields to null.
var request = service.Customers.Configurations.Patch(configuration,
                                                     targetConfiguration.Name);
request.UpdateMask = "IsDefault";
Configuration results = request.Execute();

Python

# Send minimal data with the request. Just the 2 required fields.
# target_configuration is an existing configuration we'll make the default.
configuration = {
    'isDefault': True,
    'configurationId': target_configuration['configurationId']}

# Call the API, including the FieldMask to avoid setting other fields to null.
response = service.customers().configurations().patch(
    name=target_configuration['name'],
    body=configuration, updateMask='isDefault').execute()

DPC を参照する

API リソース名 customers.dpcs.name を使用することをおすすめします。 を使用して DPC を識別し、設定で使用する。リソース名には DPC の固有で不変の識別子です発信 customers.dpcs.list: サポートされているすべてのリストを取得します。 DPC。リソース名にはお客様 ID も含まれているため、リストをフィルタします。 最後のパス コンポーネントを使用して、一致する Dpc インスタンスを見つけます。例 以下に、DPC を一致させ、後で使用するために永続化する方法を説明します。 構成:

Java

// Return a customer Dpc instance for the specified DPC ID.
String myDpcIdentifier = "AH6Gbe4aiS459wlz58L30cqbbXbUa_JR9...xMSWCiYiuHRWeBbu86Yjq";
final int dpcIdIndex = 3;
final String dpcComponentSeparator = "/";
// ...
for (Dpc dpcApp : dpcs) {
    // Because the DPC name is in the format customers/{CUST_ID}/dpcs/{DPC_ID}, check the
    // fourth component matches the DPC ID.
    String dpcId = dpcApp.getName().split(dpcComponentSeparator)[dpcIdIndex];
    if (dpcId.equals(myDpcIdentifier)) {
        System.out.format("My DPC is: %s\n", dpcApp.getDpcName());
        return dpcApp;
    }
}
// Handle the case when the DPC isn't found...

.NET

// Return a customer Dpc instance for the specified DPC ID.
var myDpcIdentifer = "AH6Gbe4aiS459wlz58L30cqbbXbUa_JR9...fE9WdHcxMSWCiYiuHRWeBbu86Yjq";
const int dpcIdIndex = 3;
const String dpcComponentSeparator = "/";
// ...
foreach (Dpc dpcApp in dpcs)
{
    // Because the DPC name is in the format customers/{CUST_ID}/dpcs/{DPC_ID}, check the
    // fourth component matches the DPC ID.
    String dpcId = dpcApp.Name.Split(dpcComponentSeparator)[dpcIdIndex];
    if (dpcId.Equals(myDpcIdentifer))
    {
        Console.WriteLine("Matched DPC is: {0}", dpcApp.DpcName);
        return dpcApp;
    }
}
// Handle the case when the DPC isn't found...

Python

# Return a customer Dpc instance for the specified DPC ID.
my_dpc_id = 'AH6Gbe4aiS459wlz58L30cqb...fE9WdHcxMSWCiYiuHRWeBbu86Yjq'
# ...
for dpc_app in dpcs:
  # Because the DPC name is in the format customers/{CUST_ID}/dpcs/{DPC_ID},
  # check the fourth component matches the DPC ID.
  dpc_id = dpc_app['name'].split('/')[3]
  if dpc_id == my_dpc_id:
    return dpc_app

# Handle the case when the DPC isn't found...

コンソールのユーザー インターフェースに DPC の名前を表示する必要がある場合は、 customers.dpcs.dpcName から返された値。

プロビジョニング

この機会を利用して、デバイスのプロビジョニングに優れたユーザー エクスペリエンスを提供してください。 デバイスのプロビジョニングに必要なのはユーザー名とパスワードだけです。 なお、販売パートナーがリモート ユーザーにデバイスを直接発送する場合があります。含める EMM サーバーや組織部門など、他のすべての設定を customers.configuration.dpcExtras

次の JSON スニペットは、構成例の一部を示しています。

{
  "android.app.extra.PROVISIONING_LOCALE": "en_GB",
  "android.app.extra.PROVISIONING_TIME_ZONE": "Europe/London",
  "android.app.extra.PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED": true,
  "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE": {
    "workflow_type": 3,
    "default_password_quality": 327680,
    "default_min_password_length": 6,
    "company_name": "XYZ Corp",
    "organizational_unit": "sales-uk",
    "management_server": "emm.example.com",
    "detail_tos_url": "https://www.example.com/policies/terms/",
    "allowed_user_domains": "[\"example.com\", \"example.org\", \"example.net\"]"
    }
}

ゼロタッチ登録では、Android インテントを使用して DPC をインストールして起動します。 システムは android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE JSON プロパティを DPC に追加する エクストラとして渡されます。DPC は、 同じ鍵を使用する PersistableBundle

推奨 - 次のインテント エクストラを使用します 手順は次のとおりです

非推奨 - 以下を含めない 次のような追加機能を使用できます。

これらの設定を DPC で抽出して使用する方法については、プロビジョニング 。

開発とテスト

コンソールのゼロタッチ登録機能を開発してテストするには、以下が必要です。 次のとおりです。

  • サポートされているデバイス
  • お客様のゼロタッチ登録アカウント

ゼロタッチをサポートするデバイスで開発とテストを行う 。すべての 開発用デバイスは販売パートナーから購入してください。

テスト用のお客様アカウントとアクセスするには、Google までお問い合わせください。 ゼロタッチ登録ポータル会社のメールアドレスから 関連付けられているメーカーについてお知らせください 1 つか 2 つのデバイスの IMEI 番号を入力すると、開発に追加されます あります。

なお、ゼロタッチ登録では、自動的にアプリがダウンロード、インストールされるため、 テストを行うには、DPC が Google Play から入手可能である必要があります。 プロビジョニングを行います開発版の DPC ではテストできません。

IT 管理者向けサポート

コンソールのインターフェースやドキュメントで IT 管理者をサポートする必要がある場合は、 詳しくは、IT 管理者向けゼロタッチ登録をご覧ください。マイページ また、コンソールのユーザーにそのヘルプセンターの記事を案内することもできます。

関連情報

以下のドキュメントでは、 console: