Problem
You’ve received complaints from users that they are experiencing out of sync messages between devices such as their mobile phones compared to the Skype for Business clients. Logging onto the Skype for Business front-end server and reviewing the Lync Server logs show that event ID 32054 errors are logged and refer to the users who have complained about the issue:
Log Name: Lync Server
Source: LS Storage Service
Event ID: 32054
Storage Service had an EWS Autodiscovery failure.
StoreWebException: code=ErrorEwsAutodiscover, reason=GetUserSettings failed, smtpAddress=ssteele@contoso.com, Autodiscover Uri=https://autodiscover.contoso.com/autodiscover/autodiscover.svc, Autodiscover WebProxy=<NULL>, WebExceptionStatus=NameResolutionFailure ---> System.Net.WebException: The remote name could not be resolved: 'autodiscover.contoso.com'
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverRequest.InternalExecute()
--- End of inner exception stack trace ---
at Microsoft.Rtc.Internal.Storage.Exchange.ExchangeContext.SendGetUserSettingsRequest(StoreContext ctx, String smtpAddress)
at Microsoft.Rtc.Internal.Storage.Exchange.ExchangeContext.GetUserEwsSettings(StoreContext ctx, String smtpAddress, CacheMode cacheMode)
Cause: Autodiscovery Uri was not correctly configured or unreachable, that there is a problem with the Proxy, or other errors.
Resolution:
Check event details. Check autodiscovery Uri is properly configured and reachable. Check that proxy setting is properly configured and reachable. Validate Skype for Business to Exchange Autodiscovery configuration by following the trouble shooting guide. If problem persists, notify your organization's support team with the event details.
Solution
One of the reasons why this event error would be logged causing the out of sync messages is if the Exchange autodiscover URL is unreachable as indicated in the event ID details:
StoreWebException: code=ErrorEwsAutodiscover, reason=GetUserSettings failed, smtpAddress=ssteele@contoso.com, Autodiscover Uri=https://autodiscover.contoso.com/autodiscover/autodiscover.svc, Autodiscover WebProxy=<NULL>, WebExceptionStatus=NameResolutionFailure ---> System.Net.WebException: The remote name could not be resolved: 'autodiscover.contoso.com'
The environment where I encountered this issue did not use the standard Exchange autodiscover URL and therefore caused this issue for their SfB users. One of the workarounds for this issue is to manually configure Skype for Business to use a different autodiscover URL but before doing so, confirm that there isn’t already an existing manually created configuration by executing the cmdlet:
Get-CsOAuthConfiguration
Note that a standard configuration should provide output similar to the above. Having confirmed that the existing configuration is standard, proceed to execute the following cmdlet to manually configure a reachable Exchange autodiscover URL:
Set-CsOAuthConfiguration -ExchangeAutodiscoverUrl "https://<TheAutoDiscoverDomain>/autodiscover/autodiscover.svc" -Realm "<theSIPdomain>" -Exchange AutodiscoverAllowedDomains "*.<sipDomain>.com"
The event log errors should clear and the following information event will be logged once the SfB front-end server is able to reach the Exchange autodiscover service via the newly configured autodiscover URL.
Log Name: Lync Server
Source: LS Autodiscover
Event ID: 32007
Level: Information
Autodiscover OAuth configuration was successfully retrieved.