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.

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.