Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Connecting to MFA enabled Dynamics 365 CRM instance through console application

$
0
0

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


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images