User organizations issue

There appears to be occasional issues with users on certain on-premise deployments concerning users pointing to a different organization. Typically, this is caused by Dynamics CRM version upgrades.

It appears that users’ default organization ID in mscrm_config database is being defaulted to something else. This can cause issues. To resolve this, users’ default organization must be set correctly using script, and then an IIS reset be performed.

Solution

To resolve the user organizations issue, fire up an instance of SQL Server Management Studio and use the following script:

 

Sample Excel with script:

script to fix user organizations issue

 

Download sample here.

It is highly recommended to run these scripts during off-hours (when users are all offline).

Conclusion

This approach should only be performed by power users. Do not perform the above steps if you don’t know what you are doing. Once scripts are run, perform an IIS Reset then log out of and log back in to MS CRM.