locked
CRM 2016:Using Web API for CRM IFD to connect CRM Web Service RRS feed

  • Question

  • Hello,

    I'm new to Web API and trying to build a CRM Web Service application with C# by using Web API. Here is the sample code I'm using: C# application which authenticates against Azure AD using ADAL and communicates with Dynamics CRM

    This code works perfectly for AD authentication on premise CRM environment. But my environment is IFD, which means I have to use OAuth. it says method calls to the web services must be authorized with the identity provider for that service endpoint. However all the example point to Microsoft Azure Active Directory. but for real case, do we have to register a CRM app with Azure Active Directory?

    Then how can I define the 'Client ID', 'RedirectUrl', 'Authority' in my code, where is my endppoint? We're using ADFS authentication.

    Can anyone share some sample codes for this?

    Thanks.


    Friday, September 2, 2016 8:59 PM

All replies

  • Here's the documentation for the WebApi authentication.:

    https://msdn.microsoft.com/nl-nl/library/mt595798.aspx

    If I'm not mistaken, you should use OAuth with ADFS but that's only available with Server 2016.


    Martijn Eikelenboom

    Friday, September 16, 2016 11:00 AM
  • Hi,

    To connect CRM Web Service with C# using Web API you may refer the below link.
     
    http://www.inogic.com/blog/2016/03/programming-using-webapi-through-c-in-dynamics-crm-2016/ 
     
    Hope this help!
     
    Thanks,
    Sam


    Inogic | Blog | news@inogic.com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Saturday, September 17, 2016 11:31 AM
  • It looks like still not being addressed. All your links point to same way to do thing(getting clientid and  redirecturl) by registering application with microsoft Azure. My question is: Is this the only way to get clientid and redirectUrl by using microsoft azure, even for IFD(ADFS) authentication?
    Monday, November 14, 2016 5:14 PM