--- title: Failed to configure the organization error when trying to switch organization slug: '2856' canonical_url: https://docs.coveo.com/en/2856/ collection: coveo-for-sitecore-v5 source_format: adoc --- # Failed to configure the organization error when trying to switch organization ## Symptoms In the **Configuration** section of the **Command Center**, you're not able to switch to another organization and get the following message: ```txt Failed to configure the organization: Error: Something went wrong. Please contact your administrator. ``` Also, in your Sitecore logs files, you see the following error message: ```txt 29116 09:44:53 INFO Could not retrieve license from Coveo cloud. Exception: Coveo.Framework.Exceptions.CriticalException Message: ACCESS_DENIED Source: Coveo.Framework at Coveo.Framework.Connection.CriticalExceptionHandler.HandleException(HttpClientException p_Exception, String p_Message) at Coveo.CloudPlatformClientBase.CloudPlatformClient.HandleInvalidTokenError(HttpClientException p_Exception) at Coveo.CloudPlatformClientBase.CloudPlatformClient.PerformPlatformCallWithErrorHandling(String p_RequestMethod, String p_RequestUri, String p_RequestContent, Boolean p_SkipAccessDeniedValidation) at Coveo.CloudPlatformClientBase.CloudPlatformClient.GetLicense(String p_OrganizationId) at Coveo.CloudPlatformClientBase.CloudPlatformClient.GetFullLicense(String p_OrganizationId) at Coveo.SearchProvider.Licensing.CloudLicenseRetriever.GetCloudLicense() Nested Exception Exception: Coveo.Framework.Utils.Rest.HttpClientException Message: Failed to obtain resource located at ''. [BEGIN RESPONSE BODY]{"message":"Invalid access token.","errorCode":"INVALID_TOKEN","requestID":"..."}[END RESPONSE BODY] Source: Coveo.Framework at Coveo.Framework.Utils.Rest.HttpClient.HandleResponseException(WebException p_Exception, String p_Url, Int64 p_CallId) at Coveo.Framework.Utils.Rest.HttpClient.ExecuteRequest(String p_Url, Func`2 p_CreateRequest, Int64 p_CallId) at Coveo.Framework.Utils.Rest.HttpClient.GetRaw(String p_Url) at Coveo.Framework.Utils.Rest.HttpClient.Get(String p_Url) at Coveo.CloudPlatformClientBase.CloudPlatformClient.PerformPlatformGetCall(String p_OperationUri) at Coveo.CloudPlatformClientBase.CloudPlatformClient.PerformPlatformCall(String p_HttpMethod, String p_OperationUri, String p_RequestContent) at Coveo.CloudPlatformClientBase.CloudPlatformClient.PerformPlatformCallWithErrorHandling(String p_RequestMethod, String p_RequestUri, String p_RequestContent, Boolean p_SkipAccessDeniedValidation) Nested Exception Exception: System.Net.WebException Message: The remote server returned an error: (401) Unauthorized. Source: System at System.Net.HttpWebRequest.GetResponse() at Coveo.Framework.Utils.Rest.HttpClient.ExecuteRequest(String p_Url, Func`2 p_CreateRequest, Int64 p_CallId) ``` You can also see the following message if the configured API key can't be properly decrypted: ```txt An error occurred while decrypting the ApiKey configuration element value. The element value will be used as is assuming it's unencrypted. ``` ## Cause This issue occurs when you have an invalid API key in your configuration that isn't recognized by the [Coveo Platform](https://docs.coveo.com/en/186/). ## Resolution Generate a temporary API key in Coveo to switch organization. . Create a new API key (see [Activate Coveo for Sitecore - Creating the API keys](https://docs.coveo.com/en/2484#create-apikey)). You don't need to create a new `SearchApiKey`. . Set this API key directly in the `Coveo.CloudPlatformClient.Custom.config` file, inside the `ApiKey` node. . In the **Configuration** section of the **Command Center**, try configuring your organization, as usual. . Once your organization configured, you can safely delete the API key you created in Coveo.