Get Client Id and Secret from APP registration in azure portal
string connectionString = "AuthType=ClientSecret; url=https://org55ced39c.crm.dynamics.com/;ClientId=ClientID ClientSecret=Secret";
CrmServiceClient crmServiceClient = new CrmServiceClient(connectionString); //Connecting to the D-365 CE instance
if (crmServiceClient != null && crmServiceClient.IsReady)
{
OrganizationServiceContext orgContext = new OrganizationServiceContext(crmServiceClient);
var contact = from c in orgContext.CreateQuery("contact")
select c;
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("\nConnected Successfully!");