Announcements
No record found.
good day I have a grant type question . we recently upgraded our AD to ADFS4 , giving us more grant type options. I would like to be able to use the client_credential grant type for all my WebAPI call from our legacy systems (using Layer7 ) for application to application communication. I was able to get a ClientID (with client secret) create and generate a token (PowerShell script) but I keep getting an access denied error when trying to access any WebAPI endpoint . all the research that I've been able to find give me solution for dynamics 365 online using Azure AD . is there a way to connect to a on premise version (no azure involvement) using this grant type. if so what do I need to do get it working
Hello Martin,
You can explore below article and see if it helps.
nishantrana.me/.../
Please check out these articles.
docs.microsoft.com/.../walkthrough-register-app-active-directory
docs.microsoft.com/.../sample-authenticate-users-web-services
Hope this helps.
Regards
good article but both refer to using the Authorization code grant type and I'm looking for a way to use the Client Credentials grant . I have my client_id but all the documentation I'm for online, require me to register the client in the application. that what I'm trying to figure out
This article talks about registering an app in AD FS and also granting permission.
docs.microsoft.com/.../post-installation-configuration-guidelines-dynamics-365
This article talks about Web API authentication with on-premise deployments
docs.microsoft.com/.../authenticate-web-api
This article talks about oAuth token with common data service. It also has sample code to get the token.
docs.microsoft.com/.../authenticate-oauth
Hope this helps resolving your issue.
Thanks
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Daniyal Khaleel 60 Most Valuable Professional
11manish 14 Super User 2026 Season 2
Hamza H 8 Super User 2026 Season 2