question

PavanKushwaha-0345 avatar image
0 Votes"
PavanKushwaha-0345 asked GlenScales-6756 answered

How to Fetch Mails From MS-Exchange Using Graph API?

Hi,

Can someone help me out that how I can fetch mails from Exchange User's mailbox using Microsoft Graph API?

Graph API is working fine for the online exchange users (O365) not for offline users (local users), but there is another problem too. Graph API provides Rest APIs by using which we can access each mailbox individually which will become very server loaded work if more than 1000K mailbox need to be scanned one by one and also a time taking process.

I want to fetch scan all user's mailbox at once both offline and online. Just like Microsoft Powershell do.

Is there any way to do so?

Any help will be deeply appreciated.

Thanks

microsoft-graph-mail
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GlenScales-6756 avatar image
0 Votes"
GlenScales-6756 answered

Using the Graph against OnPrem Mailboxes is still in preview see https://docs.microsoft.com/en-us/graph/hybrid-rest-support so you need some specific configuration and server requirements.

Graph API is working fine for the online exchange users (O365) not for offline users (local users), but there is another problem too. Graph API provides Rest APIs by using which we can access each mailbox individually which will become very server loaded work if more than 1000K mailbox need to be scanned one by one and also a time taking process.

If your comparing what you can do with the Graph against what you can do with Search-Mailbox and Compliance searches in Exchange Online/OnPrem you won't be able to match the performance those server side features are designed specifically for the purpose while the client API's like Graph are more for 1 to 1 client access of the Mailbox so things like throttling will always be a constraint. On the Exchange Online side things like Graph Data Connect https://docs.microsoft.com/en-us/graph/data-connect-concept-overview changes the paradigm and gives you easy access to Mailbox data at massive scale (but at cost).



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.