Box for Salesforce users may see the error message "This Box Account is already linked to Salesforce user: {salesforce login address}" when attempting to login via Box User Settings tab:
Root Cause
This error means that the Salesforce user in the error message already associated with the Box account credentials you are trying to login with. You cannot connect one Box account to multiple Salesforce users.
Resolution
To resolve this error, you need to make sure that you are using a different Box account for each Salesforce account.
If you want to clear the existing association between the Salesforce account and the Box account so you can link your new Salesforce account with the Box account, you can do so by using the Salesforce Developer Console and run the deleteUserAssociation method.
Classic UI Steps
- Go to Setup > Administer > Manage Users > Users
- Click on the user in question
- The ID is contained in the URL of the User detail page you are currently on and can be found in the browser address bar.
- Example: For URL "https://na1.salesforce.com/00530000000ibYc," the unique Salesforce User ID is: '00530000000ibYc.' (Salesforce's Reference Article)
- Launch the Developer Console (click on Your Name > Developer Console from the top right of your window)
- Select Debug > Open Execute Anonymous Window
- You can then run box.Toolkit.deleteUserAssociation('SFDC_User_ID');
- Include the single quotes and don't forget the semicolon at the end.
- Have the user login back into Salesforce, go to the Box Settings page, and log into their Box account.
Lightning UI Steps
First, you'll need the Salesforce user ID for your user. To get this:
- Search for the user in the global search bar
- Click the User record under people
- The URL should look similar to https://ap5.lightning.force.com/lightning/r/User/0057F000000ZXitQAG/view?0.source=alohaHeader
- The "0057F000000ZXit" is the 15-character ID and the whole "0057F000000ZXitQAG" is the 18-digit ID.
- The "0057F000000ZXit" is the 15-character ID and the whole "0057F000000ZXitQAG" is the 18-digit ID.
- Note down the value for the user.
- Click the quick access menu ()
- Click Developer Console
- Select Debug > Open Execute Anonymous Window
- You can then run: box.Toolkit.deleteUserAssociation('SFDC_User_ID');
- Include the single quotes and don't forget the semicolon at the end
- If you are running into an 'invalid id' error when executing the script the url may need to be decoded in step 3 before obtaining the User ID.
- Example: URL shows 2F0053Z00000IVYkv as the user id and will produce an error. After decoding Url the user id is 0053Z00000IVYkv and the script runs successfully.