Troubleshooting Experience Cloud issuesHere are some common issues that can cause errors when setting up sFiles in Experience Cloud.Jul 25, 2024Knowledge
TitleTroubleshooting Experience Cloud issuesURL NameTroubleshooting-Experience-Cloud-issuesArticle BodyPrerequisites Error codes shown below require sFiles version summer '24 (v.1.51) or later installed. Visit sFiles on the AppExchange and click "Get it Now" to update to the latest version. Steps to Troubleshoot For specifics on how to resolve each of these issues, refer to the article: How to set sFiles Enterprise up on Experience Cloud. sFiles stopped working with generic error "Failed to list files" for all users. If all users suddenly lose access to files, it is most likely an authentication error. This commonly happens when the Client Secret expires or the authentication token expires due to inactivity. In order to check for this, put a debug log against an Experience Cloud user, and replicate the error. If in the debug log, under "callout" you see a "StatusCode=401", go to the Named Credential and reauthorize it by clicking Edit, and Save. If this doesn't resolve the issue, try renewing the client secret with a new expiration date. (Article: Updating the Azure Application Shared Secret) If in the debug log, you see a "StatusCode=403", the user that is authenticating with SharePoint does not have access to that specific folder in SharePoint. You will need your Microsoft 365 admin to enable permissions for that user to access the folders in SharePoint.Named Credential is set up incorrectly [SFCL-0106, SFCL-0107]: sFiles relies on the named credential being setup, authenticated and referenced correctly in the SharePoint Object Settings. Confirm the Named Credential's Identity Type is set to "Named Principal", Authentication Status is "Authenticated", and Name is referenced in the SharePoint Object Setting's Named Credential Name field. NOTE: The Named Credential Name field is case sensitive. Ensure the exact value of the Named Credential's Name matches the value in the Named Credential Name field. Folder is not set up [SFCL-0105]: Experience Cloud sFiles does not have the ability to do an initial set up of a SharePoint folder. For the folder to load, ensure that the Salesforce object record has a SharePoint Folder Id associated with it. The easiest way to accomplish this is through the internal Salesforce sFiles UI. This can also be accomplished through a Flow or through sFiles API (setupFolder()).Salesforce Id is bad or missing on the folder or file [SFCL-0102]: sFiles for Experience Cloud relies on Salesforce’s sharing rules to allow Experience Cloud users to view items in SharePoint. This means that all folders or files that the Experience Cloud user needs to see must include a Salesforce Id in one of its SharePoint columns. The easiest way to make sure that all folders and files have the corresponding Salesforce Id attached to it is by using the “Folder Custom Field Default Value” field in the SharePoint Object Settings.Missing or wrong SharePoint Object Settings Key value in sFiles component [SFCL-0101, SPUC-0101, SPUC-0102, SPUC-0106, SPUC-0107]: The sFiles List View and sFiles Uploader components in Experience Cloud must have a valid SharePoint Object Settings Key.Experience Cloud user’s profile missing permissions [SFCL-0110]: Experience Cloud user’s profile must contain permissions to access sFiles apex class (fileforcem1.SharePointUtilsCommunity) as well as the field that contains the SharePoint Folder Id (default is “SharePoint_Folder_Id__c”) on the object.Salesforce Object Id Field and/or Folder Custom Field Default Value fields blank in SharePoint Object Settings [SPUC-0103, SPUC-0108]: In the SharePoint Object Settings (custom metadata type) for the Experience Cloud instance ensure that the fields for Salesforce Object Id Field and Folder Custom Field Default Value field are filled in.Missing Folder Name Field in SharePoint Object Settings [SFCL-0108]: sFiles looks at the SharePoint Object Settings' Folder Name Field to loosely link a folder in SharePoint with a record in Salesforce. If this field is blank in the SharePoint Object Settings, it may cause a failure to load the community list or uploader.ID's are incorrect in SharePoint Object Settings [SFCL-0103, SFCL-0104, SFCL-0109]: sFiles uses the SharePoint Folder Id Field, Document Library Id and Site Id fields to link to the correct SharePoint folder. If these Id's are incorrect or point to the incorrect folder, the component will fail to list the files. Use the sFiles' Id Search Utility to confirm that these Id's are correct.