Share via

Custom ADMX/ADML files failing to upload into Intune

2026-05-08T12:17:57.0166667+00:00

I am using the admx/adml files below to attempt to map a network drive via Intune configuration policy, but it is failing to upload with a 'Object reference not set to an instance of an object' error.

admx file:

<?xml version="1.0" encoding="utf-8"?>

<policyDefinitions

revision="1.0"

schemaVersion="1.0"

xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">

<policyNamespaces>

*<target namespace="Custom.DriveMapping" prefix="dm"/>*

</policyNamespaces>

<supportedOn>

*<definitions>*

  *<definition name="SUPPORTED_Windows10"*

              *displayName="$(string.SUPPORTED_Windows10)">*

    *<or>*

      *<range minVersion="10.0.0"/>*

    *</or>*

  *</definition>*

*</definitions>*

</supportedOn>

<categories>

*<category*

  *name="NetworkDriveMapping"*

  *displayName="$(string.CategoryName)" />*

</categories>

<policies>

*<policy*

  *name="Map_P_Drive"*

  *class="User"*

  *supportedOn="SUPPORTED_Windows10"*

  *displayName="$(string.Map_P_Name)"*

  *explainText="$(string.Map_P_Explain)"*

  *key="HKCU\Network\P"*

  *category="NetworkDriveMapping">*

  *<elements>*

    *<text id="RemotePath" valueName="RemotePath" required="true"/>*

  *</elements>*

*</policy>*

</policies>

</policyDefinitions>

adml file:

<?xml version="1.0" encoding="utf-8"?>

<policyDefinitionResources

revision="1.0"

schemaVersion="1.0"

xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitionResources">

<resources>

*<stringTable>*

  *<string id="SUPPORTED_Windows10">*

    *Windows 10 and later*

  *</string>*

  *<string id="CategoryName">*

    *Network Drive Mapping*

  *</string>*

  *<string id="Map_P_Name">*

    *Map P: drive (Public Share)*

  *</string>*

  *<string id="Map_P_Explain">*

    *Maps drive P: to the public share.*

  *</string>*

*</stringTable>*

</resources>

</policyDefinitionResources>

Can anyone help me to diagnose the issue?

Microsoft Security | Intune | Configuration
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-05-08T12:18:11.1233333+00:00

    The upload failure is caused by limitations and validation rules in Intune’s custom ADMX ingestion, not by an obvious XML syntax error in the snippets.

    From the documented behavior of Intune ADMX import:

    1. Built‑in Windows policy areas must not be re‑implemented via custom ADMX
      • Intune explicitly states that ADMX settings already built into Windows (those under C:\Windows\PolicyDefinitions) are enabled through CSPs and must not be imported if the intent is to configure them. Instead, the Settings Catalog or a custom profile should be used.
      • Only ADMX for Win32/Desktop Bridge apps or true third‑party/custom namespaces are supported. Drive mappings under HKCU\Network\<drive> are not part of the supported Win32/desktop app policy ingestion scenarios described.
    2. Not all registry locations are supported for custom ADMX
      • Intune only allows custom ADMX to target specific registry locations supported by the Win32 and Desktop Bridge app ADMX policy ingestion mechanism.
      • The documentation notes that “Not all areas of the registry can be set using custom ADMX.” If the policy writes to an unsupported hive/path, the ADMX import can fail.
      • The key HKCU\Network\P used in the policy is not listed as a supported app policy location in the referenced Win32/desktop app ingestion guidance, so the import can fail during validation and surface as a generic error such as “Object reference not set to an instance of an object.”
    3. General Intune ADMX import rules that can also cause failures
      • Only one ADML per ADMX and language is allowed, and the ADML language must be specified correctly during upload.
      • If an ADMX references another ADMX (for example, a prerequisite like Windows.admx) and that prerequisite is not uploaded, Intune throws a specific namespace error (NamespaceMissing:Microsoft.Policies.Windows). In this case there is no such reference, so the failure is more likely due to unsupported registry locations rather than missing prerequisites.

    Given these constraints, the drive‑mapping ADMX/ADML is not a supported use of Intune’s custom ADMX import. To deploy drive mappings via Intune, use one of the supported methods instead of custom ADMX:

    • Use the Settings Catalog or a custom configuration profile backed by a supported CSP.
    • For scenarios that require registry edits, use a script or a Win32 app deployment rather than custom ADMX, ensuring the method complies with Intune’s supported registry paths.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.