Others

How to Export Azure AD Device Information with Selected Fields

Jason MillerJason Miller Nov 13, 2026 868 views

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.
Before you start

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.

Solution 1Recommended

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.

1
Open Windows PowerShell as administrator

Search for PowerShell in the Windows Start menu, right-click Windows PowerShell, and choose Run as administrator.

2
Install and import the Microsoft Graph module

Run Install-Module Microsoft.Graph -Scope CurrentUser in the elevated PowerShell window, then run Import-Module Microsoft.Graph.

3
Connect to Microsoft Graph with device read access

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.

4
Export selected device fields to CSV

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 Microsoft Graph PowerShell and selected fields
Use -All to avoid paged results: Without -All, Microsoft Graph commands may return only the first page of devices, so include -All when you need a complete export.
Free Microsoft Office alternative

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. 1. Download WPS Office: Go to the WPS Office download page and click Download WPS Office Free to install the suite.
  2. 2. Open an exported CSV in WPS Spreadsheets: Launch WPS Spreadsheets, select Open, and choose the Azure AD CSV file you exported.
  3. 3. Work with Office files without Microsoft 365: Use WPS Writer, Spreadsheets, or Presentation to open, edit, and save .docx, .xlsx, and .pptx files.
Open the exported Azure AD CSV in WPS Spreadsheets to inspect, filter, or format the selected fields.Full compatibility with Microsoft Office .xlsx, .docx, and .pptx files.Familiar ribbon interface makes the switch from Microsoft Office simple.Free and lightweight Office suite that runs on multiple platforms.Seamless migration for documents, spreadsheets, and presentations.
microsoft office alternative - wps office

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.