Troubleshooting Issues Connecting to your CRM Organization.

Username or password is incorrect

Please double check to make sure that the username and password you are using is correct. You can verify this by logging into the CRM Organization directly.

Discovery or Organization URL is incorrect

Please check to make sure that the Discovery Service or Organization Service URL has been entered properly. For more information about your Discovery URL please see Microsoft's documentation here.

WS-Trust Deprecation

You may receive the following error message when trying to use the 'D365 Online' authentication type:

"An error occurred when processing the security tokens in the message: You are using Ws-Trust authentication which has been deprecated and no longer supported in your environment. Please use OAuth2.0 authentication."

This is due to the fact that the 'WS-Trust' protocol has been depcrecated for Dynamics365 online instances. For more information see here.

In most instances, you can simply change the 'Authentication Type' to 'OAuth/MFA' without requiring any additional configuration. In other instances you may need to supply your own 'Azure App Id' and 'Azure App Reply URL'.

Multi-Factor Authentication (MFA) Enabled

If MFA is enabled for your organization, ensure that you have read through the documentation here.

Conflicting SDK Dll's

In some instances you may be getting one of the following errors:

  • Method not found: 'System.String Microsoft.Xrm.Sdk.Organization.OrganizationDetail.get_EnvironmentId()
  • Method not found: 'System.String Microsoft.Xrm.Sdk.Organization.OrganizationDetail.get_TenantId()

These errors are most likely due to one of the following issues:

  • One or more of the 'Microsoft.Xrm.*' or 'Microsoft.Crm.*' dll's being registered in the GAC
  • Other extensions installed in Visual Studio that interact with Dynamics365.
Microsoft assemblies in the GAC:

Any Microsoft SDK assemblies that are registered in the GAC will take precedence over the dlls that are shipped with XrmToolkit. This can sometimes cause problems. To fix this, you can run the following command from a Visual Studio Developer Command Prompt to determine if there are any dlls registered there:

gacutil /l Microsoft.Xrm.Sdk

Please unregister any of these dlls from the GAC.

Other extensions that interact with Dynamics365:

For the same reasons as assemblies being registered in the GAC, other extensions may ship with different SDK dlls and depending on how Visual Studio loads the extensions, they may take precedence over the dlls that are shipped by XrmToolkit. These extensions will need to be removed or updated (by their author) so that they are using the latest Microsoft SDK dlls.

Different TLS Protocol

Some organizations have a specific TLS protocol configured for their organization. You can change this setting in the connection dialog under the 'Advanced' tab.

VS 2015 with D365 Online:
You may run into connection issues when using XrmToolkit in Visual Studio 2015 with the default TLS setting. Try changing to TLS 1.2 (or whatever is appropriate) to see if this resolves the issue.
Time difference between your machine and the CRM server

If the time difference between your local machine and the CRM server is greater than 5 minutes then CRM may not allow you to connect to it.

User does not have enough privileges

Please verify that the CRM user account has enough privileges to connect via the SDK. Generally speaking a user with either the 'System Administrator' or 'System Customizer' role should be used. In the case of plugins, if you are trying to register your plugin outside of the sandbox then you will need to be a CRM Deployment Administrator.

Firewall Ports Not Open

Please verify that all the appropriate firewall ports have been opened so that you can reach the different CRM endpoints.

Windows Identity Foundation

XrmToolkit uses the CRM SDK behind the scenes to connect with the organization. The requirement of having Windows Identity Foundation installed is due to the SDK and the way it connects to the organization. Windows Identity Foundation is a free download from Microsoft here: Windows Identity Foundation Download

Note:
If you are using Windows 8 or above or Server 2012 or above, then Windows Identity Foundation is a feature that you enable by going through the "Add/Remove Programs" window. You can learn how to enable it here: Enable Windows Identity Foundation
CRM Webservice is not started due to low memory on server

If the memory usage (RAM) of the server exceeds 95% then IIS shuts down and/or does not allow the CRM webservices to be started. You would see event logs on the server indicating this.