微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用连接字符串发出与 CRM 的连接

如何解决使用连接字符串发出与 CRM 的连接

我们有一个 crm 在线实例,并且有一些任务调度程序作业,它们使用工具连接字符串使用 crm 进行连接。

我们正在将应用程序用户从在线用户 (username@orgname.onmicrosoft.com) 更改为 AD 用户 (username@domain.com),但是当我们在连接字符串中尝试新用户时收到错误消息。

我尝试更改连接字符串的 AuthType 属性,但一直出现错误

当前连接字符串为:

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/; 

将连接字符串改为:

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

OrganizationWebProxyClient 属性为空,在我们得到的 LastCrmError 中

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,position 223.
Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

当我将 AuthType 更改为 Office365 时,出现错误

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: 'https://adfs.domain.com/adfs/services/trust/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

当我将 AuthType 更改为 AD 时,出现错误

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

新的用户名和密码是正确的,因为我可以使用浏览器登录到 crm 没有任何问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。