MDMDiagHtmlReport - Managed policies - config source

Bełko, Bartłomiej 1 Reputation point
2023-01-23T14:21:53.79+00:00

Within MDMDiagHtmlReport there is a section Managed policies. In this section last column in table is Config source which contains GUIDs

Using this GUID how to find out relevant policy within intune using cmdlets from Connect-MSGraph module?
User's image

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,712 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,313 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Crystal-MSFT 42,796 Reputation points Microsoft Vendor
    2023-01-24T02:22:52.9133333+00:00

    @Bełko, Bartłomiej, Thanks for posting in Q&A.

    To get the device configuration policy id and its name. we can try the following command:

    install-module microsoft.graph.intune
    
    Import-module microsoft.graph.intune
    
    connect-msgraph
    
    Get-IntuneDeviceConfigurationPolicy | fl id,displayname
    
    

    User's image

    Hope it can help.


    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.

    0 comments No comments

  2. Bełko, Bartłomiej 1 Reputation point
    2023-01-24T07:27:56.2733333+00:00

    This is not matching with GUIDs from MDMDiagHtmlReport.

    Here is the output of mentioned cmdlet:

    User's image

    and how it looks like in intune webconsole:

    User's image

    Using get-IntuneDeviceConfigurationPolicy I can only see configuration profiles with Profile type = custom

    0 comments No comments

  3. Crystal-MSFT 42,796 Reputation points Microsoft Vendor
    2023-01-24T08:10:37.2533333+00:00

    @Bełko, Bartłomiej, Thanks for the reply.

    After double checking, I find the GUIDs in MDMDiagnosticreport is for Config Source. After checking the GUID in my environment. I notice it is not related to policy. But related with enrollment. You can find the GUID under HKLM\Software\Microsoft\Enrollments\GUID.

    For the command, it seems not include all the types. After doing more research, I find the script in the following link to get the configuration profile you like:

    https://github.com/microsoftgraph/powershell-intune-samples

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

    For example, we can use DeviceConfiguration_Get.ps1 under Deviceconfiguration to retrieve the device configuration policy information. For setting catalog policy, we can use SettingsCatalog_Get.ps1 under "SettingsCatalog" to get these policy information.

    Hope it can help.


    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.