EWS Connect Error 401 Unauthorized

Last update:
Created :
Written by Support InfoBridge

Overview

When connecting to EWS (Exchange Web Service) you could receive a 401 error, saying you are not authorized.

image001.png

How to

Check permissions for "Authenticated Users" on your CAS's directories for your OABs (default C:\Program Files\Microsoft\Exchange Server\ClientAccess\OAB\<guid of OAB>). AU should have Read permissions.

If it doesn't:
Check that AU has List/Download OAB permissions on the relevant OAL. If not, then this is probably because Inheiritance is off those that OAL.
To fix, check the inheiritance box, and rebuild the OAB (update-offlineaddressbook <blah>). Then, go to the CAS and restart the Exchange FDS service to resync the OABs to the CAS.

https://social.technet.microsoft.com/Forums/exchange/en-US/334a26a8-14e4-4fb1-94c0-458e42d23d18/exchange-2003-to-2010offline-address-book-problems?forum=exchange2010

http://serverfault.com/questions/643465/outlook-bits-client-cant-download-the-oab-returns-http-401

Note Verify if you indeed are not authorized to connect to EWS.

Something you can also check is the password of the SyncUser with which you are trying to connect to EWS. Office 365 doesn’t like passwords with special characters:

This password for instance didn’t work anymore: d2h*praWrAW6

When changed to this the connection to EWS worked: 11vac1lex222SO!!1234