Connection to On-Premise Exchange via EWS using ModernAuth

Emil Pavciak (epavciak) 0 Reputation points


I configured our On-Premise Exchange to work with modern authentication according this

and this

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.



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

2 answers

Sort by: Most helpful
  1. Andy David - MVP 145K Reputation points MVP
    2 people found this answer helpful.
    0 comments No comments

  2. Aholic Liang-MSFT 13,826 Reputation points Microsoft Vendor


    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.