Box for Salesforce users may see the error message "Box Explorer Error: Unable to create downscoped token. You may not have access to the resource requested. invalid_resource." when attempting to load Box UI elements in Salesforce Experience cloud.
Root Cause
This error message can occur when using any of the following Box UI Elements Lightning components:
- Content Uploader
- Content Preview
- Content Explorer
- Content Picker
When setting up Box UI Elements in Experience Cloud, you are required to specify the ID of a file or folder for the Lightning component.
If this field is set with the ID of a file or folder that the Box Service Account does not have proper permissions for, an error will occur.
Important: The Box Service Account here refers to the service account configured via the Box Settings tab. This is different from the service account provisioned via the step for authorizing the Grant Client Credentials app.
If the Box Service Account lacks owner or co-owner access to the specified file/folder, it cannot collaborate on that item with the App User. Consequently, the App User will be unable to retrieve a downscoped token for accessing that file/folder through Box UI Elements, resulting in the error.
Resolution
To resolve this error, ensure that you use a file or folder ID that the Box Service Account owns or has co-owner access to, as outlined in the note section of Setting up Box UI Elements in Experience Cloud.