Forum Discussion
Shubham kumar
Nov 23, 2018Copper Contributor
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
- Helge56Copper Contributor
ChrisHoardMVPVery easy, very nice, thanks for the short Oneliner..
But how to make, if i have to read more than thousand devices?
- jamesOnco360Copper 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
- LD970Copper 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 RajalingariCopper 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?
- jamesOnco360Copper Contributor
Has there been any more answers on this? I am getting the same issue when running the commands. Praneeth Rajalingari ChrisHoardMVP