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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

dynamics 365 on premise Oauth2 grant types

(0) ShareShare
ReportReport
Posted on by 32

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 

  • Suggested answer
    Satish Tiwari - CRM Profile Picture
    Microsoft Employee on at

    Hello Martin,

    You can explore below article and see if it helps.

    nishantrana.me/.../

  • Suggested answer
    Pankaj Gogoi Profile Picture
    3,177 on at
  • martin.carpenter Profile Picture
    32 on at

    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

  • martin.carpenter Profile Picture
    32 on at

    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

  • Pankaj Gogoi Profile Picture
    3,177 on at

    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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 60 Most Valuable Professional

#2
11manish Profile Picture

11manish 14 Super User 2026 Season 2

#3
Hamza H Profile Picture

Hamza H 8 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans