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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Authenticating to Dynamics 365 On-Premises Web API from ASP.NET Core 2.0 web application

(0) ShareShare
ReportReport
Posted on by 15

My company has a Dynamics 365 On-Premises system using ADFS 2012 for authentication. We have created an ASP.NET Core 2.0 Application that is attempting to access the web API, but we have been unable to find any way to authenticate after trying many different options. Most of what we have found on the MSDN is for either the .NET Framework, or for authentication through Azure AD, but neither of those are relevant to our situation. If needed I can provide more details about the specific resources we have tried, as well as sample code. 

*This post is locked for comments

I have the same question (0)
  • gdas Profile Picture
    50,091 Moderator on at

    Hi Ryan,

    I have found one article you may get  help from here -

    stackoverflow.com/.../authorize-webapp-to-adfs-in-order-to-access-dynamics-crm-web-api

  • Ryan_Ketcham Profile Picture
    15 on at

    Hi Goutam,

    Thank you for your response! We have tried the method outlined in the article, but our issue is that we are running ADFS 2012, which does not support Application Groups. Therefore, we have not been able to generate a client secret to authorize our application. If there is some way to register an application in ADFS 2012 and generate a client secret, that would work, but we have been unable to find a way to do so.

    Thanks,

    Ryan

  • rthompson Profile Picture
    1,532 on at

    Hi Ryan,

    Any luck with getting this to work.

    If so,  could you post example.

     

  • Ryan_Ketcham Profile Picture
    15 on at

    Hello,

    I do not believe we ever got this to work with On-Premises Dynamics. We ended up migrating to Dynamics 365 Online hosted CRM, so we were able to authenticate that way. They have stopped updating the On-Premises Dynamics and we had multiple issues that we needed to update to v9 to fix, which required migrating to Online. I would suggest migrating to Online if your organization is willing/able.

    Thanks,

    Ryan

  • rthompson Profile Picture
    1,532 on at

    Thanks....

    Yes... I am using 365 online as well.

    But I would like to get the on-premise working.

  • Ryan_Ketcham Profile Picture
    15 on at

    I don't believe one 365 environment can be both. By Online I mean it is hosted on Microsoft's servers, not on-premises. They are mutually exclusive. I do not know of an easy way to connect to the API of an on-premises, other than building your own API around the on-premises database, which you should access to.

    Hope this helps.

  • rthompson Profile Picture
    1,532 on at

    Sorry. I did not say.

    I am using both 365 online and 2016.

    Trying to get this to work with 2016 on-premises.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans