MscrmTools.Xrm.Connection icon indicating copy to clipboard operation
MscrmTools.Xrm.Connection copied to clipboard

Error: ERROR REQUESTING Token FROM THE Authentication context - Error: Path cannot be the empty string or all whitespace.

Open MattHorvay opened this issue 5 years ago • 1 comments

Trying to connect XrmToolBox v.1.2019.11.35 to Dynamics 365 using a user account with MFA. Can't use app passwords because they aren't compatible with Azure AD Conditional Access.

When I use the Connection wizard with CRM online option I get the following error messages:

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Verbose 16 11/19/2019 2:34:32 PM Initialize CRM connection Started - AuthType: ClientSecret Microsoft.Xrm.Tooling.Connector.CrmServiceClient Verbose 16 11/19/2019 2:34:32 PM Direct Login Process Started .... Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 11/19/2019 2:34:32 PM ERROR REQUESTING Token FROM THE Authentication context Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 11/19/2019 2:34:32 PM ERROR REQUESTING Token FROM THE Authentication context Source : Not Provided Method : Not Provided Date : 11/19/2019 Time : 2:34:32 PM Error : ERROR REQUESTING Token FROM THE Authentication context Stack Trace : Not Provided

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 11/19/2019 2:34:32 PM Source : mscorlib Method : CreateDirectory Date : 11/19/2019 Time : 2:34:32 PM Error : Path cannot be the empty string or all whitespace. Stack Trace : at System.IO.Directory.CreateDirectory(String path) at Microsoft.Xrm.Tooling.Connector.CrmServiceClientTokenCache..ctor(String cacheFilePath) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ObtainAuthenticationContext(String Authority, Boolean requireValidation, String tokenCachePath) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ExecuteAuthenticateServiceProcess(Uri serviceUrl, ClientCredentials clientCredentials, X509Certificate2 userCert, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath, Boolean isOnPrem, String authority, Uri& targetServiceUrl, AuthenticationContext& authContext, String& resource, UserIdentifier& userIdent, CrmLogEntry logSink, Boolean useDefaultCreds, SecureString clientSecret)

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 11/19/2019 2:34:32 PM Unable to connect to CRM: Path cannot be the empty string or all whitespace. Source : mscorlib Method : CreateDirectory Date : 11/19/2019 Time : 2:34:32 PM Error : Path cannot be the empty string or all whitespace. Stack Trace : at System.IO.Directory.CreateDirectory(String path) at Microsoft.Xrm.Tooling.Connector.CrmServiceClientTokenCache..ctor(String cacheFilePath) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ObtainAuthenticationContext(String Authority, Boolean requireValidation, String tokenCachePath) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ExecuteAuthenticateServiceProcess(Uri serviceUrl, ClientCredentials clientCredentials, X509Certificate2 userCert, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath, Boolean isOnPrem, String authority, Uri& targetServiceUrl, AuthenticationContext& authContext, String& resource, UserIdentifier& userIdent, CrmLogEntry logSink, Boolean useDefaultCreds, SecureString clientSecret) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ConnectAndInitCrmOrgService(OrganizationDetail orgdata, Boolean IsOnPrem, Uri homeRealmUri) at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.DoDirectLogin() at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.InitCRM2011Service()

I also tried connecting using the Connection string method and got a different error message so I created a different issue for that.

Any help with this error would be greatly appreciated.

Thank you, Matt

MattHorvay avatar Nov 19 '19 19:11 MattHorvay

@MattHorvay is this still an issue?

MscrmTools avatar May 10 '20 13:05 MscrmTools