如何使用 Android for Work 適用的 Microsoft Intune 應用程式設定原則How to use Microsoft Intune app configuration policies for Android for Work

適用對象:Azure 入口網站的 IntuneApplies to: Intune in the Azure portal
您需要傳統入口網站的 Intune 相關文件嗎?Looking for documentation about Intune in the classic portal? 請移至這裡Go here.

您可以在 Microsoft Intune 中使用應用程式設定原則,來提供使用者執行 Android for Work 應用程式時可能可以使用的設定。Use app configuration policies in Microsoft Intune to supply settings that might be available when users run an Android for Work app. 並非所有應用程式都支援應用程式設定。Not all apps support app configuration. 請聯絡應用程式開發人員,以了解他們建置的應用程式是否支援應用程式設定原則。Check with the app’s developer to see whether or not they have built their app to support app configuration policies.

應用程式設定原則可協助您在使用者執行應用程式之前,先為他們預先設定可用的應用程式設定。App configuration policies can help you pre-configure available app settings for your users before they run the app. 某些 Android 應用程式支援受管理的設定選項,您可以使用設定設計工具在 Azure 入口網站中設定這些選項。Some Android apps support managed configurations options that you can configure in the Azure portal with the configuration designer. 某些應用程式 (例如套件組合類型) 上的組態設定無法使用設定設計工具來設定。Some configuration settings on apps (such as those with Bundle types) cannot be configured with the configuration designer. 您將需要使用 JSON 編輯器來編輯那些值。You will need to use the JSON editor for those values. 安裝應用程式時,會自動將設定值提供給應用程式。Settings are supplied to apps automatically when the app is installed.

您不會直接將這些原則部署給使用者與裝置。You do not assign these policies directly to users and devices. 而是將原則與應用程式關聯,然後再指派應用程式。Instead, you associate a policy with an app, and then assign the app. 每當應用程式檢查是否有原則設定時 (通常是第一次執行時),便會使用這些原則設定。The policy settings is used when the app checks for them, typically the first time it is run).

使用設定設計工具Use configuration designer

  1. 在 Azure 入口網站中,選擇 [行動應用程式]。In the Azure portal, choose Mobile apps. 在 [管理] 下方,選擇 [應用程式設定原則],然後按一下 [新增]。Under Manage, choose App configuration policies and then click Add.
  2. 使用下列詳細資料:Set the following details:
    • 名稱:將在 Azure 入口網站中顯示的設定檔名稱Name - The name of the profile that will appear in the Azure portal
    • 描述:將在 Azure 入口網站中顯示的設定檔描述Description - The description of the profile that will appear in the Azure portal
    • 平台 - 選取 [Android]Platform - Select Android
    • 裝置註冊類型 - 已經預先為您選取 [已註冊到 Intune]。Device enrollment type - Enrolled with Intune is pre-selected for you.
  3. 選取 [相關聯的應用程式] 來選擇您要定義設定原則的應用程式。Select Associated App to choose the app for which you want to define a configuration policy. 從 Android for Work 應用程式清單中選取您已經使用 Intune 核准並同步處理的應用程式Select from the list of Android for Work apps that you have approved and synchronized with Intune
  4. 選取 [組態設定]。Select Configuration settings.
  5. 對於 [組態設定格式],選取 [使用設定設計工具]。For Configuration settings format, select Use configuration designer.
  6. 選擇 [新增]。Choose Add. 就會顯示可用組態設定的清單。A list of available configuration settings is displayed. 此清單包括:The list includes:
    • 設定金鑰 - 設定的名稱。Configuration keys - Name of the setting.
    • 值的類型 - 可以設定的值,例如 [布林值] 或 [字串]。Value type - The setting that can be configured, for example Boolean or String.
    • 描述 - 組態設定的描述。Description - A description of the configuration setting.
  7. 選取您要使用此設定檔設定之設定的核取方塊,然後按一下 [確定]。Select the checkboxes of settings you want to configure with this profile, and then click OK.
  8. 您選取之設定的清單就會顯示並顯示可用的設定值A list of your selected settings is displayed with the available Configuration value. 指定每項設定的值,然後按一下 [確定]。Specify a value for each setting, and then click OK.

使用 JSON 編輯器Use JSON editor

  1. 在 Azure 入口網站中,選擇 [行動應用程式]。In the Azure portal, choose Mobile apps. 在 [管理] 下方,選擇 [應用程式設定原則],然後按一下 [新增]。Under Manage, choose App configuration policies and then click Add.
  2. 使用下列詳細資料:Set the following details:
    • 名稱:將在 Azure 入口網站中顯示的設定檔名稱Name - The name of the profile that will appear in the Azure portal
    • 描述:將在 Azure 入口網站中顯示的設定檔描述Description - The description of the profile that will appear in the Azure portal
    • 平台 - 選取 [Android]Platform - Select Android
    • 裝置註冊類型 - 已經預先為您選取 [已註冊到 Intune]。Device enrollment type - Enrolled with Intune is pre-selected for you.
  3. 選取 [相關聯的應用程式] 來選擇您要定義設定原則的應用程式。Select Associated App to choose the app for which you want to define a configuration policy. 從 Android for Work 應用程式清單中選取您已經使用 Intune 核准並同步處理的應用程式。Select from the list of Android for Work apps that you have approved and synchronized with Intune.
  4. 選取 [組態設定]。Select Configuration Settings.
  5. 對於 [組態設定格式],請選取 [進入 JSON 編輯器]。For Configuration settings format, select Enter JSON editor.
  6. 您可以在編輯器中定義組態設定的 JSON 值。In the editor you can define JSON values for configuration settings. 您可以選擇 [下載 JSON 範本] 來下載之後可以設定的範例檔案。You can choose Download JSON template to download a sample file that you can then configure.
  7. 完成時,請選擇 [確定],然後按一下 [新增]。When you're done, choose OK and then click Add.

如此即可建立原則,並顯示在原則清單刀鋒視窗上。The policy will be created and appears on the policies list blade.

當指派的應用程式在裝置上執行時,會依照您在應用程式組態原則中的設定執行。When the assigned app is run on a device, it will run with the settings that you configured in the app configuration policy.

預先設定應用程式的權限授與狀態Preconfigure permissions grant state for apps

您也可以預先設定應用程式的權限,以存取 Android 裝置功能。You can also preconfigure permission for apps to access Android device features. 根據預設,需要裝置權限 (例如存取位置或裝置相機) 的 Android 應用程式會提示使用者接受或拒絕授與權限。By default, Android apps that require device permissions such as access to location or the device camera prompt users to accept or deny permissions. 例如,若應用程式會使用裝置的麥克風,則系統會提示使用者授與應用程式使用麥克風的權限。For example, if an app uses the device's microphone then the end user is prompted to grant the app permission to use the microphone.

  1. 在 Azure 入口網站中,選擇 [行動應用程式]。In the Azure portal, choose Mobile apps. 在 [管理] 下方,選擇 [應用程式設定原則],然後按一下 [新增]。Under Manage, choose App configuration policies and then click Add.
  2. 使用下列詳細資料:Set the following details:
    • 名稱:將在 Azure 入口網站中顯示的設定檔名稱Name - The name of the profile that will appear in the Azure portal
    • 描述:將在 Azure 入口網站中顯示的設定檔描述Description - The description of the profile that will appear in the Azure portal
    • 平台 - 選取 [Android]Platform - Select Android
    • 裝置註冊類型 - 已經預先為您選取 [已註冊到 Intune]。Device enrollment type - Enrolled with Intune is pre-selected for you.
  3. 選取 [相關聯的應用程式] 來選擇您要定義設定原則的應用程式。Select Associated App to choose the app for which you want to define a configuration policy. 從 Android for Work 應用程式清單中選取您已經使用 Intune 核准並同步處理的應用程式。Select from the list of Android for Work apps that you have approved and synchronized with Intune.
  4. 選取 [權限],然後選擇 [新增]。Select Permissions and then choose Add.
  5. 從可用應用程式權限的清單選取權限,然後選擇 [確定]。Select from the list of available app permissions and then choose OK.
  6. 為每個權限選取要使用此原則授與的選項:Select an option for each permission to grant with this policy:
    • 提示 - 提示使用者接受或拒絕。Prompt - Prompt the user to accept or deny.
    • 自動授與 - 自動核准且不通知使用者。Auto grant - Automatically approve without notifying the user.
    • 自動拒絕 - 自動拒絕且不通知使用者。Auto deny - Automatically deny without notifying the user.
  7. 若要指派應用程式設定原則,請選取應用程式設定原則,選取 [指派],然後選取 [選取群組]。To assign the app configuration policy, select the app configuration policy, select Assignment, and then select Select groups.
  8. 選取要指派的使用者群組,然後選擇 [選取]。Select the user groups to assign, and then choose Select.
  9. 選擇 [儲存] 來指派原則。Choose Save to assign the policy.

後續步驟Next steps

一如往常般地指派監視應用程式。Continue to assign and monitor the app as usual.