Skip to main content

Notifications

Announcements

No record found.

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 880
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 !
  • "Invalid_grant" Error for get Token API to ADFS on an On-Prem D365 FO
    Have you resolved the problem?
  • Momochi Profile Picture
    Momochi 880 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 !
     
  • Hana Xue Profile Picture
    Hana Xue 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

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,602 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,340 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans