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