Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

(0) ShareShare
ReportReport
Posted on by 5

Hello, I am unable to get a CrmServiceClient from my connectionStrings. I need to use an AuthType OAuth to connect to my CRM instance (Online).

Unfortunately i get this error in my debugger : 

Name Value Type
LastCrmError "Unable to Login to Dynamics CRMOrganizationWebProxyClient is null" string

pastedimage1672061546469v2.png

I always have the same error message, here are my different tests with different connectionStrings :

1)  Test with microsoft AppID and RedirectURL :
<add name="ConnectionString"
connectionString="
AuthType=OAuth;
Username=XXX@XXX.fr;
Password=fakePW;
Url=XXXXXX.crm4.dynamics.com;
AppId=51f81489-12ee-4a9e-aaae-a2591f45987d;
RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;
Integrated Security=true;
TokenCacheStorePath=c:\MyTokenCache\msal_cache.data;
LoginPrompt=Auto"/>

2) Test with my org :
<add name="ConnectionString"
connectionString="AuthType=OAuth;
Username=XXX@XXX.fr;
Password=fakePW;
Url=XXXXXX.crm4.dynamics.com/;
AppId=XXXXXXXXXXXX;
RedirectUri=login.microsoftonline.com/.../authorize;
LoginPrompt=Auto"/>

3) multiple others

I have some doubts about my redirect URL. The redirect URL I use in my 2nd test is the URL given to me in the AzureAD App. I see it uses Oauth2, maybe something there ?
Or do you see what I might be doing wrong ? How can I test with valid informations ? From microsoft for example.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

    Hi,

    Make sure you have the latest nuget update ...

    Please see my console application and app.config which works on my instance.

    github.com/.../UserBUChangeUtility

  • Suggested answer
    Leco Lv Profile Picture
    Leco Lv on at

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans