Intune Custom Configuration Profiles with Custom OMA-URIs not working

Holger Voges 116 Reputation points

Hello Everybody,

I have some problems with custom configuration Profiles. I want to set autoplay according to the documentation:
I have set the following parameters ( and also other values as 0 ):

OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Autoplay/TurnOffAutoPlay
Value: <enabled/><data id="NoDriveTypeAutoRun" value="255" >

The configuration is failing with the following error in the Eventlog:

MDM PolicyManager: Set policy string, Policy: (TurnOffAutoPlay), Area: (Autoplay), EnrollmentID requesting set: (27747F24-8501-4236-B4AB-C92D405240EC), Current User: (Device), String: (<enabled/><data id="NoDriveTypeAutoRun" value="255" >), Enrollment Type: (0x6), Scope: (0x0), Result:(0x80004005) Unspecified error.

4005 seems to be Access denied.

As I came to no conclusion, I tried to set the value via Powershell and WMI bridge using the following command:

New-CimInstance -Namespace "root\cimv2\mdm\dmmap" -ClassName "MDM_Policy_Config01_Autoplay02" -Property @{ParentID="./Device/Vendor/MSFT/Policy/Config";InstanceID="Autoplay";TurnOffAutoPlay='0'}

TurnOffAutoPlay is a string, but I also tried 0 and 255 and true and $true, but still I get an error message:

Microsoft.Management.Infrastructure.CimException: One or more parameter values passed to the method were invalid.

I tried another OMA-URI configuration with the same result, but the Demo-Script from the configuration is just running fine:

The problem is persistent from Windows 10 1703 Enterprise to Windows 10 20H2 Enterprise. I am running out of ideas. Can anybody help, please?

Thank you very much,

Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,708 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,300 questions
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 42,631 Reputation points Microsoft Vendor

    @Holger Voges , Based on my testing , when I deploy the following value to "./User/Vendor/MSFT/Policy/Config/Autoplay/TurnOffAutoPlay", I find only the following registry key is created, The Autoplay is not disabled.

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer NoDriveTypeAutoRu

    Then I go to check the AutoPlay setting and find the related registry key is
    DisableAutoplay Dword 1

    As another method, we can create a script to deploy the above registry key to make it work.

    Hope it can help.

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Holger Voges 116 Reputation points

    Hi Chrystal,
    thanks for your answer. So my above settings are working for you? My problem is not the feature itself but the fact that I get an error-message although, as far as I can tell, I have done everything according to the documentation. I would be happy if the policy-key would be created, it doesn´t have to disable autoplay at all. :-)


  2. Holger Voges 116 Reputation points

    Hi Chrystal,

    thank you for your quick answer. I have been an idiot and used the Valuename instead of the ID. Thank you so much!