Monday, 17 May 2021

Metadata contains a reference that cannot be resolved: ‘https://orgname.crm8.dynamics.com/XRMServices/2011/Organization.svc?wsdl&sdkversion=9’ error in Dynamics 365

 We would run into this issue while trying to connect to Dynamics 365 Version 9.0 from a client application.

It is because Customer Engagement Platform (version 9.0) only supports TLS 1.2.

More details here

https://blogs.msdn.microsoft.com/crm/2017/09/28/updates-coming-to-dynamics-365-customer-engagement-connection-security/

How we can fix it à

We need to add the following line of code to our existing code

1
2
3
4
5
6
7
8
9
10
11
12
13
public static OrganizationServiceProxy GetOrganizationServiceProxy()
{
ClientCredentials clientCredentials = new ClientCredentials();
 
clientCredentials.UserName.UserName = "username";
clientCredentials.UserName.Password = "password";
 
// Set security protocol to TLS 1.2 for version 9.0 of Customer Engagement Platform
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
 
return new OrganizationServiceProxy(new Uri("https://orgname.crm.dynamics.com/XRMServices/2011/Organization.svc"),
null, clientCredentials, null);
}

Helpful post

No comments:

Post a Comment

Power Apps Drag & Drop Kanban code sample

  Introduction: The Kanban Board App Developers at a software company use the Kanban board to show their progress on development tasks and b...