Closed ngelsi closed 5 years ago
@Silpelit Is problem still exist?
Maybe your Exchange admin has disabled the possibility to use basic auth? https://blogs.technet.microsoft.com/exchange/2018/10/17/disabling-basic-authentication-in-exchange-online-public-preview-now-available/
Thank you very much for the help.
In the end the problem was that my O365 password has expired. What made this not that easy to recognize is that the OWA was working fine, probably because the authentication token in the browser was still valid for a while after the expiration.
How i found this out is that i added the trace listeners to EWS and saved down the communications into xml files and took a look at them. I used the approach written in this article:
The XML result from the AutoDiscovery communication stated clearly that the password expired.
Hi ,
We are still getting this
Inner exception:
08:39:06 Microsoft.Exchange.WebServices.Data.AutodiscoverLocalException: The Autodiscover service couldn't be located.
08:39:06 Source: Microsoft.Exchange.WebServices
08:39:06 StackTrace:
08:39:06 at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List1 redirectionEmailAddresses, Int32& currentHop) 08:39:06 at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings[TSettings](String emailAddress, List
1 redirectionEmailAddresses, Int32& currentHop)
08:39:06 at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettings[TSettings](String emailAddress)
08:39:06 at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List`1 requestedSettings)
08:39:06 at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames)
08:39:06 at Quest.AM.Autodiscover.EWSAutodiscover.ExecuteAutoDiscover(AutodiscoverService ewsService, String emailAddress, EWSAutodiscoverOptions options)
08:39:06 at Quest.AM.Autodiscover.EWSAutodiscover.DoAutodiscover(String emailAddress, String url, Boolean useScpLookup, NetworkCredential creds, String o365Provider, String connectionUri, EWSAutodiscoverOptions options, Int32 exchangeVersion, String overrideSettings, TimeSpan timeout)
08:39:06 at Quest.AM.Autodiscover.EWSAutodiscover.<>c__DisplayClass3_0.
Hi Everyone,
Since some days ago, EWS stopped working with my Office365 account. The autodiscovery service no longer finds the exchange URL, and while setting it to a previously used URL creates the service, every service call results in a 401 Unauthorized exception. As a double check i have asked a colleague with a different Office365 account to run a test project, and the result is the same. I have also tried to set the domain in the WebCredentials constructor, but it still doesnt work. The code has not been changed in any way since it stopped working.
The project is using basic authentication. I am aware that it is planned to be obsoleted, but the online articles say until 2020. It seems like its already in effect. Can that really be the case?
Here is the example project code which i tried to run without success:
` var service = new ExchangeService(); service.Credentials = new WebCredentials("email@domain.com", "password");
Any help or guidelines would be appreciated. Many thanks.