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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics 365 App for Outlook Issue

(0) ShareShare
ReportReport
Posted on by

I recently installed the December 2016 update to our Dynamics CRM 2016 on-premise. I am looking to take advantage of the new Dynamics 365 App for Outlook, but I'm having trouble authenticating with it in Outlook. I currently have CRM configured with claims-authentication, IFD using ADFS 3.0 and Oauth2. I have set up server synchronization for myself and this works successfully. I have deployed the App for Outlook to my Outlook 2016 application.

When I attempt to use the Dynamics 365 App for Outlook, it attempts to authenticate. I enter my domain email address and password and then IE opens up with a 404 - File or directory not found message. The URL that it's trying to go to is:

"https://[CRM ORG URL]/CrmMailApp/undefined?client_id=1bef97ab-72ae-e511-80db-005056bd0caf&redirect_uri=https://[CRM ORG URL]/crmmailapp/code_auth.aspx&resource=https://[CRM ORG URL]&response_type=code&state=undefined?client_id=1bef97ab-72ae-e511-80db-005056bd0caf-dc2db2b5b7f40166c1de4e00b3f8fbb2"

I have reviewed the logs for CRM, the Outlook plugin, and ADFS and I have not been able to determine why I'm having trouble getting the Dynamics 365 App for Outlook to work.

Does anyone have any ideas?

*This post is locked for comments

