EWS does not work granular permissions like “Mail.Read” and “Mail.Send”. Needs “full_Access_as_app” as permission

Sumit Celly 20 Reputation points
2020-10-05T20:56:46.367+00:00

I am creating an azure app that needs to read and send email using the Exchange Web Services API (EWS). Under the link API permissions , I select "Add Permission" and select "Exchange" as the api. There I select "App permissions" and then the permissions "Mail.Read" and "Mail.Send" in the API . When using my custom app to send and read email, I am able to obtain the token from this azure app fine but making the EWS call to actually the send the email fails with a 401 or "not authorized" error. The same works fine when I add the permission "full_access_as_app" under exchange api in azure.

Are the more granular permissions "Mail.Read" and "Mail.send" supposed to work with EWS?

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,309 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,429 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,121 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Lucas Liu-MSFT 6,161 Reputation points
    2020-10-06T06:37:16.84+00:00

    Hi anonymous user ,
    I agree with what Andy said.
    According to my research, Microsoft do not support ApplicationAccessPolicy based access control for EWS API's. These policies can only be used for access control when using Microsoft Graph or Outlook REST API's, and Microsoft has set EWS to maintenance mode and will not receive any new features.
    For more information you could refer to: Scoping application permissions to specific Exchange Online mailboxes

    ----------

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments