Hi
What can be possibly wrong with this code as I' trying to connect to D365 from VS Desktop C#
I'm getting this error:
CurrentAccessToken = 'svcClient.CurrentAccessToken' threw an exception of type 'System.NullReferenceException'
string connectstr =
"AuthType= 'ClientSecret';" +
"url='">OrgName.crm3.dynamics.com';" +
"ClientID='75fbd615-af9a-4d2c-b072-d78da6635189';" +
"ClientSecret='wpy8Q~Z2DimQgaYSMNC0w5kaOBcWFUsW_4Zd5aNX';";
using (CrmServiceClient svcClient = new CrmServiceClient(connectstr))
{
if (!svcClient.IsReady)
{
Console.WriteLine("unable to connect!");
return;
}
}