I have the same question (0)
  • ThomasN Profile Picture
    3,190 on at

    Hi Travis, thanks for reaching out.

    It seems you have reviewed the documentation on setting up Dynamics App for Outlook specific to on-premise found here technet.microsoft.com/.../dn946901.aspx.

    With this error you may want to look at the ADFS settings for Form Authentication on the intranet, or go back to how the App for Outlook was configured. Was it turned on within CRM before all the network settings were adjusted to allow apps?

    Let us know what you find, eager to help.

  • Community Member Profile Picture
    on at

    I'm having the exact problem.

    I've tried most of the troubleshooting, this was almost working after install of SP2 (365) but after reconfig of clamins & IFD and updated if ADFS Federated data if got exact this problem.

    Any suggestions?

  • ThomasN Profile Picture
    3,190 on at

    K1, are you using Claims authentication as well? There seems to be a clear requirement on forms authentication in the link above. I have not installed this on-premise yet but typically when it comes to exchange, ADFS, and apps there are several moving pieces to go through.

  • Community Member Profile Picture
    on at

    Hi Tom,

    I've reviewed the documentation on deploying the Dynamics App for Outlook and confirmed that everything is set up correctly.  My ADFS settings appear to be correct as well. Form Authentication on the Intranet primary authentication is enabled and it was enabled prior to attempting to deploy the Dynamics App for Outlook.

    The event viewer on the CRM server is showing the following:

    Event code: 3005

    Event message: An unhandled exception has occurred.

    Event time: 1/2/2017 3:20:14 AM

    Event time (UTC): 1/2/2017 9:20:14 AM

    Event ID: e8f05036833443dbb95a2adf3a27c4cb

    Event sequence: 319

    Event occurrence: 5

    Event detail code: 0

    Application information:

       Application domain: /LM/W3SVC/1/ROOT-1-131278216191415370

       Trust level: Full

       Application Virtual Path: /

       Application Path: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\

       Machine name: [SERVER NAME]

    Process information:

       Process ID: 3868

       Process name: w3wp.exe

       Account name: [CRM App Pool Service Account]

    Exception information:

       Exception type: UriFormatException

       Exception message: Invalid URI: The hostname could not be parsed.

      at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)

      at System.UriBuilder..ctor(String uri)

      at Microsoft.Crm.Authentication.Claims.CrmFederatedAuthenticationModule.UpdateRedirectingEventArgsNonPathBasedUrl(RedirectLocation redirectLocation, RedirectingToIdentityProviderEventArgs e)

      at Microsoft.Crm.Authentication.Claims.CrmFederatedAuthenticationModule.SendToIdentityProvider(RedirectLocation redirectLocation)

      at Microsoft.Crm.Authentication.Claims.CrmFederatedAuthenticationModule.RedirectToIdentityProvider(String uniqueId, String returnUrl, Boolean persist)

      at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

      at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Request information:

       Request URL: https://[CRM Org URL]:443/XRMServices/2011/Organization.svc/web?SdkClientVersion=7.0.0000

       Request path: /XRMServices/2011/Organization.svc/web

       User host address: [IP Address]

       User:  

       Is authenticated: False

       Authentication Type:  

       Thread account name: [CRM App Pool Service Account]

    Thread information:

       Thread ID: 31

       Thread account name: [CRM App Pool Service Account]

       Is impersonating: True

       Stack trace:    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)

      at System.UriBuilder..ctor(String uri)

      at Microsoft.Crm.Authentication.Claims.CrmFederatedAuthenticationModule.UpdateRedirectingEventArgsNonPathBasedUrl(RedirectLocation redirectLocation, RedirectingToIdentityProviderEventArgs e)

      at Microsoft.Crm.Authentication.Claims.CrmFederatedAuthenticationModule.SendToIdentityProvider(RedirectLocation redirectLocation)

      at Microsoft.Crm.Authentication.Claims.CrmFederatedAuthenticationModule.RedirectToIdentityProvider(String uniqueId, String returnUrl, Boolean persist)

      at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

      at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

  • Community Member Profile Picture
    on at

    Hi, when I was attempting to do this with update 1 I got a similar message while trying to authenticate. The issue turned out to be the adfs command generated by CRM on the App for Outlook page. It was missing a "/" in the middle of the url. I don't know if this has been fixed in update 2, but it's probably worth looking at.

  • Community Member Profile Picture
    on at

    danothemen, can be more, where the missing "/" in the middle of the URI?

    The same problem December 2016 Update Dynamics 365 + Exchange 2016 CU4 + ADFS W2K12R2

  • Community Member Profile Picture
    on at

    danothemen, are you referring to the URL that is located in the Add-ADFSClient command that is provided by the CRM app such as below:

    Add-AdfsClient -Name "Dynamics 365 App for Outlook" -ClientId 1bef97ab-72ae-e511-80db-005056bd0caf -RedirectUri https://[CRM DNS]/[CRM ORG]crmmailapp/code_auth.aspx

    I'm guessing here, but the URL at the end would need to be corrected as:

    Add-AdfsClient -Name "Dynamics 365 App for Outlook" -ClientId 1bef97ab-72ae-e511-80db-005056bd0caf -RedirectUri https://[CRM DNS]/[CRM ORG]/crmmailapp/code_auth.aspx

    Is this what you were referring to?

  • Community Member Profile Picture
    on at

    Yes indeed, that is what I was referring too, sorry I didn't have that on hand earlier.

  • Community Member Profile Picture
    on at

    I updated the AdfsClient entry for the "Dynamics 365 App for Outlook" to include the missing "/", but this didn't seem to change anything. I rebooted both the CRM server and the ADFS server and tried it again and I still get the following:

    When I attempt to use the Dynamics 365 App for Outlook, it attempts to authenticate and then IE opens up with a 404 - File or directory not found message. The URL that it's trying to go to is:

    "https://[CRM ORG URL]/CrmMailApp/undefined?client_id=1bef97ab-72ae-e511-80db-005056bd0caf&redirect_uri=https://[CRM ORG URL]/crmmailapp/code_auth.aspx&resource=https://[CRM ORG URL]&response_type=code&state=undefined?client_id=1bef97ab-72ae-e511-80db-005056bd0caf-dc2db2b5b7f40166c1de4e00b3f8fbb2"

    I also ran a repair of the CRM server application files, which took awhile, but didn't help either.

  • Community Member Profile Picture
    on at

    Hi

    After some trial and error I've figured out that the ADFS registration link should be like this. I've added both a internal and external registration. My problem now is that I can use CrmMail App from Exchange WebMail but not from Outlook, both internally, it look like Outlook are using some other sort of path?

    Add-AdfsClient -Name "Dynamics 365 App for Outlook" -ClientId 1f778b93-ac9b-4c36-9f9b-bcf714312ef1 -RedirectUri @("external.comapny.com/.../code_auth.aspx", "internal.company.com/.../code_auth.aspx")

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans