Intune MSGraph Command for Configuration Profiles not working

Darko Kljajic 31 Reputation points
2023-02-03T13:53:16.0333333+00:00

Hi,

Please inform me about MSGraph PowerShell command to get all Intune Configuration Profiles.

My environment has 136 configuration profiles.

v1.0 Get-MgDeviceManagementDeviceConfiguration returns 63 objects

beta Get-MgDeviceManagementDeviceConfiguration returns 100 objects

No command honors -All or -Skip parameter or return all objects.

Please help.

Thank you in advance.

Regards,

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,902 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,043 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ruud Gijsbers Rademakers 551 Reputation points
    2023-02-03T18:17:57.47+00:00

    Hi Darko, did you use -All:$true, or just -All? The first should provide you with all the configured policies. Do you also have policies configured from the endpoint security blade? Regards Ruud

    0 comments No comments

  2. Lu Dai-MSFT 28,236 Reputation points
    2023-02-06T02:33:42.3533333+00:00

    @Darko Kljajic Thanks for posting in our Q&A.

    For this issue, administrative templates profiles and settings catalog profiles are not listed in this request.

    Administrative templates profiles are listed in "groupPolicyConfiguration".

    https://learn.microsoft.com/en-us/graph/api/intune-grouppolicy-grouppolicyconfiguration-get?view=graph-rest-beta

    Honestly, I didn't know where we can get settings catalog policies.

    However, I try to get all configuration Profiles via powershell. It works well. It is suggested to try.

    Install-module Intunestuff -Force
    
    connect-MSgraph 
    
    Get-intunePolicy -policyType 'ConfigurationPolicy' -basicOverview -flatOutput
    
    

    For more details, please refer to the following link:

    https://doitpsway.com/get-all-intune-policies-using-powershell-and-graph-api

    Note: Non-Microsoft link, just for the reference.

    Hope it will give you some ideas.


    If the answer is the right solution, 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.