none
"Skype for Business can't connect to Exchange" error

    Question

  • My experience tell me if I see this error. It usually show "Outlook Integration Error".

    But this time my Skype for Business didn't show "Outlook Integration Error". And conversation history can successfully record in Outlook.

    The only problem is the contact in contact list were all gone.

    After search a contact, when right-click on it. The "Add to Contact List" was missing.

    This is weird, because if it really can't connect to Exchange. Why only contact list has problem, but conversation history is normal.

    Tuesday, April 18, 2017 10:09 AM

All replies

  • For the outlook integration if it is on same environment you need to have EWS urls resolved in DNS along with auto discover.Client will look for the exchange EWS url and it should be able to authenticate.If the SMTP address and sip address are different you may need to update the client policy of SFB as well(DisableEmailComparisonCheck paramater in client policy)

    Refer beloiw

    http://lyncforum.blogspot.in/2015/08/lync-2013-issue-with-ews-integration.html


    Jayakumar K

    Tuesday, April 18, 2017 10:53 AM
  • Re-create SIP profile of the problem user.
    Kill lync.exe, Delete SIP folder of the user, restart system, re-launch the
    client.

    Check the last updated IM conversations
    date.

    Check the Lync Exchange connectivity error at bottom right corner of Client.

    Open OWA and check whether conversation
    history is being Updated.

    Open Outlook without the Lync client open.

    Delete the Conversation History folder (export it to file if there are any conversations in there that you would like to save).

    Close Outlook.

    Make sure that the Lync client and the
    Outlook clients are completely closed (no Oulook.exe or Communicator.exe
    processes in Task Manager).

    Click Start, Run and type “outlook
    /resetfolders” in search for folders of files

    Start the Lync client and have a
    conversation.

    Wait for up to 5 minutes for the
    conversation to be saved to Conversation History Folder.

    If this does not work, try below steps:

    Open Outlook without the Lync client open.

    Delete the Conversation History folder
    (export it to file if there are any conversations in there that you would like
    to save).

    Close Outlook.

    Make sure that the Lync client and the
    Outlook clients are completely closed (no Oulook.exe or Communicator.exe
    processes in Task Manager).

    Uninstall the Lync client completely.

    Re-install the Lync client

    Start the Lync client and have a
    conversation.

    Wait for up to 5 minutes for the
    conversation to be saved to Conversation History Folder.

    Check if Outlook running and configured to
    use the correct profile?

    Is Lync discovering the correct Exchange
    server?

    Press and hold Ctrl, right-click the Lync
    icon in the notification area, and then click Configuration Information. Look
    for the Exchange Web Services (EWS) setting at EWS External URL.

    EWS External URL value should be like https://email.domain.com/ews/exchange.asmx

    Can Outlook connect to the Free/Busy
    Service in EWS?

    Run the below command to clean free/busy
    service in outlook

    outlook.exe /cleanfreebusy.

    Start à Run launch outlook with following switch (It will recreate any
    missing folders) (Ensure that you have a backup of the mailbox )

    Outlook /resetfolders

    Import all contacts from mailbox to pst
    and check (this will help to isolate corrupt contact issue)

    Try repairing the mailbox using
    New-MailboxRepairRequest

    http://technet.microsoft.com/en-us/library/ff625221(v=exchg.141).aspx

    If the issue still
    persist we can run ewseditor on the mailbox and check if could identify any
    subfolders with garbled characters.

    HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Lync\username@domain.com\Autodiscovery

    InternalAvailabilityServerUrl"="https://server.domain.com/EWS/Exchange.asmx"

    InternalOofServerUrl"="https://server.domain.com/EWS/Exchange.asmx"

    InternalEwsUrl"="https://server.domain.com/EWS/Exchange.asmx"


    Last but not least, check if the SIP Domain is the same like the email domain, if These are different change the mailaddress field in the AD Details from mail domain to sip domain.
    Tuesday, April 18, 2017 12:03 PM
  • Hello Jayakumar,

    I don't have the problem of "Outlook Integration Error". It only say "Skype for Business can't connect to Exchange"

    Wednesday, April 19, 2017 2:38 AM
  • Hello Joerg,

    Conversation History folder is working fine. Only the contact list were gone. Also cannot add contact.

    Recreate SIP profile, reinstall SfB, delete Lync cache in user profile AppData were tried. No success.

    I don't have EWS deployed. Only use MAPI, and it works.

    Just some users have this problem (including myself)

    Wednesday, April 19, 2017 2:44 AM
  • Are the effected clients in a different V-LAN? Do you have the Problems also, when you connect via Edge Server?
    Wednesday, April 19, 2017 5:52 AM
  • Hello Joerg,

    Currently there're 2 users in different VLAN have this problem. But the other users in that 2 VLAN are all normal.

    I do have an Edge server, but it is not yet for use. I'm not planning to let SfB use outside of the intranet now.

    That's why there's a triangle warning at the lower right corner. 

    And I don't think the absent (or not properly configured) of the Edge server can make SfB client side unable to add contact.

    Wednesday, April 19, 2017 6:54 AM
  • One standard Troubleshooting question: What is the behavior, if you login with a working account on a not working computer? What is the behavior, if you login with a not working account on a working computer?

    Wednesday, April 19, 2017 7:09 AM
  • Hi DHLao,

    To this issue, please refer to the following steps to troubleshoot this issue:

    1. Make sure all items about Exchange and outlook integration are checked
    2. Run the following command to make sure EWS is enabled for specific user: Get-casmailbox <smtp> | fl EWSEnabled   

    Best Regards,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as answers if they helped.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, April 19, 2017 10:01 AM
    Moderator
  • Hello Jayakumar,

    I don't have the problem of "Outlook Integration Error". It only say "Skype for Business can't connect to Exchange"

    You may verify By Checking the client configuration with EWS status on it.This is because it is unable to reach auto discover or EWS urls from the client machine.Verify the urls are able to access from the machine,any proxy issue on client,exclusion etc..if the urls are reachable then probably you have to look at the sniffer.

    Jayakumar K

    Wednesday, April 19, 2017 10:25 AM
  • What is exchange autodiscover url? If its fqdn differs from autodiscover.<smtpdomain>, you have to create additional SRV-record in dns:
    _autodiscover._tcp.<smtpdomain> (Autodiscover DNS SRV Record), which will point to your exchange autodiscover fqdn (443 tcp port)

    MCSAnykey



    • Proposed as answer by .as Wednesday, April 19, 2017 10:26 AM
    • Unproposed as answer by .as Wednesday, April 19, 2017 10:27 AM
    • Edited by .as Wednesday, April 19, 2017 10:27 AM
    Wednesday, April 19, 2017 10:26 AM
  • Hello .as,

    The exchange AutoDiscoverServiceInternalUri is the FQDN of the exchange server (e.g. https://ex01.abc.local/Autodiscover/Autodiscover.xml)

    The sip also using the same domain (e.g. john@abc.local)

    But smtp using another domain (e.g. john@def.com)

    Do you mean I need to create an SRV record with def.com domain? 

    If there're only 2 users have this problem. Is that the server side configuration issue?

    Friday, April 21, 2017 4:07 AM
  • Hello jim-xu,

    All the checkbox under Exchange and Outlook Integration were checked.

    EWS has not deploy. I solely rely on MAPI. The other users have no problem.

    Friday, April 21, 2017 4:19 AM
  • Hello Jayakumar,

    Lets say the Exchange AutoDiscoverServiceInternalUri is "https://ex01.abc.local/Autodiscover/Autodiscover.xml"

    My computer can successfully use web browser to access the XML page.

    EWS has not deploy. Rely on MAPI only.

    Friday, April 21, 2017 4:26 AM
  • Hello Jayakumar,

    Lets say the Exchange AutoDiscoverServiceInternalUri is "https://ex01.abc.local/Autodiscover/Autodiscover.xml"

    My computer can successfully use web browser to access the XML page.

    EWS has not deploy. Rely on MAPI only.


    Did you create dns stv-record as i write above? Lync client don't know about exchange autodiscover url, it uses the next dns records to find it:
    https://<SMTP-Domain>/autodiscover/autodiscover.xml
    https://autodiscover.<SMTP-Domain>/autodiscover/autodiscover.xml
    http://autodiscover.<SMTP-Domain>/autodiscover/autodiscover.xml
    _autodiscover._tcp.<SMTP-Domain> (SRV-record)
    http://lyncvoice.blogspot.ru/2015/01/troubleshooting-ews-issues-in-lync-2013.html
    >>Do you mean I need to create an SRV record with def.com domain?
    Yes. It's strange that yoy have problem only with 2 users but try - it takes 30 seconds of your time.

    MCSAnykey


    • Edited by .as Friday, April 21, 2017 4:47 AM
    Friday, April 21, 2017 4:46 AM
  • Hello .as,

    The exchange AutoDiscoverServiceInternalUri is the FQDN of the exchange server (e.g. https://ex01.abc.local/Autodiscover/Autodiscover.xml)

    The sip also using the same domain (e.g. john@abc.local)

    But smtp using another domain (e.g. john@def.com)

    Do you mean I need to create an SRV record with def.com domain? 

    If there're only 2 users have this problem. Is that the server side configuration issue?


    1. Did you run cmdlet 'Set-CsClientPolicy -DisableEmailComparisonCheck $true'?
    2. How many exchange servers do you have? You must deploy EWS for your exchange CAS Servers and set it url to the same fqdn which is used for other exchange services like outlook anywhere or autodiscover ot owa etc (it will be easier to say: fqnd which is presented in exchange's certificate in SAN). Most likely you already have deployed EWS for ex01 server to ex01.abc.local fqnd, check it with Get-WebServicesVirtualDirectory
    3. >>Do you mean I need to create an SRV record with def.com domain?
    Yes, create dns srv-record _autodiscover._tcp.def.local which will point to tcp 443 ex01.abc.local.
    Lync client does not know about exchange autodiscover url, it uses the next dns records to find it:
    https://<SMTP-Domain>/autodiscover/autodiscover.xml
    https://autodiscover.<SMTP-Domain>/autodiscover/autodiscover.xml
    http://autodiscover.<SMTP-Domain>/autodiscover/autodiscover.xml
    _autodiscover._tcp.<SMTP-domain> (SRV-record)
    http://lyncvoice.blogspot.ru/2015/01/troubleshooting-ews-issues-in-lync-2013.html

    MCSAnykey


    • Edited by .as Friday, April 21, 2017 5:16 AM
    Friday, April 21, 2017 5:12 AM
  • Hello .as

    1. DisableEmailComparsionCheck was set to $True long time ago.

    2. There are 2 Exchange server. (ex01, ex02), and I found the current configuration as below:

    In Ex01:

    AutoDiscoverServiceInternalUri: https://ex01.abc.local/Autodiscover/Autodiscover.xml
    EWS InternalUrl: https://cas.abc.local/EWS/Exchange.asmx

    In Ex02:

    AutoDiscoverServiceInternalUri: https://ex02.abc.local/Autodiscover/Autodiscover.xml
    EWS InternalUrl: https://cas.abc.local/EWS/Exchange.asmx

    In SfB server

    ExchangeAutodiscoverUrl: https://ex01.abc.local/autodiscover/autodiscover.svc

    In AD DNS

    cas Host(A) 10.0.0.2 (IP address of ex02)

    Is that mean I need to change the FQDN of AutoDiscoverServiceInternalUri and ExchangeAutodiscoverUrl to cas.abc.local? I never heard the FQDN of AutoDiscover need to be same as the EWS. Would you mind to provide me some website which mention about this? As Exchange and Outlook are working fine. I need strong reason to persuade my supervisor to let me make such change.

    3. About create SRV with def.com, the Domain textbox field is auto set to abc.local which cannot be change. Are you sure I need to use the email smtp domain name ?

    Friday, April 21, 2017 8:12 AM
  • >>Is that mean I need to change the FQDN of AutoDiscoverServiceInternalUri and ExchangeAutodiscoverUrl to cas.abc.local?
    No. It will be good and comfortable to use one name for all services and in this situation you can be sure of no problems with exchange certificate for FQDN's, but it is not necessary.
    >>Are you sure I need to use the email smtp domain name ?
    You can see the link above - you need to create srv record for smtp domain, so lync client can get autodiscover (like outlook from external) - create same dns zone first and rhere you can create srv record.
    BUT you can try to add records in the client pc's registry without creating dns records, check it here: http://www.be-com.eu/?p=1205

    MCSAnykey

    Friday, April 21, 2017 10:39 AM
  • Hi DHLao,

    As you said that, this issue just occur to two users account, we suggest you rebuild his SFB profile to check if the issue persist. For affected user, run “Get-CsUser <SIP Address>” with working user account to compare its AD attributes.


    Best Regards,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as answers if they helped.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, April 24, 2017 8:13 AM
    Moderator
  • EWS should be there.No need of any additional deployment.Skype integration with exchange is working based on the EWS communication.Since the issue is only for 2 users that means it may be because of the authentication to Exchange services from that perticular machine.You may clear the Skype client cache from your profile,IE proxy settings you can exclude exchange urls etc..

    Jayakumar K

    Tuesday, April 25, 2017 6:36 AM
  • Hello jim-xu,

    I use "Get-CsUser <SIP Address>” to compare the accounts. Can't see any difference.

    The affected user already try:

    1. Disable and re-enable the SIP account

    2. Remove and re-add the SIP account

    3. Delete the SfB caches in AppData

    AppData\Local\Microsoft\Office\16.0\Lync
    AppData\Roaming\Microsoft\Office\16.0\Lync
    No success

    4 hours 49 minutes ago
  • Hello Jayakumar,

    Already try clear the SfB caches in user's computer. No success.

    Sorry, can't get your meaning of "IE proxy settings exclude exchange urls"

    4 hours 45 minutes ago
  • If the client machine is using proxy to connect internet,some time the exchange urls wil try through proxy.In that case you may need to add exception in internet explorer connection settings for this exchange urls.Also you can browse ews url from the browser and verify it is success.It will be worth looking client configuration information->ews status

     

    Jayakumar K

    3 hours 2 minutes ago