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)

Cannot connect to new CRM Online Organisation

(0) ShareShare
ReportReport
Posted on by 597

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

I have the same question (0)
  • Community Member Profile Picture
    on at

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

  • Joseph McGregor Macdonald Profile Picture
    597 on at

    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
    on at

    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

  • Verified answer
    Joseph McGregor Macdonald Profile Picture
    597 on at

    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

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