How to retrieve full list of Device Configuration Policies in Intune using API

Dean Egan 50 Reputation points
2024-08-08T14:07:45.0966667+00:00

Hello,

I am using Get-MgDeviceManagementDeviceConfiguration -All powershell cmdlet and the v1.0/deviceManagement/deviceConfigurations API endpoint to try list all of our device configuration policies in Intune.

The problem I'm facing is that is it only returning policies that have a type of the following:

  • Custom Policies
  • Endpoint Protections
  • Device Feature
  • Device Restriction
  • MS Defender for Endpoint
  • Device firmware configurations

And it is ignoring policies with the following type:

And it is ignoring policies with the following type:

  • Admin Template
  • Setting Catalogs
  • VPN Policies
  • Windows health Monitoring
  • WifI
  • Trusted Certificate
  • SCEP certificates

Can someone please tell me how I can return ALL config policies?

Kind Regards,

Dean

Microsoft Security Intune Other
Microsoft Security Microsoft Graph
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2024-08-08T17:34:26.0733333+00:00

    What the Intune UI shows as a "configuration policy" can be a number of other object types, such as:

    1. /deviceManagement/configurationPolicies
    2. /deviceManagement/deviceConfigurations
    3. /deviceManagement/groupPolicyConfigurations
    4. /deviceManagement/resourceAccessProfiles
    5. /deviceAppManagement/mobileAppConfigurations

    ... and more. You can use the relevant cmdlets to retrieve them. Keep in mind some are only available in beta (i.e. Get-MgBetaDeviceManagementConfigurationPolicy)

    0 comments No comments

  2. Anonymous
    2024-08-09T01:50:53.51+00:00

    @Dean Egan Thanks for posting in our Q&A.

    Based on my research, I find someone has discussed this issue. Here is the link:

    https://techcommunity.microsoft.com/t5/microsoft-intune/get-intunedeviceconfigurationpolicy-returns-only-some-of-my/m-p/2082462

    Hope it will give you some ideas.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


Your answer

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