Forum Discussion

Shubham kumar's avatar
Shubham kumar
Copper Contributor
Nov 23, 2018
Solved

Azure AD join device list export

Hi all,

Can you please help me to export Azure AD join device list from azure portal?

 

 

Thanks and Regards,

Shubham Kumar

 

  • Hi Shubham,

    You can get a list of Azure AD joined devices through the Get-MsolDevice cmdlet in Powershell.

    https://docs.microsoft.com/en-us/powershell/module/msonline/get-msoldevice?view=azureadps-1.0

    The Get-MsolDevice -All -ReturnRegisteredOwners cmdlet will output a list of all devices and their owners which contain the output DeviceTrustType which is the device trust type. The value could be one of the following: Workplace Joined, AzureAD Joined, Domain Joined.

    All you need to do is combine this with an export command such as | Export-Csv C:\Temp\LicensedUsers.csv and this should give you the list.

     

    AFAIK, there isn't a way to do this through the portal currently.

     

    Best, Chris

  • Hi Shubham,

    You can get a list of Azure AD joined devices through the Get-MsolDevice cmdlet in Powershell.

    https://docs.microsoft.com/en-us/powershell/module/msonline/get-msoldevice?view=azureadps-1.0

    The Get-MsolDevice -All -ReturnRegisteredOwners cmdlet will output a list of all devices and their owners which contain the output DeviceTrustType which is the device trust type. The value could be one of the following: Workplace Joined, AzureAD Joined, Domain Joined.

    All you need to do is combine this with an export command such as | Export-Csv C:\Temp\LicensedUsers.csv and this should give you the list.

     

    AFAIK, there isn't a way to do this through the portal currently.

     

    Best, Chris

    • Helge56's avatar
      Helge56
      Copper Contributor

      ChrisHoardMVPVery easy, very nice, thanks for the short Oneliner..

      But how to make, if i have to read more than thousand devices?

    • jamesOnco360's avatar
      jamesOnco360
      Copper Contributor

      I am also getting System.Collections.Generic.List`1[System.String] for the registered owners.  I've tried various methods to get the data to populate, however, since the username is behind {} it never seems to want to populate correctly.  Is the output an array of some sort, or just a generic text output?  I need this to more accurately control my inventory. ChrisHoardMVP 

      • LD970's avatar
        LD970
        Copper Contributor

        jamesOnco360Wondering if anyone has resolved the issue with returning the 

        System.Collections.Generic.List`1[System.String]

         result for Registered owners (instead of the UPN) when running the Azure AD Get-MSolDevice script and exporting to csv.  Thanks! ChrisHoardMVP 

    • Praneeth Rajalingari's avatar
      Praneeth Rajalingari
      Copper Contributor

      When i try to export the list with registeredowners i am getting 

      System.Collections.Generic.List`1[System.String]

      in the output. can you help me provide the correct expression?

Resources