How to Export All Azure AD Users with Microsoft Graph and Azure Data Factory
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.

- 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.
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.
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.
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.
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.
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.

Consult Specialized Microsoft Q&A Forums
Because Azure Data Factory and Microsoft Graph API configurations involve specialized enterprise infrastructure, seeking expert review is recommended for persistent issues.
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. Download WPS Office: Visit the official WPS website and download the free WPS Office suite for your operating system.
- 2. Install the Software: Run the installer and follow the on-screen instructions to complete the setup.
- 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.

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.




