Wednesday, June 3, 2020

We were trying to connect Dynamics 365 instance from inside a corporate network which was having security restrictions.

It allowed outbound calls only through a proxy server. So when we tried to connect D365 using the SDK, the following error message was received.

Error Message

One or more errors occurred. => An error occurred while sending the request. => The remote name could not be resolved: 'xxx.crm4.dynamics.com'ERROR REQUESTING Token FROM THE Authentication context ERROR REQUESTING Token FROM THE Authentication contextNeed a non-empty authority Parameter name: AuthorityUnable to connect to CRM: Need a non-empty authority Parameter name: Authority Need a non-empty authority Parameter name: AuthorityUnable to Login to Dynamics CRM Unable to Login to Dynamics CRMOrganizationWebProxyClient is null OrganizationWebProxyClient is nullOrganizationWebProxyClient is null OrganizationWebProxyClient is nullOrganizationWebProxyClient is null OrganizationWebProxyClient is null

Resolution

Put the following in the config file and update the proxy address accordingly.

<system.net> <defaultProxy useDefaultCredentials="true" enabled="true"> <proxy usesystemdefault="true" proxyaddress="http://my-proxy.com:3128" /> </defaultProxy> </system.net>

For connecting to D365 using SDK, see my other blog at CrmServiceClient: Authenticate an Active Directory Account (ADFS) with CRM Online / Dynamics 365.

No comments:

Post a Comment