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 AX (Archived)

Exchange Server Sync

(0) ShareShare
ReportReport
Posted on by

Hi all,

i tried to Setup the Exchange Server Synchronisation on AX7.

The AX7 Environment is deployed on LCS and Log-in with Admin Account of an Tenant A. The Tenant A has no Outlook integrated, so i Setup a new O365 Demo Tenant B.

  • On the Setup Page Common->Setup->Microsoft Outlook Setup Assistant i Setup the admin User of Tenant A (in the data of User of Tenant a the E-Mail Adress of Tenant B is Setup)
  • the Exchange Seb Services URL is set to https://outlook.office365.com/EWS/Exchange.asmx and as
  • Exchance Server Login is set the User of the Tenant B.

With this Setup an error "The request failed. The remote server returned an error: (401) Unauthorized." Shows up.

is there a Setup on the User of tenant B to authorize the request to the Exchange Server, where can i Setup those Parameters.

is there any documentation on the Exchange Server Setup on AX7?

Kind Regards

*This post is locked for comments

I have the same question (0)
  • Dick Wenning Profile Picture
    8,705 Moderator on at

    you need to create a relay server

    technet.microsoft.com/.../dn592151(v=exchg.150).aspx

  • Mahesh Ambati Profile Picture
    105 on at

    Hi,

    I am also facing the same issue in Dynamics 365 Operations environment. Is anyone got resolution for this issue? Help me if have resolution.

    Thanks,

  • Mahesh Ambati Profile Picture
    105 on at

    Hi Dick Wenning,

    I tried by creating relay server, still i am getting the below errors.

    "The request failed. The remote server returned an error: (401) Unauthorized."

    "Could not communicate with Microsoft Outlook Client".

    Share me the solution if any one faced and resolves the issue. your help would be appreciated.

    Thanks

  • Artur Stypinski Profile Picture
    on at

    Hi Joeymike,

    Concerning documentation which you ask about I didn't find any. Concerning the issue with exchange synchronization in D365FO it is the problem witch ACS service point (Aad.ACSServiceEndpoint in web.config) and service principal (Aad.ACSServicePrincipal in web.config). When method ewsLogon from Microsoft.Dynamics.AX.ExchangeIntegration.Connection is called it checks Aad.ACSServicePrincipal with trustedissuers returned by Office365. Trusted issuers in Office365 you can check by Get-AuthServer in PS. In my case in D365 was 00000001-0001-0000-c000-000000000000 but in Office365 00000001-0000-0000-c000-000000000000. When they are different D365 return error "The request failed. The remote server returned an error: (401) Unauthorized.". So I changed Aad.ACSServicePrincipal to this returned by Office365. Error in D365 has been changed to the "The request failed. The request was aborted: The request was cancelled". I've setup the trace listener on System.Net and Microsoft.Dynamics.AX.ExchangeIntegration and it seems that second phase of getting authorization token failed with message Unknown AppId (realm@tenant). In my opinion problem is that Microsoft is still using ACS (https://accounts.accesscontrol.windows.net/tokens/OAuth/2) as the authorization service OAuth2 instead of AAD (https://login.microsoftonline.com/{tenant}/oauth2/token). Those two services accepts completly different JWT tokens so you can't simply change Aad.ACSServiceEndpoint in web.config. The problem is in Microsoft.Dynamics.AX.Security.S2SAuthentication.dll and Microsoft.Dynamics.AX.Security.S2SClientAuthentication.dll libraries. I've made the ticket on Microsoft support and waiting for response.

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 AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans