This guide describes how to correctly configure SwitchCraft policies using Microsoft Intune Custom Profiles (OMA-URI).
Important
Troubleshooting: If you see multiple policies with error -2016281112, read the detailed troubleshooting guide first for a step-by-step solution.
If you see error -2016281112 in Intune for your OMA-URI settings, it is likely because the Data Type was set incorrectly.
Important
Data Type Confusion:
- In the Intune Portal, you must select "String" (or sometimes labeled "String (XML)") from the dropdown.
- The Value must be an XML snippet (e.g.,
<enabled/>), NOT a simple text string or number.
Why? These policies are backed by an ADMX file. In the OMA-URI world, ADMX-backed policies are treated as "String" types that accept an encoded XML payload to configure the specific policy setting. Choosing "Integer" or "Boolean" will fail because the underlying ADMX handler expects a String containing XML.
Ensure you have ingested the ADMX file first.
- OMA-URI:
./Device/Vendor/MSFT/Policy/ConfigOperations/ADMXInstall/SwitchCraft/Policy/SwitchCraftPolicy - Data Type: String
- Value: [Content of SwitchCraft.admx]
Important
Correct OMA-URI Path: The path is built from the ADMX file's target prefix (switchcraft) and namespace (FaserF.SwitchCraft). The namespace dot (.) is replaced with a tilde (~), resulting in SwitchCraft~Policy~FaserF~SwitchCraft~SwitchCraft~Enforced.
All settings below use the base path:
./User/Vendor/MSFT/Policy/Config/SwitchCraft~Policy~FaserF~SwitchCraft~SwitchCraft~Enforced~[Category]/[PolicyName]
Category: General_Enf
- OMA-URI:
...~General_Enf/EnableWinget_Enf - Intune Selection: String
- XML Value (Enable):
<enabled/> - XML Value (Disable):
<disabled/>
- OMA-URI:
...~General_Enf/CompanyName_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="CompanyNameBox" value="Acme Corp"/>
- OMA-URI:
...~General_Enf/GitRepoPath_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="GitRepoPathBox" value="C:\SwitchCraft\Repo"/>
- OMA-URI:
...~General_Enf/CustomTemplatePath_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="CustomTemplatePathBox" value="C:\SwitchCraft\Templates"/>
- OMA-URI:
...~General_Enf/WingetRepoPath_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="WingetRepoPathBox" value="C:\SwitchCraft\WingetRepo"/>
- OMA-URI:
...~General_Enf/Theme_Enf - Intune Selection: String
- XML Value:
(Valid values: System, Light, Dark)
<enabled/> <data id="ThemeDropdown" value="Dark"/>
Category: Updates_Enf
- OMA-URI:
...~Updates_Enf/UpdateChannel_Enf - Intune Selection: String
- XML Value:
(Valid values: stable, beta, dev)
<enabled/> <data id="UpdateChannelDropdown" value="stable"/>
Category: AI_Enf
- OMA-URI:
...~AI_Enf/AIProvider_Enf - Intune Selection: String
- XML Value:
(Valid values: local, openai, gemini)
<enabled/> <data id="AIProviderDropdown" value="openai"/>
- OMA-URI:
...~AI_Enf/AIKey_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="AIKeyBox" value="sk-your-api-key"/>
Category: Intune_Enf
- OMA-URI:
...~Intune_Enf/GraphTenantId_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="GraphTenantIdBox" value="00000000-0000-0000-0000-000000000000"/>
- OMA-URI:
...~Intune_Enf/GraphClientId_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="GraphClientIdBox" value="00000000-0000-0000-0000-000000000000"/>
- OMA-URI:
...~Intune_Enf/GraphClientSecret_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="GraphClientSecretBox" value="your-client-secret"/>
- OMA-URI:
...~Intune_Enf/IntuneTestGroups_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="IntuneTestGroupsBox" value="GroupID1,GroupID2"/>
Category: Security_Enf
- OMA-URI:
...~Security_Enf/SignScripts_Enf - Intune Selection: String
- XML Value:
<enabled/>
- OMA-URI:
...~Security_Enf/CodeSigningCertThumbprint_Enf - Intune Selection: String
- XML Value:
<enabled/> <data id="CodeSigningCertThumbprintBox" value="THUMBPRINT_HEX_STRING"/>
- OMA-URI:
./User/Vendor/MSFT/Policy/Config/SwitchCraft~Policy~FaserF~SwitchCraft~SwitchCraft~Enforced/DebugMode_Enf - Intune Selection: String
- XML Value:
<enabled/>