By: Eduardo Tavares de Almeida - Reviewed by Ivanov Cepeda

As consultas de Free/busy do Office 365 para o Exchange 2010 On premises falha com o erro:

The attendees's server couldn't be contacted. Error code 5016

image

O kb 2555008 é um bom começo para iniciar o troubleshooting, porém no nosso caso, tudo estava correto.

How to troubleshoot free/busy issues when you use Exchange Federation in the Microsoft Office 365 for enterprises environment

http://support.microsoft.com/kb/2555008/en-us

Habilitamos o log do Outlook 2010 seguindo os passos a seguir e simulamos o problema:

  1. Abra o Outlook
  2. Click em Tools, e depois click Options.
  3. Click na tab Other, e depois click em Advanced Options.
  4. Habilite Enable logging (troubleshooting), e depois click OK 2 vezes.
  5. Feche e abra o Outlook. (não esquece de repetir o processo para desabilitar depois de simular).

Abrimos o arquivo com final fb.txt em %Temp%\outlook logging. Verificando o arquivo vemos o mesmo erro 5016 recebido pelo OWA, porém vemos também que o servidor está retornando com um erro 401 - Unauthorized quando tenta conexão com autodiscover.dominio.com.br/EWS/Exchange.asmx/WSSecurity

------------------

2013/01/07 14:37:25.723: XML response:<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="14" MinorVersion="15" MajorBuildNumber="129" MinorBuildNumber="4" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetUserAvailabilityResponse xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"><FreeBusyResponseArray><FreeBusyResponse><ResponseMessage ResponseClass="Error"><MessageText>System.Net.WebException: The request failed with HTTP status 401: Unauthorized.&#xD;

   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)&#xD;

   at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)&#xD;

   at Microsoft.Exchange.InfoWorker.Common.Availability.Proxy.Service.EndGetUserAvailability(IAsyncResult asyncResult)&#xD;

   at Microsoft.Exchange.InfoWorker.Common.Availability.FreeBusyApplication.EndProxyWebRequest(ProxyWebRequest proxyWebRequest, QueryList queryList, Service service, IAsyncResult asyncResult)&#xD;

   at Microsoft.Exchange.InfoWorker.Common.Availability.ProxyWebRequest.EndInvoke(IAsyncResult asyncResult)&#xD;

   at Microsoft.Exchange.InfoWorker.Common.Availability.AsyncWebRequest.EndInvokeWithErrorHandling():. The request information is ProxyWebRequest type = FederatedCrossForest, url = https://autodiscover.dominio.com.br/EWS/Exchange.asmx/WSSecurity

Mailbox list = &lt;usuario@dominio.com.br&gt;SMTP:usuario@dominio.com.br, Parameters: windowStart = 12/23/2012 8:00:00 AM, windowEnd = 1/22/2013 8:00:00 AM, MergedFBInterval = 30, RequestedView = Detailed

., inner exception: The request failed with HTTP status 401: Unauthorized.</MessageText><ResponseCode>ErrorProxyRequestProcessingFailed</ResponseCode><DescriptiveLinkKey>0</DescriptiveLinkKey><MessageXml><ExceptionType xmlns="http://schemas.microsoft.com/exchange/services/2006/errors">Microsoft.Exchange.InfoWorker.Common.Availability.ProxyWebRequestProcessingException</ExceptionType><ExceptionCode xmlns="http://schemas.microsoft.com/exchange/services/2006/errors">5016</ExceptionCode><ExceptionServerName xmlns="http://schemas.microsoft.com/exchange/services/2006/errors">SN2PRD8004CA016</ExceptionServerName></MessageXml></ResponseMessage><FreeBusyView><FreeBusyViewType xmlns="http://schemas.microsoft.com/exchange/services/2006/types">None</FreeBusyViewType></FreeBusyView></FreeBusyResponse></FreeBusyResponseArray></GetUserAvailabilityResponse></s:Body></s:Envelope>

------------------

Abrimos o arquivo de log do IIS do Exchange 2010 CAS (por padrão em %SystemDrive%\inetpub\logs\LogFiles) e cruzando os horários vemos que o IIS não está autenticando a conexão e retorna o erro 401.

2013-01-07 17:37:24 192.168.70.11 POST /EWS/Exchange.asmx/WSSecurity - 443 - 207.46.4.139 ASProxy/CrossForest/Directory/https/14.15.0129.003 401 0 0 1107

2013-01-07 17:37:25 192.168.70.11 POST /EWS/Exchange.asmx/WSSecurity - 443 - 207.46.4.139 ASProxy/CrossForest/Directory/https/14.15.0129.003 401 0 0 390

2013-01-07 17:37:33 192.168.70.11 POST /EWS/Exchange.asmx/WSSecurity - 443 - 207.46.4.139 ASProxy/CrossForest/Directory/https/14.15.0129.003 401 0 0 624

Revendo a forma de autenticação do diretório EWS, vemos que o WSSecurity está desabilitado.

----------------

Get-WebServicesVirtualDirectory -Server servidor2010 |fl name,*auth*

CertificateAuthentication       :

Name                            : EWS (Default Web Site)

InternalAuthenticationMethods   : {Ntlm, WindowsIntegrated}

ExternalAuthenticationMethods   : {Ntlm, WindowsIntegrated}

WSSecurityAuthentication        : False

LiveIdBasicAuthentication       : False

BasicAuthentication             : False

DigestAuthentication            : False

WindowsAuthentication           : True

----------------

Habilitamos então com o comando abaixo.

Get-WebServicesVirtualDirectory -Server server2010| Set-WebServicesVirtualDirectory -WSSecurityAuthentication:$true

Confirmamos que foi habilitado.

----------------

Get-WebServicesVirtualDirectory |fl name,*auth*

Name : EWS (Default Web Site)

CertificateAuthentication :

InternalAuthenticationMethods : {Ntlm, WindowsIntegrated, WSSecurity}

ExternalAuthenticationMethods : {Ntlm, WindowsIntegrated, WSSecurity}

LiveIdSpNegoAuthentication : False

WSSecurityAuthentication : True

LiveIdBasicAuthentication : False

BasicAuthentication : False

DigestAuthentication : False

WindowsAuthentication : True

----------------

E sem reiniciar nenhum serviço, testamos novamente do OWA da cloud e conseguimos consultar com sucesso o free/busy do usuário On premises.

image