web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Unable to Login to Dynamics CRMOrganizationServiceProxy is null

(0) ShareShare
ReportReport
Posted on by 1,875

Hi

I have a console application that connects to Dynamics 365. It works from Development environment but when we deploy at Staging it throws error "Unable to Login to Dynamics CRMOrganizationServiceProxy is null".

 

The credentials and CRM organisation is same. We are using Xrm.Tooling connector for this.

 

string connectionString = ConfigurationManager.ConnectionStrings["CRM"].ConnectionString;
CrmServiceClient crmConn = new CrmServiceClient(connectionString);
Console.WriteLine("Connected Org Name:{0}", crmConn.ConnectedOrgFriendlyName);

 

 

Any thoughts?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nishant Rana Profile Picture
    11,325 Microsoft Employee on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    This worked for us

    nishantrana.me/.../

  • CrmMad Profile Picture
    65 on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    Thank YOU!!!  It's working NOW with this

  • Selda Profile Picture
    80 on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    It works thanks your comment.

  • Dharanidharan Profile Picture
    638 Super User 2025 Season 2 on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    I have CRM SDK V9.0 dll and also I have added this below line before establishing connection to CRM

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

    one thing is instead of Office 365 Auth type I have given OAuth. Below is my connection string

    AuthType=OAuth;Username=<<Username>>; Password=<<Password>>;Url=<<CRMOrgUrl>>;AppId=<<AzureADSppId>>;RedirectUri=<<ReplyUrl>>

    while establishing the connection I getting the below error: "Unable to Login to Dynamics CRMOrganizationWebProxyClient is null"

    Can anyone please help me on this?

  • Suggested answer
    TomDT Profile Picture
    on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    For PowerShell Users:

       #V9 requires new security protocol in order to connect

       # reference:  crmtipoftheday.com/.../connect-to-version-9-in-your-code

       [tag:Adding] this one line of code solved my error:

       [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

  • Community Member Profile Picture
    on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    Thanks venugopal3112 it works for me :)

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    Hi ,

    Seems this may come due to some credentials or url related issue.

    Hope below reference will help you.

    missdynamicscrm.blogspot.in/.../error-unable-to-login-to-dynamics.html

    Good luck.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    Add a reference  System.Net;

    Add a namespace using System.Net;

    ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

    Add this before the connection string is passed

    Thank you

  • Iswarya Profile Picture
    1,347 on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    Hi All,

    i too have same issue , i tried everything whatever suggestion is given but still same issue occurs please suggest me to achieve this

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    try the below things:

     

    Dlls Required:
    Microsoft.Xrm.Tooling.Connector.dll
    System.Net dll

    CRM connection code:
    string connectionString = ConfigurationManager.ConnectionStrings["CRM"].ConnectionString;

    CrmServiceClient client = new CrmServiceClient(connectionString);
    Connection String:
    <add name="CRM" connectionString="AuthType=Office365;Username=myid@mydomain.com; Password=mypassword;Url=organiationuniquename.crm.dynamics.com"/>
    Please add this line to your code before connect to CRM.

    ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; // add ref System.Net dll

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans