AssignedAccess 云解决方案提供商

AssignedAccess 配置服务提供程序 (CSP) 用于将设备设置为在展台模式下运行。 执行 CSP 后,与展台模式关联的下一个用户登录名会将设备置于展台模式,运行 CSP 配置中指定的应用程序。

重要提示

Windows 10 企业版和Windows 10 教育版中支持 AssignedAccess CSP。 从 Windows 10 版本 1709 开始,Windows 10 专业版 和 Windows 10 S 中支持它。从 Windows 10 版本 1803 开始,Windows Holographic for Business 版本中也支持它。

警告

只能将单个应用展台配置文件分配给设备上的单个用户帐户。 单个应用配置文件不支持域组。

注意

如果应用程序在分配的访问模式下运行时调用KeyCredentialManager.IsSupportedAsync,并在第一次运行时返回 false,请调用设置屏幕并选择适当的 PIN 以用于Windows Hello。 这是在分配访问模式下运行的应用程序隐藏的设置屏幕。 只有在首先退出分配访问模式、选择便利引脚,然后再次返回分配访问模式时,才能使用 Windows Hello。

以下列表显示了 AssignedAccess 配置服务提供程序节点:

配置

范围 版本 适用的 OS
✔️ 装置
❌ 用户
❌ 家
✔️ 专业版
✔️ 企业
✔️ 教育
✔️ Windows SE
✔️ Windows 10版本 1709 [10.0.16299] 及更高版本
./Vendor/MSFT/AssignedAccess/Configuration

此节点接受 AssignedAccessConfiguration xml 作为输入。

输入 XML 指定可在展台或设备中配置的设置。

Windows 10 版本 1803 中,配置节点引入了单个应用展台配置文件来替换 KioskModeApp CSP 节点。 KioskModeApp 节点即将弃用,因此应使用配置节点 config xml 中的单个应用展台配置文件来配置面向公众的单一应用展台。

Windows 10 版本 1909 中,添加了 Microsoft Edge 展台模式支持。 这允许 Microsoft Edge 成为指定的展台应用程序。 有关配置 Microsoft Edge 展台模式的详细信息,请参阅配置运行 Microsoft Edge 的Windows 10展台。 Windows 10,版本 1909 还允许配置分组序列。 分组讨论序列指定将展台会话返回到锁屏界面的键盘快捷方式。 使用格式修饰符 + 键定义分组序列。 一个示例突破序列类似于 shift+alt+a,其中 shiftalt 是修饰符, a 是键。

注意

删除多应用配置将删除与用户关联的已分配访问锁定配置文件,但无法还原所有强制实施的策略 (例如“开始布局) ”。

描述框架属性

属性名 属性值
格式 chr (字符串)
访问类型 添加、删除、获取、替换

示例

有关更多示例,请参阅 AssignedAccessConfiguration 示例


获取配置
<SyncML xmlns='SYNCML:SYNCML1.2'>
   <SyncBody>
       <Get>
           <CmdID>2</CmdID>
           <Item>
               <Target>
                   <LocURI>./Device/Vendor/MSFT/AssignedAccess/Configuration</LocURI>
               </Target>
           </Item>
       </Get>
       <Final />
   </SyncBody>
</SyncML>

删除配置
<SyncML xmlns='SYNCML:SYNCML1.2'>
   <SyncBody>
       <Delete>
           <CmdID>2</CmdID>
           <Item>
               <Target>
                   <LocURI>./Device/Vendor/MSFT/AssignedAccess/Configuration</LocURI>
               </Target>
           </Item>
       </Delete>
       <Final />
   </SyncBody>
</SyncML>

KioskModeApp

注意

此策略已弃用,可能会在将来的版本中删除。

范围 版本 适用的 OS
✔️ 装置
❌ 用户
❌ 家
✔️ 专业版
✔️ 企业
✔️ 教育
✔️ Windows SE
✔️ Windows 10版本 1507 [10.0.10240] 及更高版本
./Vendor/MSFT/AssignedAccess/KioskModeApp

此节点可以接受并返回包含帐户名称和展台模式应用的 AUMID 的 json 字符串。

示例: {"User":"domain\\user", "AUMID":"Microsoft. WindowsCalculator_8wekyb3d8bbwe!App"}

配置展台模式应用时,帐户名称将用于查找目标用户。 帐户名称包括域名和用户名。 如果用户名在整个系统中是唯一的,则域名可以是可选的。 对于本地帐户,域名应为计算机名称。 在此节点上执行“Get”时,始终在输出中返回域名。

此节点支持 Add、Delete、Replace 和 Get 方法。 如果没有配置,“Get”和“Delete”方法将失败。 如果已有展台模式应用的配置,“Add”方法将失败。 “添加”和“替换”的数据模式相同。

提示

在上面的示例中,双精度 \\ 值是必需的,因为它位于 JSON 中,JSON 转 \\ 义为 \。 如果 MDM 服务器使用 JSON 分析器\composer,则应要求客户仅键入一个 \,该类型将位于 \\ JSON 中。 如果用户类型 \\,则它将变为 \\\\ JSON 格式,这将导致错误的结果。 出于同样的原因, domain\user 在配置 xml 中使用的 不需要 \\ ,但只需要一个 \,因为 xml 不 (需要) 转义 \

这同时适用于 domain\userAzureAD\someone@contoso.onmicrosoft.com只要 \ 在 JSON 字符串中使用 。

重要提示

  • 在 Windows 10 版本 1803 中,配置节点引入了单个应用展台配置文件来替换 KioskModeApp CSP 节点。 KioskModeApp 节点即将弃用,因此应使用配置节点 config xml 中的单个应用展台配置文件来配置面向公众的单一应用展台。
  • 此外,从 Windows 10 版本 1803 开始,如果在设备上配置了配置节点,则 KioskModeApp 节点将成为No-Op。 如果设置了“配置”节点,KioskModeApp 节点上的“添加/替换/删除”命令始终将 SUCCESS 返回到 MDM 服务器,但 KioskModeApp 的数据不会对设备产生任何影响。 KioskModeApp 上的 Get 命令将返回配置的 JSON 字符串,即使它无效。
  • 不能在设备上同时设置 KioskModeApp 和 ShellLauncher。

描述框架属性

属性名 属性值
格式 chr (字符串)
访问类型 添加、删除、获取、替换

示例


添加 KioskModeApp
<SyncML xmlns='SYNCML:SYNCML1.2'>
    <SyncBody>
        <Add>
            <CmdID>2</CmdID>
            <Item>
                <Target>
                    <LocURI>./Device/Vendor/MSFT/AssignedAccess/KioskModeApp</LocURI>
                </Target>
                <Meta>
                    <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>{"Account":"Domain\\AccountName","AUMID":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"}</Data>
            </Item>
        </Add>
        <Final />
    </SyncBody>
</SyncML>

删除 KioskModeApp
<SyncML xmlns='SYNCML:SYNCML1.2'>
    <SyncBody>
        <Delete>
            <CmdID>2</CmdID>
            <Item>
                <Target>
                    <LocURI>./Device/Vendor/MSFT/AssignedAccess/KioskModeApp</LocURI>
                </Target>
            </Item>
        </Delete>
        <Final />
    </SyncBody>
</SyncML>

获取 KioskModeApp
<SyncML xmlns='SYNCML:SYNCML1.2'>
    <SyncBody>
        <Get>
            <CmdID>2</CmdID>
            <Item>
                <Target>
                    <LocURI>./Device/Vendor/MSFT/AssignedAccess/KioskModeApp</LocURI>
                </Target>
            </Item>
        </Get>
        <Final />
    </SyncBody>
</SyncML>

替换 KioskModeApp
<SyncML xmlns='SYNCML:SYNCML1.2'>
    <SyncBody>
        <Replace>
            <CmdID>2</CmdID>
            <Item>
                <Target>
                    <LocURI>./Device/Vendor/MSFT/AssignedAccess/KioskModeApp</LocURI>
                </Target>
                <Meta>
                    <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>{"Account":"Domain\\AccountName","AUMID":"Microsoft.WindowsAlarms_8wekyb3d8bbwe!App"}</Data>
            </Item>
        </Replace>
        <Final />
    </SyncBody>
</SyncML>

ShellLauncher

范围 版本 适用的 OS
✔️ 装置
❌ 用户
❌ 家
❌ 专业版
✔️ 企业
✔️ 教育
❌ Windows SE
✔️ Windows 10版本 1803 [10.0.17134] 及更高版本
./Vendor/MSFT/AssignedAccess/ShellLauncher

此节点接受 ShellLauncherConfiguration xml 作为输入。

Windows 10 版本 1903 中,引入了 Shell 启动器 V2,以支持 UWP 和 Win32 应用作为自定义 shell。

有关详细信息,请参阅 Shell 启动器

重要提示

不能在设备上同时设置 ShellLauncher 和 KioskModeApp。

注意

使用 ShellLauncher 节点配置 Shell 启动器会自动启用 Shell 启动器功能(如果 SKU 中可用)。

Shell 启动器作为一项功能,ShellLauncher 节点都需要 Windows 企业版或 Windows 教育版才能正常运行。 Windows 10 专业版不支持 ShellLauncher 节点。

描述框架属性

属性名 属性值
格式 chr (字符串)
访问类型 添加、删除、获取、替换

ShellLauncherConfiguration XSD

注意

Shell 启动器 V2 使用单独的 XSD 和命名空间实现向后兼容性。 原始 V1 XSD 引用 V2 XSD。


Shell 启动器 V1 XSD
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.microsoft.com/ShellLauncher/2018/Configuration"
    xmlns:default="http://schemas.microsoft.com/ShellLauncher/2018/Configuration"
    xmlns:V2="http://schemas.microsoft.com/ShellLauncher/2019/Configuration"
    targetNamespace="http://schemas.microsoft.com/ShellLauncher/2018/Configuration"
    >

    <xs:import namespace="http://schemas.microsoft.com/ShellLauncher/2019/Configuration"/>

    <xs:complexType name="profile_list_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:choice minOccurs="1" maxOccurs="1">
                <xs:element name="DefaultProfile" type="default_profile_t"/>
                <xs:element name="Profile" type="profile_t"/>
            </xs:choice>
            <xs:element name="Profile" type="profile_t" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="default_profile_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="Shell" type="default_shell_t" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="default_shell_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="DefaultAction" type="default_action_t" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="Shell" type="xs:string" use="required"/>
        <xs:attribute ref="V2:AppType"/>
        <xs:attribute ref="V2:AllAppsFullScreen"/>
    </xs:complexType>

    <xs:complexType name="custom_shell_t">
        <xs:all minOccurs="1" maxOccurs="1">
            <xs:element name="ReturnCodeActions" type="return_code_action_list_t" minOccurs="0" maxOccurs="1">
                <xs:unique name="ForbidDuplicatedReturnCodes">
                    <xs:selector xpath="default:ReturnCodeAction"/>
                    <xs:field xpath="@ReturnCode"/>
                </xs:unique>
            </xs:element>
            <xs:element name="DefaultAction" type="default_action_t" minOccurs="0" maxOccurs="1"/>
        </xs:all>
        <xs:attribute name="Shell" type="xs:string" />
        <xs:attribute ref="V2:AppType"/>
        <xs:attribute ref="V2:AllAppsFullScreen"/>
    </xs:complexType>

    <xs:complexType name="default_action_t">
        <xs:attribute name="Action" type="system_action_t" use="required"/>
    </xs:complexType>

    <xs:simpleType name="system_action_t">
        <xs:restriction base="xs:string">
            <xs:enumeration value="RestartShell" />
            <xs:enumeration value="RestartDevice" />
            <xs:enumeration value="ShutdownDevice" />
            <xs:enumeration value="DoNothing" />
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="profile_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="Shell" type="custom_shell_t" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="Id" type="guid_t" use="required"/>
        <xs:attribute name="Name" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:simpleType name="guid_t">
        <xs:restriction base="xs:string">
            <xs:pattern value="\{[0-9a-fA-F]{8}\-([0-9a-fA-F]{4}\-){3}[0-9a-fA-F]{12}\}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="return_code_action_list_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="ReturnCodeAction" type="return_code_action_t" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="return_code_action_t">
        <xs:attribute name="ReturnCode" type="xs:integer" use="required"/>
        <xs:attribute name="Action" type="system_action_t" use="required"/>
    </xs:complexType>

    <xs:complexType name="config_list_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="Config" type="config_t" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="config_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:choice minOccurs="1" maxOccurs="1">
                <xs:element name="Account" type="account_t" minOccurs="1" maxOccurs="1">
                    <xs:key name="mutexNameOrSID">
                        <xs:selector xpath="."/>
                        <xs:field xpath="@Name|@Sid"/>
                    </xs:key>
                </xs:element>
                <xs:element name="AutoLogonAccount" type="autologon_account_t" minOccurs="1" maxOccurs="1"/>
            </xs:choice>
            <xs:element name="Profile" type="profile_id_t" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="account_t">
        <xs:attribute name="Name" type="xs:string" use="optional"/>
        <xs:attribute name="Sid" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:complexType name="autologon_account_t">
        <xs:attribute name="HiddenId" type="guid_t" fixed="{50021E57-1CE4-49DF-99A9-8DB659E2C2DD}"/>
    </xs:complexType>

    <xs:complexType name="profile_id_t">
        <xs:attribute name="Id" type="guid_t" use="required"/>
    </xs:complexType>

    <!--below is the definition of the config xml content-->
    <xs:element name="ShellLauncherConfiguration">
        <xs:complexType>
            <xs:sequence minOccurs="1" maxOccurs="1">
                <xs:element name="Profiles" type="profile_list_t" minOccurs="1" maxOccurs="1">
                    <xs:unique name="ForbidDuplicatedProfiles">
                        <xs:selector xpath="default:Profile"/>
                        <xs:field xpath="@Id"/>
                    </xs:unique>
                </xs:element>
                <xs:element name="Configs" type="config_list_t" minOccurs="0" maxOccurs="1">
                    <xs:unique name="ForbidDuplicatedConfigs_Name">
                        <xs:selector xpath="default:Config/default:Account"/>
                        <xs:field xpath="@Name"/>
                    </xs:unique>
                    <xs:unique name="ForbidDuplicatedConfigs_Sid">
                        <xs:selector xpath="default:Config/default:Account"/>
                        <xs:field xpath="@Sid"/>
                    </xs:unique>
                    <xs:unique name="ForbidDuplicatedAutoLogonAccount">
                        <xs:selector xpath="default:Config/default:AutoLogonAccount"/>
                        <xs:field xpath="@HiddenId"/>
                    </xs:unique>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

Shell 启动器 V2 XSD
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.microsoft.com/ShellLauncher/2019/Configuration"
    xmlns:default="http://schemas.microsoft.com/ShellLauncher/2019/Configuration"
    targetNamespace="http://schemas.microsoft.com/ShellLauncher/2019/Configuration"
    >

    <xs:attribute name="AppType">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="UWP"/>
          <xs:enumeration value="Desktop"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>

    <xs:attribute name="AllAppsFullScreen" type="xs:boolean"/>

</xs:schema>

示例


添加
<SyncML xmlns='SYNCML:SYNCML1.2'>
  <SyncBody>
    <Add>
      <CmdID>2</CmdID>
      <Item>
        <Target>
          <LocURI>./Device/Vendor/MSFT/AssignedAccess/ShellLauncher</LocURI>
        </Target>
        <Meta>
          <Format xmlns="syncml:metinf">chr</Format>
        </Meta>
        <Data>
        <![CDATA[
        <?xml version="1.0" encoding="utf-8"?>
        <ShellLauncherConfiguration xmlns="http://schemas.microsoft.com/ShellLauncher/2018/Configuration">
            <Profiles>
                <!--default profile defines default shell and action for general purposes, should NOT be bound to any account-->
                <DefaultProfile>
                    <Shell Shell="%SystemRoot%\explorer.exe">
                        <!--DefaultAction is optional; if not defined, the pre-defined default action is "restart shell"-->
                        <DefaultAction Action="RestartShell"/>
                    </Shell>
                </DefaultProfile>
                <Profile Id="{814B6409-8C51-4EE2-95F8-DB39B70F5F68}">
                    <Shell Shell="%ProgramFiles%\Internet Explorer\iexplore.exe -k www.bing.com">
                        <!--ReturnCodeActions is optional, when none is provided, will always execute default action-->
                        <ReturnCodeActions>
                            <ReturnCodeAction ReturnCode="0" Action="RestartShell"/>
                            <ReturnCodeAction ReturnCode="-1" Action="RestartDevice"/>
                            <ReturnCodeAction ReturnCode="255" Action="ShutdownDevice"/>
                        </ReturnCodeActions>
                        <!--restart device after shell exits, if its return code does not match any of the above-->
                        <DefaultAction Action="RestartDevice"/>
                    </Shell>
                </Profile>
                <Profile Id="{24A73092-4F3F-44CC-8375-53F13FE213F7}">
                    <Shell Shell="%SystemRoot%\System32\cmd.exe"/>
                    <!--DefaultAction is optional, if none is supplied, will use DefaultAction defined in DefaultProfile-->
                </Profile>
            </Profiles>
            <Configs>
                <Config>
                    <!--AutoLogon account-->
                    <AutoLogonAccount/>
                    <Profile Id="{814B6409-8C51-4EE2-95F8-DB39B70F5F68}"/>
                </Config>
                <Config>
                    <!--BUILTIN\Administrators SID-->
                    <Account Sid="S-1-5-32-544"/>
                    <Profile Id="{24A73092-4F3F-44CC-8375-53F13FE213F7}"/>
                </Config>
                <Config>
                    <!--local account-->
                    <Account Name="sluser1"/>
                    <Profile Id="{814B6409-8C51-4EE2-95F8-DB39B70F5F68}"/>
                </Config>
            </Configs>
        </ShellLauncherConfiguration>
        ]]>
        </Data>
      </Item>
    </Add>
    <Final />
  </SyncBody>
</SyncML>

添加 AutoLogon

此函数代表你创建一个自动登录帐户。 它是没有密码的标准用户。 自动登录帐户由 AssignedAccessCSP 管理,因此不会公开帐户名称。

注意

自动登录函数设计为在 OOBE 之后与预配包一起使用。

<SyncML xmlns='SYNCML:SYNCML1.2'>
  <SyncBody>
    <Add>
      <CmdID>2</CmdID>
      <Item>
        <Target>
          <LocURI>./Device/Vendor/MSFT/AssignedAccess/ShellLauncher</LocURI>
        </Target>
        <Meta>
          <Format xmlns="syncml:metinf">chr</Format>
        </Meta>
        <Data>
        <![CDATA[
        <?xml version="1.0" encoding="utf-8"?>
        <ShellLauncherConfiguration xmlns="http://schemas.microsoft.com/ShellLauncher/2018/Configuration">
            <Profiles>
                <DefaultProfile>
                    <Shell Shell="%SystemRoot%\explorer.exe"/>
                </DefaultProfile>
                <Profile Id="{814B6409-8C51-4EE2-95F8-DB39B70F5F68}">
                    <Shell Shell="%ProgramFiles%\Internet Explorer\iexplore.exe -k www.bing.com">
                        <ReturnCodeActions>
                            <ReturnCodeAction ReturnCode="0" Action="RestartShell"/>
                            <ReturnCodeAction ReturnCode="-1" Action="RestartDevice"/>
                            <ReturnCodeAction ReturnCode="255" Action="ShutdownDevice"/>
                        </ReturnCodeActions>
                        <DefaultAction Action="RestartDevice"/>
                    </Shell>
                </Profile>
            </Profiles>
            <Configs>
                <Config>
                    <AutoLogonAccount/>
                    <Profile Id="{814B6409-8C51-4EE2-95F8-DB39B70F5F68}"/>
                </Config>
            </Configs>
        </ShellLauncherConfiguration>
        ]]>
        </Data>
      </Item>
    </Add>
    <Final />
  </SyncBody>
</SyncML>

V2 添加
<SyncML xmlns='SYNCML:SYNCML1.2'>
  <SyncBody>
    <Add>
      <CmdID>2</CmdID>
      <Item>
        <Target>
          <LocURI>./Device/Vendor/MSFT/AssignedAccess/ShellLauncher</LocURI>
        </Target>
        <Meta>
          <Format xmlns="syncml:metinf">chr</Format>
        </Meta>
        <Data>
        <![CDATA[
        <?xml version="1.0" encoding="utf-8"?>
        <!--Using the http://schemas.microsoft.com/ShellLauncher/2019/Configuration namespace will opt-in to customshellhost.exe experience which can run win32 and UWP apps-->
        <ShellLauncherConfiguration xmlns="http://schemas.microsoft.com/ShellLauncher/2018/Configuration"
xmlns:V2="http://schemas.microsoft.com/ShellLauncher/2019/Configuration">
            <Profiles>
                <DefaultProfile>
                    <Shell Shell="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" V2:AppType="UWP" V2:AllAppsFullScreen="true">
                        <!--DefaultAction is optional; if not defined, the pre-defined default action is "restart shell"-->
                        <DefaultAction Action="RestartShell"/>
                    </Shell>
                </DefaultProfile>
                <Profile Id="{814B6409-8C51-4EE2-95F8-DB39B70F5F68}">
                    <Shell Shell="%SystemRoot%\System32\notepad.exe" V2:AllAppsFullScreen="true">
                        <ReturnCodeActions>
                            <ReturnCodeAction ReturnCode="0" Action="RestartShell"/>
                            <ReturnCodeAction ReturnCode="-1" Action="RestartDevice"/>
                            <ReturnCodeAction ReturnCode="255" Action="ShutdownDevice"/>
                            <ReturnCodeAction ReturnCode="1" Action="DoNothing"/>
                        </ReturnCodeActions>
                        <DefaultAction Action="RestartShell"/>
                    </Shell>
                </Profile>
            </Profiles>
            <Configs>
                <Config>
                    <Account Name="sluser1"/>
                    <Profile Id="{814B6409-8C51-4EE2-95F8-DB39B70F5F68}"/>
                </Config>
            </Configs>
        </ShellLauncherConfiguration>
        ]]>
        </Data>
      </Item>
    </Add>
    <Final />
  </SyncBody>
</SyncML>


获取
<SyncML xmlns='SYNCML:SYNCML1.2'>
  <SyncBody>
    <Get>
      <CmdID>2</CmdID>
      <Item>
        <Target>
          <LocURI>./Device/Vendor/MSFT/AssignedAccess/ShellLauncher</LocURI>
        </Target>
      </Item>
    </Get>
    <Final />
  </SyncBody>
</SyncML>

状态

范围 版本 适用的 OS
✔️ 装置
❌ 用户
❌ 家
✔️ 专业版
✔️ 企业
✔️ 教育
✔️ Windows SE
✔️ Windows 10版本 1803 [10.0.17134] 及更高版本
./Vendor/MSFT/AssignedAccess/Status

此只读节点包含展台运行状况事件 xml。

这允许 MDM 服务器查询当前 KioskModeAppRuntimeStatus,只要 StatusConfiguration 节点设置为“On”或“OnWithAlerts”。 如果 StatusConfiguration 为“关闭”,则会向 MDM 服务器报告“找不到节点”错误。

Windows 10 版本 1809 开始,分配的访问权限运行时状态支持监视单应用展台和多应用模式。 下面是可能的状态代码:

状态代码 状态 描述
0 Unknown 未知状态。
1 Running AssignedAccess 帐户 (展台或多应用) 正常运行。
2 AppNotFound 展台应用未部署到计算机。
3 ActivationFailed AssignedAccess 帐户 (展台或多应用) 无法登录。
4 AppNoResponse 展台应用已成功启动,但现在无响应。

此外,状态有效负载包括以下字段:

  • profileId:MDM 服务器可以使用它来关联导致错误的帐户。
  • OperationList:它提供应用分配的访问权限 CSP 时发生的失败操作列表(如果有)。

描述框架属性

属性名 属性值
格式 chr (字符串)
访问类型 “获取”

AssignedAccessAlert XSD


展开此部分以查看架构 XML
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.microsoft.com/AssignedAccess/2018/AssignedAccessAlert"
    xmlns:default="http://schemas.microsoft.com/AssignedAccess/2018/AssignedAccessAlert"
    targetNamespace="http://schemas.microsoft.com/AssignedAccess/2018/AssignedAccessAlert"
    >

    <xs:simpleType name="status_t">
        <xs:restriction base="xs:int">
            <xs:enumeration value="0"/> <!-- Unknown -->
            <xs:enumeration value="1"/> <!-- Running -->
            <xs:enumeration value="2"/> <!-- AppNotFound -->
            <xs:enumeration value="3"/> <!-- ActivationFailed -->
            <xs:enumeration value="4"/> <!-- AppNoResponse -->
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="guid_t">
        <xs:restriction base="xs:string">
            <xs:pattern value="\{[0-9a-fA-F]{8}\-([0-9a-fA-F]{4}\-){3}[0-9a-fA-F]{12}\}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="operation_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="errorCode" type="xs:int" minOccurs="1" maxOccurs="1"/>
            <xs:element name="data" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="operationlist_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="Operation" type="operation_t" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="event_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="status" type="status_t" minOccurs="1" maxOccurs="1"/>
            <xs:element name="profileId" type="guid_t" minOccurs="1" maxOccurs="1"/>
            <xs:element name="errorCode" type="xs:int" minOccurs="0" maxOccurs="1"/>
            <xs:element name="OperationList" type="operationlist_t" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="Name" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:element name="Events">
        <xs:complexType>
            <xs:choice minOccurs="1" maxOccurs="1">
                <xs:element name="Event" type="event_t" minOccurs="1" maxOccurs="1"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>

示例

<SyncML xmlns='SYNCML:SYNCML1.2'>
   <SyncBody>
       <Get>
           <CmdID>2</CmdID>
           <Item>
               <Target>
                 <LocURI>./Device/Vendor/MSFT/AssignedAccess/Status</LocURI>
               </Target>
           </Item>
       </Get>
       <Final />
   </SyncBody>
</SyncML>

StatusConfiguration

范围 版本 适用的 OS
✔️ 装置
❌ 用户
❌ 家
✔️ 专业版
✔️ 企业
✔️ 教育
✔️ Windows SE
✔️ Windows 10版本 1803 [10.0.17134] 及更高版本
./Vendor/MSFT/AssignedAccess/StatusConfiguration

此节点接受 StatusConfiguration xml 作为输入。

StatusConfiguration xml 中 StatusEnabled 节点有三个可能的值:

  • OnWithAlerts
  • 关闭

默认情况下,StatusConfiguration 节点不存在,这意味着此功能处于关闭状态。 通过 CSP 启用后,分配的访问权限将检查展台应用状态,并等待 MDM 服务器从“状态”节点查询最新状态。 (可选)MDM 服务器可以选择加入 MDM 警报,以便在分配的访问运行时状态更改时生成 MDM 警报并立即发送到 MDM 服务器。 此 MDM 警报将包含通过“状态”节点提供的状态有效负载。 此 MDM 警报标头定义如下:

  • MDMAlertMark: Critical
  • MDMAlertType: com.microsoft.mdm.assignedaccess.status
  • MDMAlertDataType: string
  • 源: ./Vendor/MSFT/AssignedAccess
  • 目标: N/A

注意

仅针对错误发送 MDM 警报。

描述框架属性

属性名 属性值
格式 chr (字符串)
访问类型 添加、删除、获取、替换

StatusConfiguration XSD


展开此部分以查看架构 XML
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.microsoft.com/AssignedAccess/2018/StatusConfiguration"
    xmlns:default="http://schemas.microsoft.com/AssignedAccess/2018/StatusConfiguration"
    targetNamespace="http://schemas.microsoft.com/AssignedAccess/2018/StatusConfiguration"
    >

    <xs:simpleType name="status_enabled_t">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Off"/>
            <xs:enumeration value="On"/>
            <xs:enumeration value="OnWithAlerts"/>
        </xs:restriction>
    </xs:simpleType>

    <!--below is the definition of the config xml content-->
    <xs:element name="StatusConfiguration">
        <xs:complexType>
            <xs:sequence minOccurs="1" maxOccurs="1">
                <xs:element name="StatusEnabled" type="status_enabled_t" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

示例


添加 StatusConfiguration 并将 StatusEnabled 设置为 OnWithAlerts
<SyncML xmlns='SYNCML:SYNCML1.2'>
  <SyncBody>
    <Add>
      <CmdID>2</CmdID>
      <Item>
        <Target>
          <LocURI>./Device/Vendor/MSFT/AssignedAccess/StatusConfiguration</LocURI>
        </Target>
        <Meta>
          <Format xmlns="syncml:metinf">chr</Format>
        </Meta>
        <Data>
          <![CDATA[
          <?xml version="1.0" encoding="utf-8" ?>
          <StatusConfiguration xmlns="http://schemas.microsoft.com/AssignedAccess/2018/StatusConfiguration">
            <StatusEnabled>OnWithAlerts</StatusEnabled>
          </StatusConfiguration>
          ]]>
        </Data>
      </Item>
    </Add>
    <Final />
  </SyncBody>
</SyncML>

删除 StatusConfiguration
<SyncML xmlns='SYNCML:SYNCML1.2'>
    <SyncBody>
        <Delete>
            <CmdID>2</CmdID>
            <Item>
                <Target>
                  <LocURI>./Device/Vendor/MSFT/AssignedAccess/StatusConfiguration</LocURI>
                </Target>
            </Item>
        </Delete>
        <Final />
    </SyncBody>
</SyncML>

获取 StatusConfiguration
<SyncML xmlns='SYNCML:SYNCML1.2'>
    <SyncBody>
        <Get>
            <CmdID>2</CmdID>
            <Item>
                <Target>
                  <LocURI>./Device/Vendor/MSFT/AssignedAccess/StatusConfiguration</LocURI>
                </Target>
            </Item>
        </Get>
        <Final />
    </SyncBody>
</SyncML>

将 StatusEnabled 值替换为 On
<SyncML xmlns='SYNCML:SYNCML1.2'>
  <SyncBody>
    <Replace>
      <CmdID>2</CmdID>
      <Item>
        <Target>
          <LocURI>./Device/Vendor/MSFT/AssignedAccess/StatusConfiguration</LocURI>
        </Target>
        <Meta>
          <Format xmlns="syncml:metinf">chr</Format>
        </Meta>
        <Data>
          <![CDATA[
          <?xml version="1.0" encoding="utf-8" ?>
          <StatusConfiguration xmlns="http://schemas.microsoft.com/AssignedAccess/2018/StatusConfiguration">
            <StatusEnabled>On</StatusEnabled>
          </StatusConfiguration>
          ]]>
        </Data>
      </Item>
    </Replace>
    <Final />
  </SyncBody>
</SyncML>

AssignedAccessConfiguration XSD


AssignedAccessConfiguration 的架构。
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
    xmlns:default="http://schemas.microsoft.com/AssignedAccess/2017/config"
    xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config"
    xmlns:v3="http://schemas.microsoft.com/AssignedAccess/2020/config"
    xmlns:v4="http://schemas.microsoft.com/AssignedAccess/2021/config"
    targetNamespace="http://schemas.microsoft.com/AssignedAccess/2017/config"
    >

    <xs:import namespace="http://schemas.microsoft.com/AssignedAccess/201810/config"/>
    <xs:import namespace="http://schemas.microsoft.com/AssignedAccess/2020/config"/>
    <xs:import namespace="http://schemas.microsoft.com/AssignedAccess/2021/config"/>

    <xs:complexType name="profile_list_t">
        <xs:sequence minOccurs="1" >
            <xs:element name="Profile" type="profile_t" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="kioskmodeapp_t">
        <xs:attribute name="AppUserModelId" type="xs:string"/>
        <xs:attributeGroup ref="ClassicApp_attributeGroup"/>
    </xs:complexType>

    <xs:attributeGroup name="ClassicApp_attributeGroup">
        <xs:attribute ref="v4:ClassicAppPath"/>
        <xs:attribute ref="v4:ClassicAppArguments" use="optional"/>
    </xs:attributeGroup>

    <xs:complexType name="profile_t">
        <xs:choice>
            <xs:sequence minOccurs="1" maxOccurs="1">
                <xs:element name="AllAppsList" type="allappslist_t" minOccurs="1" maxOccurs="1"/>
                <xs:element ref="rs5:FileExplorerNamespaceRestrictions" minOccurs="0" maxOccurs="1"/>
                <xs:element name="StartLayout" type="xs:string" minOccurs="0" maxOccurs="1"/>
                <xs:element name="Taskbar" type="taskbar_t" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
            <xs:sequence minOccurs="1" maxOccurs="1">
                <xs:element name="KioskModeApp" type="kioskmodeapp_t" minOccurs="1" maxOccurs="1">
                    <xs:key name="mutualExclusionAumidOrClassicAppPath">
                        <xs:selector xpath="."/>
                        <xs:field xpath="@AppUserModelId|@v4:ClassicAppPath"/>
                    </xs:key>
                    <xs:unique name="mutualExclusionAumidOrClassicAppArgumentsOptional">
                        <xs:selector xpath="."/>
                        <xs:field xpath="@AppUserModelId|@v4:ClassicAppArguments"/>
                    </xs:unique>
                </xs:element>
                <xs:element ref="v4:BreakoutSequence" minOccurs="0" maxOccurs="1"/>
            </xs:sequence>
        </xs:choice>
        <xs:attribute name="Id" type="guid_t" use="required"/>
        <xs:attribute name="Name" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:complexType name="allappslist_t">
        <xs:sequence minOccurs="1" >
            <xs:element name="AllowedApps" type="allowedapps_t" minOccurs="1" maxOccurs="1">
                <xs:unique name="ForbidDupApps">
                    <xs:selector xpath="default:App"/>
                    <xs:field xpath="@AppUserModelId|@DesktopAppPath"/>
                </xs:unique>
                <xs:unique name="OnlyOneAppCanHaveAutoLaunch">
                    <xs:selector xpath="default:App"/>
                    <xs:field xpath="@rs5:AutoLaunch"/>
                </xs:unique>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="allowedapps_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:element name="App" type="app_t" minOccurs="1" maxOccurs="unbounded">
                <xs:key name="mutexAumidOrDesktopApp">
                    <xs:selector xpath="."/>
                    <xs:field xpath="@AppUserModelId|@DesktopAppPath"/>
                </xs:key>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="app_t">
        <xs:attribute name="AppUserModelId" type="xs:string"/>
        <xs:attribute name="DesktopAppPath" type="xs:string"/>
        <xs:attributeGroup ref="autoLaunch_attributeGroup"/>
    </xs:complexType>

    <xs:attributeGroup name="autoLaunch_attributeGroup">
        <xs:attribute ref="rs5:AutoLaunch"/>
        <xs:attribute ref="rs5:AutoLaunchArguments" use="optional"/>
    </xs:attributeGroup>

    <xs:complexType name="taskbar_t">
        <xs:attribute name="ShowTaskbar" type="xs:boolean" use="required"/>
    </xs:complexType>

    <xs:complexType name="profileId_t">
        <xs:attribute name="Id" type="guid_t" use="required"/>
    </xs:complexType>

    <xs:simpleType name="guid_t">
        <xs:restriction base="xs:string">
            <xs:pattern value="\{[0-9a-fA-F]{8}\-([0-9a-fA-F]{4}\-){3}[0-9a-fA-F]{12}\}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="config_list_t">
        <xs:sequence minOccurs="1" >
            <xs:element ref="v3:GlobalProfile" minOccurs="0" maxOccurs="1"/>
            <xs:element name="Config" type="config_t" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="config_t">
        <xs:sequence minOccurs="1" maxOccurs="1">
            <xs:choice>
                <xs:element name="Account" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="AutoLogonAccount" type="autologon_account_t" minOccurs="1" maxOccurs="1"/>
                <xs:element name="UserGroup" type="group_t" minOccurs="1" maxOccurs="1"/>
                <xs:element name="SpecialGroup" type="specialGroup_t" minOccurs="1" maxOccurs="1" />
            </xs:choice>
            <xs:element name="DefaultProfile" type="profileId_t" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="autologon_account_t">
        <xs:attribute name="HiddenId" type="guid_t" fixed="{74331115-F68A-4DF9-8D2C-52BA2CE2ADB1}"/>
        <xs:attribute ref="rs5:DisplayName" use="optional" />
    </xs:complexType>

    <xs:complexType name="group_t">
        <xs:attribute name="Name" type="xs:string" use="required"/>
        <xs:attribute name="Type" type="groupType_t" use="required"/>
    </xs:complexType>

    <xs:complexType name="specialGroup_t">
        <xs:attribute name="Name" type="specialGroupType_t" use="required"/>
    </xs:complexType>

    <xs:simpleType name="groupType_t">
        <xs:restriction base="xs:string">
            <xs:enumeration value="LocalGroup"/>
            <xs:enumeration value="ActiveDirectoryGroup"/>
            <xs:enumeration value="AzureActiveDirectoryGroup"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="specialGroupType_t">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Visitor"/>
            <xs:enumeration value="DeviceOwner"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="fileExplorerNamespaceRestrictions_t">
        <xs:sequence minOccurs="1">
            <xs:element name="AllowedNamespace" type="allowedFileExplorerNamespace_t"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="allowedFileExplorerNamespace_t">
        <xs:attribute name="Name" type="allowedFileExplorerNamespaceValues_t"/>
    </xs:complexType>

    <xs:simpleType name="allowedFileExplorerNamespaceValues_t">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Downloads"/>
        </xs:restriction>
    </xs:simpleType>

    <!--below is the definition of the config xml content-->
    <xs:element name="AssignedAccessConfiguration">
        <xs:complexType>
            <xs:all minOccurs="1">
                <xs:element name="Profiles" type="profile_list_t">
                    <xs:unique name="duplicateRolesForbidden">
                        <xs:selector xpath="default:Profile"/>
                        <xs:field xpath="@Id"/>
                    </xs:unique>
                </xs:element>
                <xs:element name="Configs" type="config_list_t">
                    <xs:unique name="duplicateAutoLogonAccountForbidden">
                        <xs:selector xpath=".//default:AutoLogonAccount"/>
                        <xs:field xpath="@HiddenId"/>
                    </xs:unique>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
</xs:schema>);

Windows 10版本 1909 中引入的功能的架构,添加了对 Microsoft Edge 展台模式和突破键序列自定义的支持。
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
    vc:minVersion="1.1"
    xmlns="http://schemas.microsoft.com/AssignedAccess/2021/config"
    xmlns:default="http://schemas.microsoft.com/AssignedAccess/2021/config"
    targetNamespace="http://schemas.microsoft.com/AssignedAccess/2021/config"
    >

    <xs:attribute name="ClassicAppPath" type="xs:string"/>
    <xs:attribute name="ClassicAppArguments" type="xs:string"/>

    <xs:element name="BreakoutSequence" type="BreakoutSequence_t" />

    <xs:complexType name="BreakoutSequence_t">
        <xs:attribute name="Key" type="xs:string" use="required"/>
    </xs:complexType>

</xs:schema>

Windows 10 1809 版本中引入的新功能的架构。
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.microsoft.com/AssignedAccess/201810/config"
    xmlns:default="http://schemas.microsoft.com/AssignedAccess/201810/config"
    xmlns:v3="http://schemas.microsoft.com/AssignedAccess/2020/config"
    targetNamespace="http://schemas.microsoft.com/AssignedAccess/201810/config"
    >

    <xs:import namespace="http://schemas.microsoft.com/AssignedAccess/2020/config"/>

    <xs:complexType name="fileExplorerNamespaceRestrictions_t">
        <xs:choice>
            <xs:sequence minOccurs="0">
                <xs:element name="AllowedNamespace" type="allowedFileExplorerNamespace_t" minOccurs="0"/>
                <xs:element ref="v3:AllowRemovableDrives" minOccurs="0" maxOccurs="1"/>
            </xs:sequence>
            <xs:element ref="v3:NoRestriction" minOccurs="0" maxOccurs="1" />
        </xs:choice>
    </xs:complexType>

    <xs:complexType name="allowedFileExplorerNamespace_t">
        <xs:attribute name="Name" type="allowedFileExplorerNamespaceValues_t" use="required"/>
    </xs:complexType>

    <xs:simpleType name="allowedFileExplorerNamespaceValues_t">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Downloads"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:element name="FileExplorerNamespaceRestrictions" type="fileExplorerNamespaceRestrictions_t" />

    <xs:attribute name="AutoLaunch" type="xs:boolean"/>

    <xs:attribute name="AutoLaunchArguments" type="xs:string"/>

    <xs:attribute name="DisplayName" type="xs:string"/>

</xs:schema>

Windows 10预发行版的架构。
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
    elementFormDefault="qualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.microsoft.com/AssignedAccess/2020/config"
    xmlns:default="http://schemas.microsoft.com/AssignedAccess/2020/config"
    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
    vc:minVersion="1.1"
    targetNamespace="http://schemas.microsoft.com/AssignedAccess/2020/config"
    >

    <xs:simpleType name="guid_t">
        <xs:restriction base="xs:string">
            <xs:pattern value="\{[0-9a-fA-F]{8}\-([0-9a-fA-F]{4}\-){3}[0-9a-fA-F]{12}\}"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="globalProfile_t">
        <xs:attribute name="Id" type="guid_t" />
    </xs:complexType>

    <xs:element name="AllowRemovableDrives"/>
    <xs:element name="NoRestriction" />
    <xs:element name="GlobalProfile" type="globalProfile_t" />

</xs:schema>

AssignedAccessConfiguration 示例

注意

若要授权包含 1809 或预发行版元素和属性的兼容配置 XML,请始终包含这些加载项架构的命名空间,并使用命名空间别名相应地修饰属性和元素。 例如,若要配置在 1809 版本中添加的自动启动功能,请使用以下示例。 请注意,为 1809 版本的 201810 命名空间提供了别名 r1809 ,并且该别名在 AutoLaunch 和 AutoLaunchArguments 上内联标记。

<AssignedAccessConfiguration
    xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
    xmlns:r1809="http://schemas.microsoft.com/AssignedAccess/201810/config"
>
    <Profiles>
        <Profile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}">
            <AllAppsList>
                <AllowedApps>
                  <App DesktopAppPath="%SystemRoot%\system32\notepad.exe" r1809:AutoLaunch="true" r1809:AutoLaunchArguments="1.txt"/>
    ...
</AssignedAccessConfiguration>

Windows 10的多应用展台的示例 XML 配置。
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config">
  <Profiles>
    <Profile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}">
      <AllAppsList>
        <AllowedApps>
          <App AppUserModelId="Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic" />
          <App AppUserModelId="Microsoft.ZuneVideo_8wekyb3d8bbwe!Microsoft.ZuneVideo" />
          <App AppUserModelId="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
          <App AppUserModelId="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
          <App AppUserModelId="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
          <App DesktopAppPath="%windir%\system32\mspaint.exe" />
          <App DesktopAppPath="C:\Windows\System32\notepad.exe" />
        </AllowedApps>
      </AllAppsList>
      <StartLayout>
        <![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
                      <LayoutOptions StartTileGroupCellWidth="6" />
                      <DefaultLayoutOverride>
                        <StartLayoutCollection>
                          <defaultlayout:StartLayout GroupCellWidth="6">
                            <start:Group Name="Group1">
                              <start:Tile Size="4x4" Column="0" Row="0" AppUserModelID="Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic" />
                              <start:Tile Size="2x2" Column="4" Row="2" AppUserModelID="Microsoft.ZuneVideo_8wekyb3d8bbwe!Microsoft.ZuneVideo" />
                              <start:Tile Size="2x2" Column="4" Row="0" AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
                              <start:Tile Size="2x2" Column="4" Row="4" AppUserModelID="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
                              <start:Tile Size="4x2" Column="0" Row="4" AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
                            </start:Group>
                            <start:Group Name="Group2">
                              <start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationID="{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\mspaint.exe" />
                              <start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\notepad.exe" />
                            </start:Group>
                          </defaultlayout:StartLayout>
                        </StartLayoutCollection>
                      </DefaultLayoutOverride>
                    </LayoutModificationTemplate>
                ]]>
      </StartLayout>
      <Taskbar ShowTaskbar="true"/>
    </Profile>
  </Profiles>
  <Configs>
    <Config>
      <Account>MultiAppKioskUser</Account>
      <DefaultProfile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}"/>
    </Config>
  </Configs>
