Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

Posted on by 15

We have a crm online instance and have some task scheduler jobs that connects using the crm using the tooling connection string.

We are changing the application users from an online user (username@orgname.onmicrosoft.com) to an AD user (username@domain.com) but we are receiving error messages when we try the new user in the connection string.

I tried changing the AuthType attribute of the connection string but keep getting errors.

The current connection string is:

Url=https://orgname.crm4.dynamics.com;
Username= username@orgname.onmicrosoft.com;
Password=pass;
ClientId=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX;
AuthType=OAuth;
RedirectUri=http://localhost:55162/; 

After changing the connection string to:

Url=https://orgname.crm4.dynamics.com;
Username= username@domain.com;
Password=pass;
ClientId=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX;
AuthType=OAuth;
RedirectUri=http://localhost:55162/;

The OrganizationWebProxyClient attribute is null and in the LastCrmError we are getting:

ERROR REQUESTING Token FROM THE Authentication context - General ADAL Error
parsing_ws_metadata_exchange_failed: Parsing WS metadata exchange failed => The ';' character, hexadecimal value 0x3B, cannot be included in a name. Line 14, position 223.Unable to connect to CRM: The ';' character, hexadecimal value 0x3B, cannot be included in a name. Line 14, position 223.
Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

When I change the AuthType to Office365 I'm getting the error:

Unable to connect to CRM: CData elements not valid at top level of an XML document. Line 1, position 3.
Metadata contains a reference that cannot be resolved: 'adfs.domain.com/.../mex'. => CData elements not valid at top level of an XML document. Line 1, position 3.Unable to Login to Dynamics CRM
Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

And when I change the AuthType to AD I'm getting the error:

Unable to login to Dynamics CRM, Error was :
Data[0 = "The provided uri did not return any Service Endpoints!
{0}"
Data[1 = ""
Data[0 = "The provided uri did not return any Service Endpoints!
{0}"
Data[1 = ""Unable to Login to Dynamics CRM
Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

The new user name and password are correct since I'm able to login to the crm using the browser without any issue.

Thanks in advanced for the help

  • PerezAguiar Profile Picture
    PerezAguiar on at
    RE: Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

    Hey!

    I think there are a few things here.
    1. O365 Authentication is deprecated.  Most connection tools have updated versions, and you should download the latest package, so the new classes are in place.

    2. on OAuth, I'm not sure you should use ClientID but AppId.  On this documentation Use Office365 authentication with Microsoft Dataverse (Microsoft Dataverse) - Power Apps | Microsoft Docs the example is:
    connectionString = "AuthType=OAuth;Username=jsmith@contoso.onmicrosoft.com; Password=passcode;Url=contosotest.crm.dynamics.com;AppId=51f81489-12ee-4a9e-aaae-a2591f45987d; RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;LoginPrompt=Auto". 

    3. Please also ensure that the "RedirectUri" value is correct and you can reach it from internet (should not be "localhost:port" but the app where you want to login.

    Regards

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans