问题
I am currently building a simple web app the flow of which is: 1. Admin user for Office 365 provides auth and signs in 2. App retrieves all mail for all users in the domain
It is possible to do this with Google Apps for business, i.e. retrieve mail for all users with only the admin auth.
How would you go about doing this for Office 365? I am currently encountering this problem using the REST API - Get MS Exchange mail for all group members
Is there another way? EWS? I have to believe it's possible to access mail with an admin auth.
回答1:
You can do it with impersonation. However, MSDN means how to do it with EWS managed API and SOAP request, but no REST API. If you can use EWS manged API, you should use this. Please refer the MSDN articles for details:
- Working with impersonation by using the EWS Managed API.
- Using Exchange Impersonation
来源:https://stackoverflow.com/questions/24241161/accessing-office-365-user-mail-data-with-admin-authorisation-only