Connection to On-Premise Exchange via EWS using ModernAuth

Emil Pavciak (epavciak) 0 Reputation points
2023-05-19T11:41:03.88+00:00

Hello,

I configured our On-Premise Exchange to work with modern authentication according this https://learn.microsoft.com/en-us/exchange/plan-and-deploy/post-installation-tasks/enable-modern-auth-in-exchange-server-on-premises?view=exchserver-2019

and this https://learn.microsoft.com/en-us/exchange/clients/outlook-on-the-web/ad-fs-claims-based-auth?view=exchserver-2019

Now, all Outlook clients with Windows 11 are able to connect to On-Premise Exchange using Modern Authentication. Also ECP, OWA is working as expected.

My question is related to EWS. How can I configure EWS to work with Modern authentication.

I am able to get the access token from ADFS but when I use it in EWS call I get the error 401 Unauthorized.

Regards,

Emil

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,072 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andy David - MVP 141.5K Reputation points MVP
    2023-05-19T11:46:40.3533333+00:00
    2 people found this answer helpful.
    0 comments No comments

  2. Aholic Liang-MSFT 13,741 Reputation points Microsoft Vendor
    2023-05-22T05:36:53.6966667+00:00

     

    Hi @ Emil Pavciak (epavciak)) ,

    Yes .As Andy says, OAuth authentication for EWS is only available as part of Microsoft 365 in Exchange Online.

    For specific information, please refer to this link: Authenticate an EWS application by using OAuth | Microsoft Learn

    User's image


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

    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.

    1 person found this answer helpful.