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

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>