Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

CRM Connection String when using On-Premise ADFS with D365 Online

Posted on by 302

Hi Guys,

        I am working for a client who have  setup their own ADFS with Azure AD to work with D365 online. What would be the connection string for this setup. I tried using AuthType=Office365. But it is not working. Any suggestions please.

Thanks

Tiklu

*This post is locked for comments

  • Tiklu Ganguly Profile Picture
    Tiklu Ganguly 302 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Hi Guys,

          It does seems that the problem is coming due to the fact that the ADFS server have IP filtering. though it is at present allowing IP address range from within the organization. It is blocking all other IP addresses, which also includes IP address range from Azure Data Center. Since the app is running in Azure Data Center and the IP address of the data center is not whitelisted in the on prem ADFS server, the request is getting blocked. 

    I will update once this problem is resolved. 

    Thanks

    Tiklu

  • Tiklu Ganguly Profile Picture
    Tiklu Ganguly 302 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Hi Gautam,

                Thanks for your reply. I will try using orgservice instead of crmserviceclient. Just to reiterate I am trying to connect to a server that uses a custom ADFS server for authentication. I seem to be able to connect to the server using AuthType=Office365 while trying to connect to it from a console app. I also have a trial D365 CRM account. I am able to connect to it from my azure function just fine. The problem is coming when  I am trying to connect to the first D365 instance from my azure function. All d365 instances are online and version 9.

    Thanks

    Tiklu

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Take a look below article , I guess this is what you need -

    community.dynamics.com/.../using-azure-functions-to-call-dynamics-365

  • Tiklu Ganguly Profile Picture
    Tiklu Ganguly 302 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Hi Gautam,

             Inspired from your reply, I created a console app and was trying to connect using that using crmserviceclient. This one seems to be working just fine. I am running my code in Azure Function App. Any hints?

    Thanks

    Tiklu

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Have a look below post'

    goutamdascrm.wordpress.com/.../connecting-dynamics-365-online-using-console-application-c

  • Tiklu Ganguly Profile Picture
    Tiklu Ganguly 302 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Hi Temmy,

             Adding domain is not helping. Any other suggestions?

    Thanks

    Tiklu

  • Tiklu Ganguly Profile Picture
    Tiklu Ganguly 302 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Hi Temmy,

                Thanks for your reply. We are using D365 online. Are you sure we can use AuthType=AD for that? May be I can try adding the domain in the connection string and get back to you with the answer.

    Thanks

    Tiklu

  • Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Hi,

    Do you already check this blog post? crmhunt.com/use-connection-strings-in-xrm-tooling-to-connect-to-crm

    <add name=”CRMServer” connectionString=”AuthType=AD;Url=http://amartestsrv:8080/Test; Domain=crmhunt; Username=admin; Password=pass#123$” />

  • Tiklu Ganguly Profile Picture
    Tiklu Ganguly 302 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Hi Guys,

              The error message in CrmServiceClient.LastCrmError is

    "Unable to Login to Dynamics CRM"

    Thanks

    Tiklu

  • Tiklu Ganguly Profile Picture
    Tiklu Ganguly 302 on at
    RE: CRM Connection String when using On-Premise ADFS with D365 Online

    Hi Guys,

           From the connection manager window of XRM Toolbox I was able to find the connection string. But this string is not working. I have tried my code with a trial D365 environment that I have created and I am able to connect to that environment successfully.

    Is there anything specific I am missing?

    Thanks

    Tiklu

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans