Posts

Showing posts with the label how to connect to CRM using C#

Connect Dynamics CE using ClientID and ClientSecret

 /*Connection establishing using ClientID & Client Secret*/ public static void GetConnection()         {             try             {                 string connectionString = "AuthType=ClientSecret; url=REPLACE WITH ORANIZATION URL; ClientId=REPLACE WITH YOUR CLIENT ID; ClientSecret=REPLACE WITH YOUR CLIENT SECRET";                 crmServiceClient = new CrmServiceClient(connectionString); //Connecting to the D-365 CDS instance                 if (crmServiceClient != null && crmServiceClient.IsReady)                 {                     Console.WriteLine("\nConnection successful.");                 }             ...