logo
search
Others

How to Export All Azure AD Users with Microsoft Graph and Azure Data Factory

Chanuka GeekiyanageChanuka Geekiyanage Sep 30, 2026 868 views

Question details

The user needs to correctly configure a Microsoft Graph and Azure Data Factory pipeline to export all Azure AD users without encountering inconsistent record counts.

How to Export All Azure AD Users with Microsoft Graph and Azure Data Factory
Product
Azure Data Factory & Microsoft Graph
Device & OS
not provided
Scenario
Extracting large datasets of user accounts from Azure Active Directory to a destination database or storage solution.
Observed behavior
The data export returns inconsistent or incomplete user record counts due to misconfigured pagination, filtering, connector settings, or missing header requirements.
Before you start

Ensure you have the necessary administrative privileges in Azure Active Directory, proper API permissions granted to your application, and access to the Azure Data Factory workspace.

Solution 1Recommended

Configure Microsoft Graph API Pagination and Headers Correctly

Properly setting up the API request headers and handling pagination ensures all user records are retrieved rather than just the first batch.

Microsoft Graph limits the number of records returned in a single API call. If pagination is not handled properly, Azure Data Factory will only fetch the first page of results, leading to incomplete data exports.

1
Verify the Top Parameter

Check your Microsoft Graph query to ensure the '$top' parameter is set appropriately (e.g., '$top=999' for users) to optimize the number of records retrieved per page.

2
Handle the NextLink for Pagination

Configure your Azure Data Factory Copy Data activity or Web activity to handle the '@odata.nextLink' property so the pipeline automatically iterates through the entire Azure AD directory.

3
Add Required Headers for Advanced Queries

If you are using advanced filtering or counting, add the 'ConsistencyLevel: eventual' HTTP header to your API request and include the '$count=true' query parameter.

Configure Microsoft Graph API Pagination and Headers Correctly
Advanced Query Limitations: Certain complex filters or sorting operations on Azure AD user objects strictly require the ConsistencyLevel header; otherwise, the API will return a bad request error or incomplete data.
Free Microsoft Office alternative

Analyze Your Exported Azure Data with WPS Office

Once you have successfully exported your Azure AD user data to CSV or Excel formats, use WPS Office to analyze, filter, and format your datasets. It provides a highly compatible, free alternative to Microsoft Office for seamless data management.

  1. 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your operating system.
  2. 2. Install the Software: Run the installer and follow the on-screen instructions to complete the setup.
  3. 3. Open Your Exported Data: Launch WPS Spreadsheets and open the CSV or Excel file exported from your Azure Data Factory pipeline to analyze the Azure AD user records.
Seamlessly open and edit exported Excel (.xlsx) and CSV files from Azure Data Factory.Fully compatible with Microsoft Office document formats and macros.Lightweight software that handles massive datasets quickly without lagging.Familiar user interface enables immediate productivity with zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Azure AD user export return exactly 100 or 999 records?

This happens when pagination is not configured correctly in your pipeline. Microsoft Graph returns a default maximum of 100 records (or up to 999 if explicitly requested) per response. You must configure Azure Data Factory to follow the '@odata.nextLink' URL to retrieve the rest of the users.

What headers do I need to filter Azure AD users effectively?

When using advanced filtering operators or the '$count' parameter on Azure AD resources, Microsoft Graph requires you to include the 'ConsistencyLevel' header set to 'eventual' in your HTTP request.

How can I handle API rate limits during massive data exports?

To prevent your export pipeline from failing due to HTTP 429 (Too Many Requests) errors, configure a retry policy within your Azure Data Factory activity. Set appropriate retry counts and intervals to back off and resume the export gracefully.