MS Entrant ID MS Exchange Online data pull

Shafiq Momin 20 Reputation points
2026-08-28T14:44:47.4266667+00:00

Hi Members,

While pulling information from Exchange Online for all users for last login it is very slow

i am using powershell and also graph API 2 hr for 1300 users i have 18K user

how to speed up this

Regards

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

0 comments No comments

Answer accepted by question author
Ruby Nguyen 1,565 Reputation points Independent Advisor
2026-08-28T15:04:05.7433333+00:00

Good day Shafiq

Unfortunately, this behavior is expected when collecting last login data for a large number of users. Querying each user individually through PowerShell or Microsoft Graph generates a high volume of API requests, which can slow down the process and trigger throttling. 

To improve performance, you may consider the following: 

Ensure that your operating system and Exchange Online PowerShell module are fully updated while avoiding legacy Remote PowerShell connections. 

Option 1: Use Microsoft Entra signInActivity 

Retrieve users together with the signInActivity property. 

Use LastSuccessfulSignInDateTime to identify the latest successful account access. 

Avoid running separate mailbox queries for each user. 

Option 2: Reduce the number of Graph requests 

Request only the properties you need. 

Process users using paging or batch retrieval. 

Avoid multiple API calls per user whenever possible. 

Option 3: Check for throttling 

Review your script for HTTP 429 responses. 

Honor the Retry-After value returned by Microsoft Graph. 

Implement retry and backoff logic instead of sending immediate repeat requests. 

Additional information is available in the following resources: 

signInActivity resource type - Microsoft Graph v1.0 | Microsoft Learn 

Microsoft Graph throttling guidance - Microsoft Graph | Microsoft Learn 

About the Exchange Online PowerShell V3 module | Microsoft Learn 

I hope this information is helpful. If you have any questions or need further support, please don’t hesitate to reach out at any time. 

Thank you for your patience and understanding. 


If the answer is helpful, please click "Yes" and kindly upvote it. If you have any extra questions about this answer, please click "Comment".            

Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.