CRM 2016: How a Web API C# console application connect to CRM IFD? RRS feed

  • Question

  • Hello,

    I'm looking for a solution to connect a Web API console application to CRM IFD. All solution I found online is I have to register the app with Microsoft Azure AD to get clientId and redirectUrl. But for CRM IFD(ADFS) development, there should have a standard way to connect to CRM without registering in Azure AD.

    Does anyone have sample C# code  to share?

    Thanks in advance.

    Monday, November 21, 2016 8:05 PM

All replies

  •  Got solution for this, Just registered my application in Azure as Native client application and used the security token to authenticate my application with Azure Ad.



    Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.

    Tuesday, November 22, 2016 9:38 AM
  • How can I make it work without registering in Azure? Any other way to do it?
    Wednesday, November 23, 2016 9:11 PM
  • Hi,

    code to connect to IFD crm is already given in mscrm sdk "SDK\SampleCode\CS\GeneralProgramming\Authentication"

    Please check and I believe it will help you. As I have used same. :)


    Thursday, November 24, 2016 7:13 AM
  • Hello Swetha,

    I'm asking how to do it by web api. I don't think the one you pointed answers my question.

    Tuesday, December 20, 2016 9:02 PM
  • Assuming you mean IFD on-premise, instead of using Azure, you probably need to configure your app within ADFS to setup the claims properly, enable OAuth, etc. If you are talking about CRM Online, Azure basically handles that for you when you set up your application in Azure.
    Wednesday, January 18, 2017 5:03 PM