As far as I know, EWS with Oauth only works in Exchange Online:
Connection to On-Premise Exchange via EWS using ModernAuth
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
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
2 answers
Sort by: Most helpful
-
-
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
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.