Adding to @Brian T. Jackett comment. Microsoft Graph data connect (MGdc) would also remove the throttling factor and allow you to extract emails in Bulk very quickly. With MGdc you can either extract entities from all users in your tenant or select specific groups. You can also filter out fields for privacy concerns, so if for example you want to extract information about all emails sent but not retrieve the body of those emails, you can.
Read all Emails Against Search Query For Office365 Outlook
I want to read all emails within my tenant against a query using Office365 Outlook API. Currently, I am enumerating one user at a time and extracting all the emails for it
This approach is not scalable as in the case of 1000+ users it will take a lot of time. I want to extract the emails for all users against a query but without enumerating individual users.
Microsoft Security | Microsoft Graph
2 answers
Sort by: Most helpful
-
35247258 86 Reputation points Microsoft Employee Moderator2021-05-03T19:32:13.163+00:00 -
Brian T. Jackett 1 Reputation point Microsoft Employee Moderator2021-05-03T18:42:09.2+00:00 Agreed that that approach isn't as scalable. Have you explored Microsoft Graph data connect? For extracting emails (or other supported data sets) at scale that would be a recommended starting point. If that doesn't meet your needs we'd love to hear your feedback.
Overview of Microsoft Graph data connect - Get access to data at scale
https://learn.microsoft.com/en-us/graph/data-connect-concept-overview#get-access-to-data-at-scaleGet started with Microsoft Graph data connect
https://learn.microsoft.com/en-us/graph/data-connect-get-started?view=graph-rest-1.0