0

My question is basically the same as gh0st's at How do I query Exchange EWS with Postman? of 2019. I want to reiterate it since it was not answered yet.

We have organizational Exchange server 2013 which I can connect from .NET Core 6.0 application via https://my.organization.net/ews/exchange.asmx and auth with login and password. I can send emails, get calendar events but cannot create/update a calendar event. I want to send plain EWS/XML/Soap request in the Postman to see if the request is working in the first place, but I cannot do it from the Postman using the same url and credentials. I keep receiving 401 Anonymous Request Disallowed error. Why does it happen? Is the problem connected to setting up the SSL certificate for the server site in the Postman?

We're using Exchange 2013, no Office 365, Azure AD, or anything Azure. We need few basic calendar and email functions. I am using Mac. I need the Postman for testing purposes.

Solution or hint would be greatly appreciated.

  • What does Basic Authentication means in the context of a request to Echange EWS? It might be something different than basic auth over http. What you might want to look at is to capture the request of your .Net application with a tool like Fiddler so you can look into how the request if forged by .NET. – L01NL Jul 18 '22 at 14:53
  • @L01NL, after your comment I realized that my question is a bit misleading. I was able to connect to Exchange server from .NET app, but not all queries were successful, particularly creating/updating event requests failed. That's why I need the Postman to send plain EWS/XML/Soap request first to see if the request is really working in the first place, but not to trace what .NET app is sending. I updated my question. – Dmitry Melnikov Jul 19 '22 at 08:29
  • But you are able to authenticate through the .NET app? And you are running into problems with authentication through Postman, correct? That is why I suggested to trace the request from the .NET app. so you can figure out how the .NET app authenticates. – L01NL Jul 19 '22 at 09:17

1 Answers1

0

Finally colleagues helped me to solve the issue. It turned out to be quite simple, in the Postman, Authorization tab, instead of Basic Auth type select NTLM Authentication (Beta) which requires, in my case, just username and password.

Same for curl

curl -v -u "username:password" -L "https://my.organization.com/EWS/Exchange.asmx" -H "Content-Type:text/xml" -k --ntlm

Note, that at first server responds with 401 error but then both curl and Postman continue connecting using NTLM and get 200 response.