web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

HTTP/1.1 401 Unauthorized - test Failed: Connect Connect Dynamics 365 (online) to Exchange Server (on-premises)

(0) ShareShare
ReportReport
Posted on by 290

Hello Guys,

I have been trying to connect Dynamics 365 (online) to Exchange Server (on-premises) based on (https://technet.microsoft.com/en-us/library/mt622059.aspx)but without any luck. Please check the screenshot.

Here are the things that are already done:

- user is created with ApplicationImpersonation role,

- we have HTTPS secured connection,

- I can access user's mailbox via Online Web app and easily send emails,

- I can access https://<Server>/EWS/Exchange.asmx with the user mentioned above,

- BasicAuthentication: True on OWA.

I have no idea what can I do next. Can you help me please?

BR,

Miha

Test-failed.PNG

Log:

*********************
Message from 365::
*********************
Aquiring Token from ACS has failed. Please check if your tenantId is specified correctly in your Email Server Profile, and make sure your Exchange and CRM are under the same tenant
*****************************
Request to Exchange::
*****************************
<Trace Tag="EwsRequestHttpHeaders" Tid="945" Time="2017-09-22 10:11:10Z">
POST /EWS/Exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.1076.004
Accept-Encoding: gzip,deflate


</Trace>
<Trace Tag="EwsRequest" Tid="945" Time="2017-09-22 10:11:10Z" Version="15.00.1076.004">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:m="schemas.microsoft.com/.../messages" xmlns:t="schemas.microsoft.com/.../types" xmlns:soap="schemas.xmlsoap.org/.../envelope">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010" />
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:SmtpAddress>xxxxxxx</t:SmtpAddress>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:FindFolder Traversal="Shallow">
<m:FolderShape>
<t:BaseShape>AllProperties</t:BaseShape>
</m:FolderShape>
<m:IndexedPageFolderView MaxEntriesReturned="1" Offset="0" BasePoint="Beginning" />
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="inbox" />
</m:ParentFolderIds>
</m:FindFolder>
</soap:Body>
</soap:Envelope>
</Trace>

*****************************
Response from Exchange:
*****************************
<Trace Tag="EwsResponseHttpHeaders" Tid="945" Time="2017-09-22 10:11:10Z">
HTTP/1.1 401 Unauthorized
request-id: 3d406841-e4ef-49a9-8b68-e1fff214c0dc
Server: Microsoft-IIS/8.5
WWW-Authenticate: Negotiate,NTLM,Basic realm="xxxxxxxxx.xx"
X-Powered-By: ASP.NET
X-FEServer: LPEXC01
Date: Fri, 22 Sep 2017 10:11:09 GMT
Connection: close
Content-Length: 0


</Trace>

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi,

    I have the same problem,

    however no basic auth on OWA, basic auth on EWS front end.

    <Trace Tag="EwsResponseHttpHeaders" Tid="600" Time="2017-09-27 09:24:13Z">

    HTTP/1.1 401 Unauthorized

    Pragma: no-cache

    Content-Length: 13

    Cache-Control: no-cache,no-store

    Content-Type: text/html

    WWW-Authenticate: Basic realm=test.domain.com, encoding="UTF-8"

  • ShawnMT Profile Picture
    on at

    I am having the same issue and I have went thru the TechNet instructions multiple times ensuring all prerequisites have been met. 

    If you got this issue resolved could you please post your resolution? 

    Thank You. 

  • Chadi Tannous Profile Picture
    1,039 on at

    Can u make sure that only basic authentication is configured on iis

  • ShawnMT Profile Picture
    on at

    Yes, we ensured only Basic Configuration was on. We have tried about every option imaginable and still get the same error.

  • Agnieszka Naglowska Profile Picture
    20 on at

    hi,

    did you already find the solution for this issue? I get similar error message, 
    although throw test with the https://testconnectivity.microsoft.com/ wasn't any errors. 

    And for sure there is no issue with the wrong password or user.

    Do we need extra mailbox in Exchange Online?

     

    *********************

    Message from 365::

    *********************

    The remote server returned an error: (401) Unauthorized. Please make sure the user name and password is correct, and try again.

    *****************************

    Request to Exchange::

    *****************************

  • AndreaP Profile Picture
    on at

    I' ve the same problem in an Dynamics365 Online and Exchange 2010 On Premise. 

    All seems to be configured (basic auth, impersonification, ecc. ecc.). 

    All is ok with connectivity and tests. But the profile log error "basic auth not configured".

  • Suggested answer
    Marra mi au Profile Picture
    5 on at

    Hello everyone.

    fixed changing upn in active directory to match email address

    Regards.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans