Sandbox Refresh
If the Sandbox is being refreshed from a production organization, all configurations and possibly data will be cloned, depending on the version of the Sandbox. However, there are configurations that are specific to the original environment that will not work in the Sandbox. This document captures a list of tasks to focus on after a Sandbox refresh.
Fix Metadata/UI API access
The Connected Application, Authorization Provider and Named Credentials settings will hold information from Production Organization after the Sandbox refresh. These misconfigurations will prevent access to the API from ClosePlan Admin and possibly from other locations. They are accompanied by an Error Message:
Error
You don’t have permission to view this data. Ask your administrator to set up authentication for the external data source
Please correct following components based on the Sandbox information.
Fix Connected App
Connected Application (App Manager):
Open Auth. Provider
Setup > Identity > Auth. Providers > Open ‘ClosePlan Metadata Auth Provider’
In a new window open Connected App (App Manager)
Setup > Apps > App Manager > find ‘ClosePlan Connected App’ and from the drop down arrow, select Edit
Check that the Callback URL field in the Connected App has the same value as in Auth. Provider
If the values are NOT equal, replace the value in the Connected App with the value from Auth. Provider > Save
For further information on understanding the correct Callback URL format:
Fix Authorization Provider
Provide correct Key/Secret
Open Connected Application (App Manager)
Setup > Apps > App Manager > find ‘ClosePlan Connected App’ and from the drop down arrow, select View
In a new window open Auth. Provider
Setup > Identity > Auth. Providers > click Edit next to ‘ClosePlan Metadata Auth Provider’
Check that the Consumer Key field and Consumer Secret field value are the same as in the Connected App
If the values are NOT equal, replace the values in Auth Provider with values from the Connected App and save.
Fix Named Credentials
Verify URL
Open My Domain page
Setup > Company Settings > My Domain
In a new window open Named Credentials
Setup > Named Credentials > click Edit next to ‘ClosePlan Metadata Service’
Disable Start Authentication Flow on Save
Check that that URL field value is the same as the value for ‘Current My Domain URL’ in the My Domain page
If the values are NOT equal, replace the values in the 'Named Credentials' URL field with value from the My Domain page > Save
Re-Authenticate Credentials
If any correction was made, open Named Credentials.
Setup > Named Credentials > click Edit next to ‘ClosePlan Metadata Service’
Make sure Start Authentication Flow on Save is enabled
Click Save to start auth. process
Note: It may take a few minutes until all settings are propagated, after which you will be redirected to a login screen. If you are not quickly directed to a log in screen, wait few minutes and repeat.
Log in with your Sandbox Username and password for the Sandbox Org
Make sure to log in with your Sandbox username and PW.
Using a Production username will be accepted by the System, but will not work and will cause errors in the ClosePlan application!
Tag: Error
You don't have permission to view this data. Ask your administrator to set up authentication for the external data source