Skip to main content

Sandbox backup shows "Authorization failed" after a sandbox refresh.

This document explains what steps to follow if your sandbox backups stop running

Written by Richard Terry

Why has my data backup stopped working after a sandbox refresh?

In order for Gearset to connect a backup job it uses the Salesforce username shown on the Backup.

If there is an issue authenticating to this user, then you will receive an "Authorization failed" message, as shown below.

Restoring the backup connection

In order to restore the backup, we need to connect the backup back to the the same salesforce username.

To find the user currently set up in your backup, you can check the email address specified on the backup page.

Once you know the name of the backup user, log in to the sandbox and cofirm if the user still exists.

The user still exists in the Sandbox

If this user still exists, then you can open your org connections in Gearset and find the same user in the list.

Once you find the user, open the dropdown and select "re-authorize"
​


Once the connection has been restored, open your Gearset data backups and manually trigger your backup to run again.

The user does not exist in the Sandbox

  1. Re-create the user in the Salesforce sandbox. Make sure the Salesforce username is exactly the same as is shown in the backup.

    1. If you can still see the old org connection, you can open it and "re-authorize" the connection.

    2. If the org connection does not show, select "add new connection" and add the newly created Salesforce account.
      ​
      Once the account has been added as na org connection follow the guidance here to change the org connection of a backup without changing the owner.

  2. Open your Gearset data backups and manually trigger your backup to run again.

Changing the Salesforce user associated with a backup.

In order to transfer the backup to another salesforce user, the new user needs to have the same Salesforce org ID as the current user.
​

This means if your backup is currently failing after a refresh, you need to restore the old connection to update Salesforce org ID, then run the job once before you can change the user.

Once the connection has been restored, Gearset will update the Salesforce ID associated with the backup.

This means you can now follow our standard guidance here in order to change the Salesforce user associated with the backup.


How do I keep my data backup job working the next time I refresh a sandbox?

To make sure your sandbox refreshes work without issue, make sure your backup job is connected to a Salesforce user who stays active in the sandbox after the refresh, with the same username. This is most reliably done with a service user.

Make sure someone who owns that org connection in Gearset is available to re-authorize it once the refresh completes.

Did this answer your question?