Hello Experts,
I'm trying to connect to dynamics 365 CRM instance through console application but getting 'Unable to login to CRM' error.
Here is my code.
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
string connectionString = "AuthType=ClientSecret; url=myorg.crm.dynamics.com; ClientId=b77e2b5a-3946-485e-########; ClientSecret=s.tOrEuew_QTuGxV8Y0v4iTK######;
CrmServiceClient crmServiceClient = new CrmServiceClient(connectionString);
if (crmServiceClient != null && crmServiceClient.IsReady)
{
Console.WriteLine("\nConnection successful.");
}
I performed all the steps mentioned in this link:
https://nemely.com/blog/connect-to-multi-factor-enabled-d365-cds-programmatically-online-9-1/
Thanks,
Priyank