Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Cannot connect to new CRM Online Organisation

Posted on by 595

I created a new CRM Online organisation with new Office 365 accounts (onmicrosoft.com) and C# client code to create/connect to the OrganistionService does not work

I am receiving an error stating that identityProvider is null in an internal SDK method

The plugin registration tool in the SDK connects to the CRM organisation, but none of the SDK sample code will connect

I have tried to connect using several methods

1. The connection string sample code project "QuickStart with Simplified Connection" in(SDK\SampleCode\CS\QuickStart)

2. The WPF Client sample code project "QuickStartXRMToolingWPFClient" in (SDK\SampleCode\CS\XRMTooling\QuickStartXRMToolingWPFClient)

3. My Dev Tool on GitHub - this connects initially to the discovery service which appears to be the point the error is thrown https://github.com/josephmcmac/XRM-Developer-Tool (CRM-SDK-8.2 branch)

Has anyone else received this error and know how to fix it?

*This post is locked for comments

  • Verified answer
    RE: Cannot connect to new CRM Online Organisation

    This is resolved now. The client code suddenly started to connect correctly without any changes

    Not sure if I have to wait a while after creating a new online orgnaisation to connect from a C# client or something, or something was changed server side

    For the SDK sample code I did have to upgrade the code to reference SDK v8.2 assemblies, instead of v8.0 assemblies, but this was to fix an unrelated issue/error where new CRM Online does not allow connections from old SDK assemblies

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot connect to new CRM Online Organisation

    have you tried to use your organization unique name. So the connection string would be like = "url = 45ab2258.crm6.dynamics.com" where the 45ab2258 is your organization unique name. You can find the organization unique name in Setting - customizations - developer resources - unique name

  • RE: Cannot connect to new CRM Online Organisation

    It is the SDK sample code virtually untouched. The code is located in the latest SDK (8.2) at the path SDK\SampleCode\CS\QuickStart

    The only change I did was
    1. Add a connection string to the app.config as per the example and SDK instructions

    <add name="onlineconnection"
             connectionString="Url=mcgregor2017.crm6.dynamics.com; Username=joseph@mcgregor2017.onmicrosoft.com; Password=XXXXXXXX; authtype=Office365"/>


    2. Modify the Run() method to only call a WhoAmIRequest after creating the IOrganizationService

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot connect to new CRM Online Organisation

    Never got this error before, could you share your simplified connection code ?

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