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)

Getting a invalid token after upgrading to CRM 2016 OnPremise

(1) ShareShare
ReportReport
Posted on by

I have a windows 8.1 app that is using ADAl to connect to CRM 2015 and also the Microsoft.Crm.Sdk.Mobile PCL to get data from CRM. I upgraded one of my environments to CRM 2016 OnPremise and now I am getting an invalid token error.

The request heather is below and also the error.

  1. I tried disabling and re-enabling Claims, and IFD
  2. I checked the OAuth was on
  3. checked the relaying party trusts.
  4. Checked the app was registered with ADFS

I am getting a token from ADFS but CRM is not validating it.

Any Ideas?

Error

{Bearer error=invalid_token, error_description=Error during token validation!, redirect_uri=https%3a%2f%2fdevadfs.cenergistic.com%2fadfs%2fls%2f}

Request

{Method: POST, RequestUri: 'c360training.cenergistic.com/.../web', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
{
  SOAPAction: schemas.microsoft.com/.../Execute
  Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Im5YRUNzOHlteG1lYzRPdE40cWlLMUxVOENyYyJ9.eyJhdWQiOiJodHRwczovL2MzNjB0cmFpbmluZy5jZW5lcmdpc3RpYy5jb20vIiwiaXNzIjoiaHR0cDovL2RldmFkZnMuY2VuZXJnaXN0aWMuY29tL2FkZnMvc2VydmljZXMvdHJ1c3QiLCJpYXQiOjE0NTk4ODUzNzEsImV4cCI6MTQ1OTkxNDE3MSwidXBuIjoiZmRvbWluZ3VlekBjZW5kZXYuY2VuZXJnaXN0aWMuY29tIiwicHJpbWFyeXNpZCI6IlMtMS01LTIxLTQxMTEyMzIzOTQtMzQ3NTU2OTczMS00ODQ3NTkyNjItMTEwNyIsInVuaXF1ZV9uYW1lIjoiQ0VOREVWXFxmZG9taW5ndWV6IiwiYXV0aF90aW1lIjoiMjAxNi0wNC0wNVQxOTo0Mjo1MS41MTBaIiwiYXV0aG1ldGhvZCI6InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphYzpjbGFzc2VzOlBhc3N3b3JkUHJvdGVjdGVkVHJhbnNwb3J0IiwidmVyIjoiMS4wIiwiYXBwaWQiOiJENUYyRjdBQi0wRjAyLTQ4MTEtOEVDQS0yMzlBQkNGRjgyRkVJIn0.MD1q1QJJyMDlhL8iGYeyTkHNxAdv8GblLQhpteyrEO5Uw5b8-UQL-VBTZn3Pcr_0-mD8WulaNkxMxVBNIC4Y9T9icJjtytVIgvgqBko6byYDymVp-qgMQlhDsRsHLpVNSJzt-jtRUzB49EtRkj4NxdmIz6fgpLqzQF1RMLaRohrcVIXcOVT2zkrQWcSErre16-0wmhku-ZwVRpc8DzT90s8dgFIqs8bGiqk3nM6dUWjJB3stmFM9dE8S6H9hzCdpQfaM5yaRf_msbyQ6Ar_JtNYcMCVvEHTalVA0eaLlU966zRHZRObHfjq2r5t115IAEc9Kzp9qaQERD7Qk2RhWlQ
  Accept: application/json
  Content-Type: text/xml; charset=utf-8
  Content-Length: 1006
}}

*This post is locked for comments

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

    there can be many reasons for this kind of error. trust me i have spend endless hours analysing this.

    The most common reason for this is that during handshake/authentication, the relying party ie. CRM is not able to decrypt the token. What I can guess is that the SSL certificate on either party is not configured properly. Make sure the certificate chaining is complete and is linked properly to root certificate and that it is not expired. If you are using a self signed cert, make sure it is installed in all of your client devices.

  • Verified answer
    Community Member Profile Picture
    on at

    After some support calls I had the idea to change the Client App ID and re-register the app on ADFS. That fixed my issue

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