</AssignedAccessConfiguration>

Microsoft Edge 展台的示例 XML 配置。此 Microsoft Edge 展台配置为在启动时以公共浏览模式启动 www.bing.com。
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
  xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
  xmlns:v4="http://schemas.microsoft.com/AssignedAccess/2021/config"
  >
  <Profiles>
    <Profile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}">
      <KioskModeApp v4:ClassicAppPath="%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe"
                                  v4:ClassicAppArguments="--no-first-run --kiosk-idle-timeout-minutes=5 --kiosk www.bing.com"/>
    </Profile>
  </Profiles>
  <Configs>
    <Config>
      <Account>EdgeKioskUser</Account>
      <DefaultProfile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}"/>
    </Config>
  </Configs>
</AssignedAccessConfiguration>

在 Microsoft Edge 展台上将分组讨论序列设置为 Ctrl+A 的示例 XML 配置。

注意

BreakoutSequence 可以应用于任何展台类型,而不仅仅是 Edge 展台。

<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
  xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
  xmlns:v4="http://schemas.microsoft.com/AssignedAccess/2021/config"
  >
  <Profiles>
    <Profile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}">
      <KioskModeApp v4:ClassicAppPath="%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe"
                                  v4:ClassicAppArguments="--no-first-run --kiosk-idle-timeout-minutes=5 --kiosk www.bing.com"/>
      <v4:BreakoutSequence Key="Ctrl+A"/>
    </Profile>
  </Profiles>
  <Configs>
    <Config>
      <Account>EdgeKioskUser</Account>
      <DefaultProfile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}"/>
    </Config>
  </Configs>
</AssignedAccessConfiguration>

Windows Holographic for Business版本示例

此示例为一线工作人员配置以下应用:Skype、Learning、Feedback Hub 和 Calibration。 使用 Windows 配置设计器在预配包中使用此 XML。 有关说明,请参阅 使用预配包配置 HoloLens


展开此部分以查看示例。
<?xml version="1.0" encoding="utf-8" ?>
<!--
  This is a sample Assigned Access XML file. The Profile specifies which apps are allowed
  and their app IDs. An Assigned Access Config specifies the accounts or groups to which
  a Profile is applicable.

  !!! NOTE: Change the Account below to a user in the tenant being tested !!!
-->
<AssignedAccessConfiguration xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config">
    <Profiles>
        <Profile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}">
            <AllAppsList>
                <AllowedApps>
                    <!-- Learning app -->
                    <App AppUserModelId="GGVLearning_cw5n1h2txyewy!GGVLearning" />
                    <!-- Calibration app -->
                    <App AppUserModelId="ViewCalibrationApp_cw5n1h2txyewy!ViewCalibrationApp" />
                    <!-- Feedback Hub -->
                    <App AppUserModelId="Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe!App" />
                    <!-- HoloSkype -->
                    <App AppUserModelId="Microsoft.SkypeApp_kzf8qxf38zg5c!App" />
                </AllowedApps>
            </AllAppsList>
            <!-- This section is required for parity with Desktop Assigned Access. It is not currently used on HoloLens -->
            <StartLayout>
                <![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
                      <LayoutOptions StartTileGroupCellWidth="6" />
                      <DefaultLayoutOverride>
                        <StartLayoutCollection>
                          <defaultlayout:StartLayout GroupCellWidth="6">
                            <start:Group Name="Life at a glance">
                              <start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="Microsoft.SkypeApp_kzf8qxf38zg5c!App" />
                            </start:Group>
                          </defaultlayout:StartLayout>
                        </StartLayoutCollection>
                      </DefaultLayoutOverride>
                    </LayoutModificationTemplate>
                ]]>
            </StartLayout>
            <!-- This section is required for parity with Desktop Assigned Access. It is not currently used on HoloLens -->
            <Taskbar ShowTaskbar="true"/>
        </Profile>
    </Profiles>
    <Configs>
        <!-- IMPORTANT: Replace the account name here with an email address of the user you want to
        be enabled for assigned access. The value in the Account node must begin with
        AzureAD\ for AAD accounts. -->
        <Config>
            <Account>AzureAD\multiusertest@analogfre.onmicrosoft.com</Account>
            <DefaultProfile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}"/>
        </Config>
    </Configs>
</AssignedAccessConfiguration>

在配置中处理 XML

XML 编码 (转义) 和“数据”节点中 XML 的 CDATA 将确保 DM 客户端可以正确解释 SyncML,并将配置 xml 作为字符串 (以原始格式发送,未转义) 发送到 AssignedAccess CSP 进行处理。

同样,配置 xml 中的 StartLayout xml 使用与字符串相同的格式,即 xml 内部 xml。 在上面提供的示例配置 xml 中,CDATA 用于嵌入 StartLayout xml。 如果你也使用 CDATA 在 SyncML 中嵌入配置 xml,你将具有嵌套的 CDATA,因此请注意在提供的 CDATA 示例中如何使用 CDATA。 话虽然这样说,在构造配置 xml 时,MDM 服务器可以转义开始布局 xml 或将 startlayout xml 放入 CDATA 中,当 MDM 服务器将配置 xml 放入 SyncML 中时,MDM 服务器也可以转义它或使用 CDATA 进行包装。

Escape 和 CDATA 是在 xml 中处理 xml 时使用的机制。 请考虑它是将配置 xml 作为有效负载从服务器发送到客户端的传输通道。 它对于配置 CSP 的最终用户和我们的 CSP 都是透明的。 服务器端客户和 CSP 只能看到原始配置 XML。


此示例显示“数据”节点的转义 XML。
<SyncML xmlns='SYNCML:SYNCML1.2'>
    <SyncBody>
        <Add>
            <CmdID>2</CmdID>
            <Item>
                <Target>
                    <LocURI>./Device/Vendor/MSFT/AssignedAccess/Configuration</LocURI>
                </Target>
                <Meta>
                    <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>
                    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;AssignedAccessConfiguration xmlns=&quot;http://schemas.microsoft.com/AssignedAccess/2017/config&quot;&gt;
    &lt;Profiles&gt;
        &lt;Profile Id=&quot;{9A2A490F-10F6-4764-974A-43B19E722C23}&quot;&gt;
            &lt;AllAppsList&gt;
                &lt;AllowedApps&gt;
                    &lt;App AppUserModelId=&quot;Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic&quot; /&gt;
                    &lt;App AppUserModelId=&quot;Microsoft.ZuneVideo_8wekyb3d8bbwe!Microsoft.ZuneVideo&quot; /&gt;
                    &lt;App AppUserModelId=&quot;Microsoft.Windows.Photos_8wekyb3d8bbwe!App&quot; /&gt;
                    &lt;App AppUserModelId=&quot;Microsoft.BingWeather_8wekyb3d8bbwe!App&quot; /&gt;
                    &lt;App AppUserModelId=&quot;Microsoft.WindowsCalculator_8wekyb3d8bbwe!App&quot; /&gt;
                    &lt;App DesktopAppPath=&quot;%windir%\system32\mspaint.exe&quot; /&gt;
                    &lt;App DesktopAppPath=&quot;C:\Windows\System32\notepad.exe&quot; /&gt;
                &lt;/AllowedApps&gt;
            &lt;/AllAppsList&gt;
            &lt;StartLayout&gt;
                &lt;![CDATA[&lt;LayoutModificationTemplate xmlns:defaultlayout=&quot;http://schemas.microsoft.com/Start/2014/FullDefaultLayout&quot; xmlns:start=&quot;http://schemas.microsoft.com/Start/2014/StartLayout&quot; Version=&quot;1&quot; xmlns=&quot;http://schemas.microsoft.com/Start/2014/LayoutModification&quot;&gt;
                      &lt;LayoutOptions StartTileGroupCellWidth=&quot;6&quot; /&gt;
                      &lt;DefaultLayoutOverride&gt;
                        &lt;StartLayoutCollection&gt;
                          &lt;defaultlayout:StartLayout GroupCellWidth=&quot;6&quot;&gt;
                            &lt;start:Group Name=&quot;Group1&quot;&gt;
                              &lt;start:Tile Size=&quot;4x4&quot; Column=&quot;0&quot; Row=&quot;0&quot; AppUserModelID=&quot;Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic&quot; /&gt;
                              &lt;start:Tile Size=&quot;2x2&quot; Column=&quot;4&quot; Row=&quot;2&quot; AppUserModelID=&quot;Microsoft.ZuneVideo_8wekyb3d8bbwe!Microsoft.ZuneVideo&quot; /&gt;
                              &lt;start:Tile Size=&quot;2x2&quot; Column=&quot;4&quot; Row=&quot;0&quot; AppUserModelID=&quot;Microsoft.Windows.Photos_8wekyb3d8bbwe!App&quot; /&gt;
                              &lt;start:Tile Size=&quot;2x2&quot; Column=&quot;4&quot; Row=&quot;4&quot; AppUserModelID=&quot;Microsoft.BingWeather_8wekyb3d8bbwe!App&quot; /&gt;
                              &lt;start:Tile Size=&quot;4x2&quot; Column=&quot;0&quot; Row=&quot;4&quot; AppUserModelID=&quot;Microsoft.WindowsCalculator_8wekyb3d8bbwe!App&quot; /&gt;
                            &lt;/start:Group&gt;
                            &lt;start:Group Name=&quot;Group2&quot;&gt;
                              &lt;start:DesktopApplicationTile Size=&quot;2x2&quot; Column=&quot;2&quot; Row=&quot;0&quot; DesktopApplicationID=&quot;{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\mspaint.exe&quot; /&gt;
                              &lt;start:DesktopApplicationTile Size=&quot;2x2&quot; Column=&quot;0&quot; Row=&quot;0&quot; DesktopApplicationID=&quot;{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\notepad.exe&quot; /&gt;
                            &lt;/start:Group&gt;
                          &lt;/defaultlayout:StartLayout&gt;
                        &lt;/StartLayoutCollection&gt;
                      &lt;/DefaultLayoutOverride&gt;
                    &lt;/LayoutModificationTemplate&gt;
                ]]&gt;
            &lt;/StartLayout&gt;
            &lt;Taskbar ShowTaskbar=&quot;true&quot;/&gt;
        &lt;/Profile&gt;
    &lt;/Profiles&gt;
    &lt;Configs&gt;
        &lt;Config&gt;
            &lt;Account&gt;MultiAppKioskUser&lt;/Account&gt;
            &lt;DefaultProfile Id=&quot;{9A2A490F-10F6-4764-974A-43B19E722C23}&quot;/&gt;
        &lt;/Config&gt;
    &lt;/Configs&gt;
&lt;/AssignedAccessConfiguration&gt;

                </Data>
            </Item>
        </Add>
        <Final />
    </SyncBody>
</SyncML>

此示例显示 XML 的 CData。
<SyncML xmlns='SYNCML:SYNCML1.2'>
    <SyncBody>
        <Add>
            <CmdID>2</CmdID>
            <Item>
                <Target>
                    <LocURI>./Device/Vendor/MSFT/AssignedAccess/Configuration</LocURI>
                </Target>
                <Meta>
                    <Format xmlns="syncml:metinf">chr</Format>
                </Meta>
                <Data>
                    <![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config">
  <Profiles>
    <Profile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}">
      <AllAppsList>
        <AllowedApps>
          <App AppUserModelId="Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic" />
          <App AppUserModelId="Microsoft.ZuneVideo_8wekyb3d8bbwe!Microsoft.ZuneVideo" />
          <App AppUserModelId="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
          <App AppUserModelId="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
          <App AppUserModelId="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
          <App DesktopAppPath="%windir%\system32\mspaint.exe" />
          <App DesktopAppPath="C:\Windows\System32\notepad.exe" />
        </AllowedApps>
      </AllAppsList>
      <StartLayout>
        <![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
                      <LayoutOptions StartTileGroupCellWidth="6" />
                      <DefaultLayoutOverride>
                        <StartLayoutCollection>
                          <defaultlayout:StartLayout GroupCellWidth="6">
                            <start:Group Name="Group1">
                              <start:Tile Size="4x4" Column="0" Row="0" AppUserModelID="Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic" />
                              <start:Tile Size="2x2" Column="4" Row="2" AppUserModelID="Microsoft.ZuneVideo_8wekyb3d8bbwe!Microsoft.ZuneVideo" />
                              <start:Tile Size="2x2" Column="4" Row="0" AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
                              <start:Tile Size="2x2" Column="4" Row="4" AppUserModelID="Microsoft.BingWeather_8wekyb3d8bbwe!App" />
                              <start:Tile Size="4x2" Column="0" Row="4" AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
                            </start:Group>
                            <start:Group Name="Group2">
                              <start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationID="{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\mspaint.exe" />
                              <start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\notepad.exe" />
                            </start:Group>
                          </defaultlayout:StartLayout>
                        </StartLayoutCollection>
                      </DefaultLayoutOverride>
                    </LayoutModificationTemplate>
                  ]]]]><![CDATA[>
      </StartLayout>
      <Taskbar ShowTaskbar="true"/>
    </Profile>
  </Profiles>
  <Configs>
    <Config>
      <Account>MultiAppKioskUser</Account>
      <DefaultProfile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}"/>
    </Config>
  </Configs>
</AssignedAccessConfiguration>
]]>
                </Data>
            </Item>
        </Add>
        <Final />
    </SyncBody>
</SyncML>

配置服务提供程序参考