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.
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.
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'.
If MFA is enabled for your organization, ensure that you have read through the documentation here.
In some instances you may be getting one of the following errors:
These errors are most likely due to one of the following issues:
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.
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.
Some organizations have a specific TLS protocol configured for their organization. You can change this setting in the connection dialog under the 'Advanced' tab.
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.
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.
Please verify that all the appropriate firewall ports have been opened so that you can reach the different CRM endpoints.
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
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.