Forum Discussion

Coopem16's avatar
Coopem16
Brass Contributor
Sep 17, 2021
Solved

Byod Device information Via Powershell

Hello,

We need to try and pull Device Model for our BYOD (registered devices).

It does not look like it is an Available property using Get-AzureADUserRegisteredDevice. Does anyone know how to Gather this info. We want to know how many of our BYOD devices can no longer Upgrade their OS on iOS and Android phones. 

Our Risks folks want to the information for Vulnerability Processes.  

  • DxR's avatar
    DxR
    Sep 20, 2021
    For AAD registered without enrollment use the method from Jannik with this Graph API query :
    GET https://graph.microsoft.com/v1.0/devices

    This post can be usefull :
    https://smsagent.blog/2018/10/22/querying-for-devices-in-azure-ad-and-intune-with-powershell-and-microsoft-graph/

    Graph API :
    https://docs.microsoft.com/en-us/graph/api/device-list?view=graph-rest-1.0&tabs=http#example-1-get-a-list-of-devices

5 Replies

  • Coopem16 :

    With the follow Graph provider you get the information you need:

    https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/

     

    Here you can find a script from which you can get the PS function:

    https://github.com/microsoftgraph/powershell-intune-samples/blob/master/ManagedDevices/ManagedDevices_Get.ps1

  • The Azure AD PowerShell cmdlets may not be the best option here, device model details aren’t returned. Have a look at the Microsoft Graph PowerShell module and it’s Get-MgDevice cmdlet.
    • Coopem16's avatar
      Coopem16
      Brass Contributor
      Thanks, I will. Need to see what I can with Graph, for registered devices without enrollment.
      • DxR's avatar
        DxR
        Iron Contributor
        For AAD registered without enrollment use the method from Jannik with this Graph API query :
        GET https://graph.microsoft.com/v1.0/devices

        This post can be usefull :
        https://smsagent.blog/2018/10/22/querying-for-devices-in-azure-ad-and-intune-with-powershell-and-microsoft-graph/

        Graph API :
        https://docs.microsoft.com/en-us/graph/api/device-list?view=graph-rest-1.0&tabs=http#example-1-get-a-list-of-devices

Resources