How to Export Azure AD Device Information with Selected Fields
Question details
User needs to export Azure Active Directory device objects into a file that contains only selected fields, such as device name, ID, operating system, or trust type.
- Product
- Microsoft Azure Active Directory and Microsoft Graph PowerShell
- Device & OS
- not provided
- Scenario
- An IT administrator must create a filtered device inventory or report from Azure AD using only selected columns.
- Observed behavior
- The desired state is a CSV or similar export containing only the required Azure AD device properties.
Confirm you have an account with sufficient Azure AD read permissions and access to Windows PowerShell, and decide which device properties you need before running the export. Install only the PowerShell module that matches your tenant's current tooling.
Export Azure AD device information with Microsoft Graph PowerShell and selected fields
Use this method when you want a current, permission-scoped export and need to choose only the device properties that should appear in the CSV output.
Microsoft Graph PowerShell is the current recommended PowerShell module for Azure AD device queries. It retrieves device objects that you can filter client-side with Select-Object before exporting only the columns you need.
Search for PowerShell in the Windows Start menu, right-click Windows PowerShell, and choose Run as administrator.
Run Install-Module Microsoft.Graph -Scope CurrentUser in the elevated PowerShell window, then run Import-Module Microsoft.Graph.
Run Connect-MgGraph -Scopes Directory.Read.All, Device.Read.All and sign in with an Azure AD account that has read access to device objects.
Run Get-MgDevice -All | Select-Object DisplayName, DeviceId, OperatingSystem, TrustType | Export-Csv -Path C:\temp\azure-ad-devices.csv -NoTypeInformation. Replace the property names after Select-Object with the exact columns you need.

Export Azure AD device information with Azure PowerShell and selected properties
Use this method if your tenant still uses the AzureAD PowerShell module or if you need to run an older script that depends on AzureAD cmdlets.
WPS Office: A Free, Lightweight Microsoft Office Alternative for Your Daily Files
WPS Office cannot query Azure Active Directory, but it is a free and lightweight Microsoft Office alternative that opens, edits, and saves Word, Excel, and PowerPoint files. It keeps the familiar ribbon UI and supports Microsoft Office formats, so you can review the exported CSV and continue daily document work without a subscription.
- 1. Download WPS Office: Go to the WPS Office download page and click Download WPS Office Free to install the suite.
- 2. Open an exported CSV in WPS Spreadsheets: Launch WPS Spreadsheets, select Open, and choose the Azure AD CSV file you exported.
- 3. Work with Office files without Microsoft 365: Use WPS Writer, Spreadsheets, or Presentation to open, edit, and save .docx, .xlsx, and .pptx files.

Frequently Asked Questions
Which permissions do I need to export Azure AD device information?
You need at least Directory.Read.All or Device.Read.All permission in Microsoft Graph, or an Azure AD role that includes read access to device objects. The exact permission depends on the fields you export.
Can I export only selected Azure AD device fields without using PowerShell?
The Azure AD admin center does not provide a built-in way to choose arbitrary columns for device export. You can export the available list, then open the CSV in WPS Spreadsheets or Excel and delete or hide the columns you do not need.
Why is my Get-AzureADDevice command returning only a few objects?
Older AzureAD PowerShell commands may be limited unless you use -All:$true. In Microsoft Graph, use Get-MgDevice -All to bypass paging and return the complete device list.
Can WPS Office export Azure AD device information?
No. WPS Office is an office suite and cannot query Azure AD. Use Microsoft Graph PowerShell or Azure PowerShell for the export, and WPS Office can open the resulting CSV for review or formatting.
What is a recommended command to export Azure AD device information to CSV?
A common Microsoft Graph example is: Get-MgDevice -All | Select-Object DisplayName, DeviceId, OperatingSystem, TrustType | Export-Csv -Path C:\temp\azure-ad-devices.csv -NoTypeInformation. Replace the property names with the exact fields you need.




