Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Unable to Login to Dynamics CRMOrganizationServiceProxy is null

Posted on by 156

Hello Community,

I am getting an error in my Console App which is run for the last 2 years without any issue similar to this "Unable to Login to Dynamics CRMOrganizationServiceProxy is null"

Following is the screenshot for code for connection:

6874.Screenshot_5F00_39.png

We have just changed the password for that user because the password got expired recently. But in CRM Connection string we have updated the password.

Can you anyone please let me know why we are getting the issue?

  • Verified answer
    Amit Prajapati Profile Picture
    Amit Prajapati 156 on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    I have used the credentials for another environment then it is working. It is not an issue with Codebase or Package used. I think it because of user configuration.

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    Amit,

    So what exactly doesn't work?

    Also what "rework on the code" do you mention? There (usually) no need to change the code when you change the reference to the most recent version of assemblies.

  • Amit Prajapati Profile Picture
    Amit Prajapati 156 on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    Hi,

    I have try to change the connection line with your line of code but it didn't work for me:

    IOrganizationService service = new CrmServiceClient(ConfigurationManager.ConnectionStrings["CRM"].ConnectionString);

    I can't update the packages because the codebase is 3 years old and If I will update the package to the latest version then I need to do rework on the code.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Unable to Login to Dynamics CRMOrganizationServiceProxy is null

    Hello,

    I don't have the exact reason why your code stopped working but I know what to do to fix it:

    I would recommend to update references to use the latest version of the SDK from NuGet and replace 2 and 3 lines with a single line:

    IOrganizationService service = new CrmServiceClient(ConfigurationManager.ConnectionStrings["CRM"].ConnectionString);

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans