top of page

Using MS Graph to Duplicate Device Configuration Policies

Open https://developer.microsoft.com/en-us/graph/graph-explorer# in a browser.  On the left hand side, use the Sign in with Microsoft option to login using your Azure credentials (onmicrosoft.com ID).

Once you are signed in, enter the below URL into the Graph URL request input field, make sure that the HTTP verb select button is on GET and click on Run Query. https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations

You should see a “Success – Status Code 200” after the query is executed. In the Response Preview field, you’ll see a list of all your device configuration profiles. To find the name of the profile you want to copy and duplicate, simply do a Ctrl + F and type the Device Configuration Profile name.

Now, let’s make the Response Preview field to filter out all other profiles and only display the required profile you want to duplicate. To do this, you have to add the following parameters to the URL and query again. ?$filter=displayName eq ‘<name of the profile to be displayed>’

Example: https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations?$filter=displayName eq ‘Windows 10 – Windows Defender’ Now it will only display the desired configuration profile. Copy the JSON formatted code to a nice text editor like Notepad ++ or Sublime Text. Copy everything from the opening bracket ( { ) just above the “@odata.context” line to the closing bracket ( } ) just after your last setting.

While editing, you may want to remove anything that is generated automatically like “@odata.context”, “id”, “lastModifiedDateTime”, “supportsScopeTags”, “createdDateTime”, and “version”. Once those are removed, you may edit the “displayName” and “description” as per your choice and you can also make your configuration changes here if you know what you are doing 🙂

Now, we have a new profile in JSON format and we are ready to create the new profile using Graph. Open https://developer.microsoft.com/en-us/graph/graph-explorer and enter https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations in the URL request field. Copy and paste the newly created JSON text into the Request Body field, change the HTTP verb select button to POST, and Run Query . Done!

You should now get a notification with “Success – Status Code 201” Verify by getting into your Intune > Device configuration – Profiles blade, you’ll see this new profile. This is the best and accurate way to duplicate Device Config profiles and saves a lot of time.

28 views0 comments

Recent Posts

See All
bottom of page