OrganizationServiceProxy is null

The CrmServiceClient class is a key component of the Xrm Tooling library. This class has two important properties that, as a developer, you may have probably used in many instances: OrganizationServiceProxy and OrganizationWebProxyClient . Depending on the authentication type, these objects may be null. This article explains some of these cases.

Let’s have a look at this code:

In this case, using the Office365 authentication type, we have that the OrganizationServiceProxy is not null, but OrganizationWebProxyClient is null.

Now the important news, you must NOT use OrganizationServiceProxy any more in your new implementations. The reason for this is that the authetication type “Office365” has been deprecated:

Effective February 4, 2020, the WS-Trust authentication type that is used by custom clients to connect to Common Data Service is deprecated. This change affects applications that utilize Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy and Microsoft.Xrm.Tooling.Connector.CrmServiceClient classes for the authentication type of β€œOffice365”

What authentication types should I use? You should use “ClientSecret” or “OAuth” instead. Let’s have a look at these examples:

In this other scenario where we are using the Client Secret authentication, we got the opposite, OrganizationServiceProxy is null, but OrganizationWebProxyClient is not null.

The same happens using OAuth:

These are three of the most common authentication types used for online deployments. However, there are a few more types, see the common data service connection strings documentation.

The following table sumarise the cases we have discussed above. What about the rest? I’ll wait for your feedback πŸ™‚

Office365Not nullNull
ClientSecretNullNot null
OAuthNullNot null
CertificateNullNot null


  • Some of the points described in this article are not something new. James Wood (@sirjameswood) already published a good article in the past covering the same topic.
  • At the time of writing this article, I’m using the package Microsoft.CrmSdk.XrmTooling.CoreAssembly and I’m connecting to an environment whose version is with 2020 release wave 1 enabled

3 thoughts on “OrganizationServiceProxy is null

  1. Hi Ramon,

    Thanks for the article. I have been using Certificate based authentication and based on that
    OrganizationServiceProxy IS NULL and IOrganizationWebProxyClient is NOT NULL

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s