為受管理的 iOS 裝置新增應用程式設定原則Add app configuration policies for managed iOS devices

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

在 Microsoft Intune 中使用應用程式設定原則,以提供使用者執行 iOS 應用程式時的設定。Use app configuration policies in Microsoft Intune to supply settings when users run an iOS app. 您不會直接將這些原則部署給使用者與裝置。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 are used when the app checks for them, typically the first time it is run.

提示

此原則類型目前僅針對執行 iOS 8.0 和更新版本的裝置提供。This policy type is currently available only for devices running iOS 8.0 and later. 它支援下列應用程式安裝類型︰It supports the following app installation types:

  • App Store 中的受管理 iOS 應用程式Managed iOS app from the app store
  • iOS 應用程式套件App package for iOS

如需應用程式安裝類型的詳細資訊,請參閱如何將應用程式新增至 Microsoft IntuneFor more information about app installation types, see How to add an app to Microsoft Intune.

建立應用程式設定原則Create an app configuration policy

  1. 登入 Azure 入口網站。Sign in to the Azure portal.
  2. 選擇 [更多服務] > [監視 + 管理] + [Intune]。Choose More Services > Monitoring + Management + Intune.
  3. 選擇 [Mobile Apps] 工作負載。Choose the Mobile apps workload.
  4. 選擇 [管理] 群組中的 [應用程式設定原則],然後選擇 [新增]。Choose App configuration policies in the Manage group, and then choose Add.
  5. 使用下列詳細資料:Set the following details:
    • 名稱Name
      將在 Azure 入口網站中顯示的設定檔名稱。The name of the profile that will appear in the Azure portal.
    • 說明Description
      將在 Azure 入口網站中顯示的設定檔描述。The description of the profile that will appear in the Azure portal.
    • 裝置註冊類型Device enrollment type
      選擇 [受管理裝置]。Choose Managed devices.
  6. 為 [平台] 選取 [iOS]。Select iOS for Platform.
  7. 選擇 [相關聯的應用程式]。Choose Associated App. 然後在 [相關聯的應用程式] 刀鋒視窗中,選擇要套用設定的受管理應用程式。Then, on the Associated App blade, choose the managed app to which you want to apply the configuration.
  8. 在 [新增設定原則] 刀鋒視窗上,選擇 [組態設定]。On the Add Configuration Policy blade, choose Configuration settings.
  9. 選取 [組態設定格式]。Select Configuration settings format. 選取下列其中一項:Select one of the following:
  10. 選擇 [確定],然後選擇 [新增]。Choose OK, and then choose Add.

使用設定設計工具Use configuration designer

您可以在 Intune 中已註冊或未註冊的裝置上,針對應用程式使用設定設計工具。You can use the configuration designer for apps on devices that are enrolled or not enrolled in Intune. 設計工具可讓您設定特定的設定金鑰和值。The designer lets you configure specific configuration keys and values. 您也必須指定每個值的資料類型。You must also specify the data type for each value. 安裝應用程式時,會自動將設定值提供給應用程式。Settings are supplied to apps automatically when they're installed.

新增設定Add a setting

  1. 對於設定中的每個金鑰和值,請設定:For each key and value in the configuration, set:
    • 設定金鑰Configuration key
      唯一識別特定設定組態的金鑰。The key that uniquely identifies the specific setting configuration.
    • 實值型別Value type
      設定值的資料類型。The data type of the configuration value. 類型包括整數、實數、字串或布林值。Types include Integer, Real, String, or Boolean.
    • 設定值Configuration value
      設定的值。The value for the configuration.
  2. 選擇 [確定] 來設定您的組態設定。Choose OK to set your configuration settings.

刪除設定Delete a setting

  1. 選擇設定旁邊的省略符號 (...)。Choose the ellipsis (...) next to the setting.
  2. 選取 [刪除]。Select Delete.

{{ 和 }} 字元僅供權杖類型使用,絕不能用於其他用途。The {{ and }} characters are used by token types only and must not be used for other purposes.

輸入 XML 資料Enter XML data

您可以輸入或貼上 XML 屬性清單,其中包含 Intune 中所註冊裝置的應用程式組態設定。You can type or paste an XML property list that contains the app configuration settings for devices enrolled in Intune. XML 屬性清單的格式會依您所設定的應用程式而有所不同。The format of the XML property list varies depending on the app that you are configuring. 如需所要使用之確切格式的詳細資訊,請連絡應用程式供應商。For details about the exact format to use, contact the supplier of the app.

Intune 會驗證 XML 格式。Intune validates the XML format. 但 Intune 不會檢查 XML 屬性清單 (PList) 是否適用於目標應用程式。However, Intune does not check that the XML property list (PList) will work with the target app.

若要深入了解 XML 屬性清單:To learn more about XML property lists:

應用程式設定 XML 檔案的範例格式Example format for an app configuration XML file

當您建立應用程式設定檔時,可以使用下列格式指定下列一或多個值︰When you create an app configuration file, you can specify one or more of the following values by using this format:

<dict>
  <key>userprincipalname</key>
  <string>{{userprincipalname}}</string>
  <key>mail</key>
  <string>{{mail}}</string>
  <key>partialupn</key>
  <string>{{partialupn}}</string>
  <key>accountid</key>
  <string>{{accountid}}</string>
  <key>deviceid</key>
  <string>{{deviceid}}</string>
  <key>userid</key>
  <string>{{userid}}</string>
  <key>username</key>
  <string>{{username}}</string>
  <key>serialnumber</key>
  <string>{{serialnumber}}</string>
  <key>serialnumberlast4digits</key>
  <string>{{serialnumberlast4digits}}</string>
  <key>udidlast4digits</key>
  <string>{{udidlast4digits}}</string>
</dict>

支援的 XML PList 資料類型Supported XML PList data types

Intune 支援屬性清單中的下列資料類型:Intune supports the following data types in a property list:

  • <integer><integer>
  • <real><real>
  • <string><string>
  • <array><array>
  • <dict><dict>
  • <true /> 或 <false /><true /> or <false />

屬性清單中使用的權杖Tokens used in the property list

此外,Intune 支援屬性清單中的下列權杖類型︰Additionally, Intune supports the following token types in the property list:

  • {{userprincipalname}}—例如,John@contoso.com{{userprincipalname}}—for example, John@contoso.com
  • {{mail}}—例如,John@contoso.com{{mail}}—for example, John@contoso.com
  • {{partialupn}}—例如,John{{partialupn}}—for example, John
  • {{accountid}}—例如,fc0dc142-71d8-4b12-bbea-bae2a8514c81{{accountid}}—for example, fc0dc142-71d8-4b12-bbea-bae2a8514c81
  • {{deviceid}}—例如,b9841cd9-9843-405f-be28-b2265c59ef97{{deviceid}}—for example, b9841cd9-9843-405f-be28-b2265c59ef97
  • {{userid}}—例如,3ec2c00f-b125-4519-acf0-302ac3761822{{userid}}—for example, 3ec2c00f-b125-4519-acf0-302ac3761822
  • {{username}}—例如,John Doe{{username}}—for example, John Doe
  • {{serialnumber}}—例如,F4KN99ZUG5V2 (適用於 iOS 裝置){{serialnumber}}—for example, F4KN99ZUG5V2 (for iOS devices)
  • {{serialnumberlast4digits}}—例如,G5V2 (適用於 iOS 裝置){{serialnumberlast4digits}}—for example, G5V2 (for iOS devices)

後續步驟Next steps

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