Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Suggested answer

dynamics 365 on premise Oauth2 grant types

Posted on by 30

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 

  • Pankaj Gogoi Profile Picture
    Pankaj Gogoi 3,177 on at
    RE: dynamics 365 on premise Oauth2 grant types

    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

  • martin.carpenter Profile Picture
    martin.carpenter 30 on at
    RE: dynamics 365 on premise Oauth2 grant types

    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
    martin.carpenter 30 on at
    RE: dynamics 365 on premise Oauth2 grant types

    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

  • Suggested answer
    Pankaj Gogoi Profile Picture
    Pankaj Gogoi 3,177 on at
    RE: dynamics 365 on premise Oauth2 grant types

    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

  • Suggested answer
    RE: dynamics 365 on premise Oauth2 grant types

    Hello Martin,

    You can explore below article and see if it helps.

    nishantrana.me/.../

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans