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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

"Invalid_grant" Error for get Token API to ADFS on an On-Prem D365 FO

(0) ShareShare
ReportReport
Posted on by 1,036
Hi dear community!
 
We have a .NET web application that is integrated with D365 FO.
on Cloud D365 FO, there are no issues, the integration is working fine.
But on-prem D365, we are facing a /get token/ issue, saying /invalid_grant/.
The Get token API is giving back the following error:
 
in the get token API call, we are providing the following parameters:
- resource= https://url.example/namespaces/AXSF
- client_id= 111-1111-111-111 (example)
- client_secret=1111111111 (example)
- Tenant = https://url.example/adfs
- grant_type = client_credentials
 
What am I missing here?
 
Although, it has worked on another on-prem environment , but for this on-prem environment specifically, I'm encountering this issue.
 
Any advice is appreciated !
Thanks in advance !
I have the same question (0)
  • Hana Xue Profile Picture
    Microsoft Employee on at
    "Invalid_grant" Error for get Token API to ADFS on an On-Prem D365 FO
    Hi,
    This error is mentioned in the link below and check if it helps.
    ADFS - Access token request with a certificate (Client credentials grant flow) - Microsoft Q&A
    Best Regards,
    Hana
  • Momochi Profile Picture
    1,036 on at
    "Invalid_grant" Error for get Token API to ADFS on an On-Prem D365 FO
    Hi dear Hana Xue,
     
    Thanks for sharing the link but the error mentioned in the link you provided says "invalid_client" while my error says "invalid_grant".
     
    Appreciate your help !
     
  • Community member Profile Picture
    2 on at
    "Invalid_grant" Error for get Token API to ADFS on an On-Prem D365 FO
    Have you resolved the problem?

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 596 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 570 Super User 2025 Season 2

#3
CU05031448-0 Profile Picture

CU05031448-0 556

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans