When a Sandbox is created or refreshed from Production, and T4S was already installed in Production.
Then several tasks must be performed to make sure that the Sandbox is not trying to connect back to the production Content Manager server.
Re-install the same version of the T4S package again on the Sandbox.
There are a number of post-install records created when the T4S package is installed.
Re-installing the same version T4S package will ensure those required records exist on the new refreshed Sandbox.
Disable the Salesforce Remote Site Setting that allows the Sandbox to call out to the Production T4S Server.
Enable or create the Salesforce Remote Site Setting that will allow the Sandbox to call out to the Test/UAT T4S Server.
Create a new Self Signed Certificate in the Sandbox.
Call the certificate something meaningful e.g. <Sandbox Name>Certificate.
This helps identify the certificate after it is installed on the Test/UAT T4S Server.Set the certificate to two years.
For a full or partial Sandbox Org check if there is an existing T4S Trim Server configuration record in Salesforce.
Edit this record to use the Test/UAT T4S Server domain name.
Edit the record to use the Test/UAT Content Manager REST API domain name.
Edit the Certificate field, and enter the newly created certificate.
Check the T4S Custom Setting encryption key is the same key used on the Test/UAT T4S Server web.config.
Clear any existing T4S Trim Server login credentials, and enter the new default T4S Content Manager credentials
Follow the Salesforce T4S Server Configuration and Salesforce sObject & Custom object configuration steps, as the UAT Content Manager unique identifiers may differ from the Production Content Manager unique identifiers.