If a Sandbox is refreshed from a Production Organization, please correct the following configurationconfigurations must be corrected:
Fix Connected App Configuration
...
Connected Application:
Open Authorization Provider
Setup > Identity > Auth. Providers > Open ‘ClosePlan Metadata Auth Provider’ provider
In a new window open Connected App
Setup > Apps > App Manager > Edit 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
Replace with If the values are NOT equal, replace the value in the Connected App with the value from Auth. Provider if needed, > Save and Continue
Authorization Provider:
Open Connected App
Setup > Apps > App Manager > Open find ‘ClosePlan Connected App’ and from the drop down arrow, select View
In a new window open Authorization Auth. Provider
Setup > Identity > Auth. Providers > click Edit next to ‘ClosePlan Metadata Auth Provider’ provider
Check that the Consumer Key field and Consumer Secret field value is are the same as in the Connected App
Replace If the values are NOT equal, replace the values in Auth Provider with values from the Connected App if needed and > Save
Named Credentials:
Open My Domain page
Setup > Company Settings > My Domain
Open In a new window open Named Credentials
Setup > Security > Named Credentials > click Edit next to ‘ClosePlan Metadata Service’
Disable Start Authentication Flow on Save
Make sure Check that that URL field value is the same as value next to ‘Your domain name is:’ in My Domain page and Save.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 > Security > Named Credentials > click Edit next to ‘ClosePlan Metadata Service’
Make sure Start Authentication Flow on Save is checked
Hit Save to start auth. process
Note that it might : It may take a few minutes until all settings are propagated. You , after which you will be redirected to the login screen. If you are not directed to a log in screen, wait few minutes and repeat.
Log in with the associated your Sandbox Username for the Sandbox Org
(Please Note: Logging in with your Production Username will cause errors in the Application!)