Others

How to Export an On-Premises Distinguished Name to CSV from Azure AD

Aamir Naveed AkramAamir Naveed Akram Oct 28, 2026 868 views

Question details

The user needs to export hybrid identity data, specifically on-premises distinguished names, into a CSV file format from the Azure Active Directory (Microsoft Entra) portal.

How to Export an On-Premises Distinguished Name to CSV from Azure AD
Product
Azure Active Directory (Microsoft Entra)
Device & OS
not provided
Scenario
Attempting to extract specific on-premises directory attributes to a CSV format for auditing or directory management.
Observed behavior
Requires specific PowerShell scripts or advanced portal procedures to accurately extract and export hybrid identity attributes.
Before you start

Gather your exact directory attribute names, verify your Azure AD synchronization method, and note the portal location (Azure AD or Entra) before requesting a solution.

Solution 1Recommended

Consult the Microsoft Exchange Hybrid IT Pro Community

Because exporting specific hybrid identity data often requires custom PowerShell scripts, the best approach is to request a tailored solution from Microsoft experts.

Exporting standard user lists can be done directly in the portal, but extracting specific hybrid properties like the on-premises distinguished name usually requires advanced querying. The Microsoft Q&A community is equipped to provide the exact cmdlets or scripts needed for your environment.

1
Navigate to the support community

Go to the Microsoft Q&A platform and navigate to the Office Exchange Hybrid IT Pro community.

2
Create a new question thread

Click 'Ask a question' to start a new thread detailing your need to export on-premises distinguished names.

3
Provide environment details

Include the specific directory attribute name, your Active Directory synchronization method, the portal you are using, and your desired CSV format structure.

4
Apply the provided script

Once an expert provides the supported PowerShell procedure, run the commands in your Azure Cloud Shell or local PowerShell module connected to Entra ID to generate your CSV.

Consult the Microsoft Exchange Hybrid IT Pro Community
Include Full Details: Providing your exact sync method ensures the PowerShell script or procedure provided will work correctly in your specific hybrid environment.
Free Microsoft Office alternative

Easily Open and Analyze Exported CSV Files with WPS Office

Once you successfully export your Azure AD directory data into a CSV file, use WPS Office to open, filter, and analyze the records. WPS Office is a free, lightweight suite that handles large datasets effortlessly while maintaining seamless compatibility with Microsoft Office formats.

  1. 1. Download and Install: Download WPS Office Free from the official website and install it on your computer.
  2. 2. Open WPS Spreadsheet: Launch the WPS Office suite and select the Spreadsheet application.
  3. 3. Import the CSV File: Click 'File' > 'Open' and select the Azure AD CSV export to instantly view and format your directory data.
Easily open and filter large CSV exports generated from Azure ADFully compatible with Microsoft Excel formats (.xlsx, .csv, .xls)Lightweight installation with a familiar, easy-to-use interfaceFree comprehensive suite including Spreadsheet, Writer, and Presentation tools
microsoft office alternative - wps office

Frequently Asked Questions

Can I export all Azure AD users to a CSV directly from the admin portal?

Yes, you can export a general list of users to a CSV file from the 'All users' section in the Azure AD (Microsoft Entra) portal by clicking the 'Download users' button. However, highly specific hybrid attributes may not be included in this default report.

How do I open a CSV file without losing formatting or leading zeros?

Instead of double-clicking the CSV file, open a spreadsheet program like WPS Spreadsheet or Microsoft Excel first. Go to the Data tab and use the 'Import Data' feature, which allows you to set specific columns to 'Text' so leading zeros are preserved.

What is an on-premises distinguished name?

An on-premises distinguished name (DN) is a sequence of relative distinguished names that uniquely identifies an object within a local Active Directory domain structure, formatted similarly to CN=John Doe,OU=Users,DC=Company,DC=com.