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,
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
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
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
Hello Martin,
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,912 Super User 2024 Season 2
Martin Dráb 229,355 Most Valuable Professional
nmaenpaa 101,156