24Files Manual

Table of Contents


What is 24Files?

24Files is a SharePoint-Salesforce connector, that enables teams to communicate with as well internal partners as external ones. In order to enhance the collaboration, reduce the throughput time and become a central document library.

How does 24Files works?

First of all, check out this page for more detailed information: How does 24Files works

Secondly, more from a technical point of view:

  • 24Files is only available for Salesforce lightning, as we use a lightning component. 
  • 24Files will create a folder structure in SharePoint from the moment the Lightning component gets loaded on the object record.
  • From the moment the folder structure is created in SharePoint, it is possible to manage files & folders from both sides (bi-directionaly sync). 
  • The following is related to Folder structures. More information can be found in the Folder Structure section: Upon loading the 24Files component on an object record page for the first time, 24Files first searches for ‘Not-default folder structures‘ and if no ‘Not-default folder structures‘ are applicable or found, it will search for a ‘Default folder structure‘ for that object. If no ‘Default folder structure’ exists for that object, it will create a ‘Default folder structure‘.

24Files objects in Salesforce

24Files creates 6 custom objects in your org. Here follows the description of those objects:

24Files Settings
General settings & set-up of the connection between Salesforce and Sharepoint. 

24Files Folder Structure
This object enables you to create folder structures. It stores the folder structures created and fields such as ‘default’, the object, the filter logic, the record folder path etc. 

24Files Object Configurations
Here you can configure where when want to save the folder structures, files etc. in Sharepoint. You can select which certain record types of the object you want to store in which Sharepoint sites and which document libraries etc.

24Files 360 View
This represents the relationship between objects. First of all you need to create a new record with populated parent object, child object and a lookup field name which relates one object to another one. And then you will be able to see files from related records on the component.

24Files Error Logs
If something went wrong with 24Files, the errors and more information about the errors get logged in this object. 

Check Permissions
If you are experiencing permissions issues with the set-up, with this tool you can double check if certain users have enough acces to configure the set-up of 24Files. 

Before configuration

Set up your domain

Be sure that a domain is set up, before starting with the configuration of 24Files. 

From Salesforce, go to Setup, enter ‘My Domain‘.
Follow the guidelines from Salesforce until the domain is deployed to your users. This can take some minutes.

Remote Site Setting

Create a Remote Site.

From Setup, enter Remote Site Setting in the search bar.

  • Add a Site Name and add the URL to your Sharepoint.
  • Select the Active checkbox

See the Example below. 

remote site setting


SharePoint Add-In Creation

If you have not installed 24Files yet, please do so for ALL USERS.

If 24Files is installed, you will now create the ‘add-in’ to SharePoint. In other words, you will now create the connection between SharePoint and Salesforce. 

Important Note: This can only be done by the administrator of SharePoint.

Step 1: Generate Client ID & Client Secret

First, replace ‘yourinstance’ in the link below with your own SharePoint company name, this way you will be directed to the correct page.

  1. Generate a Client ID & Client Secret, by clicking on the “Generate” buttons. 
  2. Add a Title for the Add-In. You can Use SharePoint, Office365, 24Files etc. 
  3. For the App Domain & Redirect URL go back to Salesforce to the 24Files Manager (search for it in the app launcher), then click on 24Files Settings. There you will find a Redirect URL for the add-in creation.
  4. For the  App Domain, copy the part after “https://”  & before “/apex” of the Redirect URL and paste it. The Redirect URL below will be the full link. 
  5. Click on create, but do not close this window. You will need the Client ID & Client Secret later on.

1. Generate the Client ID & Client Secret
2. Add the Title


3. Go to 24Files Settings for the redirect URL


4. Select a part of the Redirect URL for the App Domain

FINAL Complete Add-in:

Step 2: Permission Requests

First, replace ‘yourinstance’ in the link below with your own SharePoint company name, Replace ‘yourinstance’  in the link below with your own SharePoint company name, this way you will be directed to the correct page.

  1. In the App Id (= Client ID) field, paste the Client ID that you have created in the link before.
  2. Click on ‘Look up‘ and all the other fields will be filled in.
  3. Copy paste the permissions below into the Permission Request XML field:
    <AppPermissionRequests AllowAppOnlyPolicy="true">
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Write" />
    <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="Write" />


Click Create and then click Trust it when the “Do you trust Office 365?” question pops up.

Step 3: Finalise Add-in Creation

Go via the AppLauncher to the 24Files Manager, then to 24Files settings tab. 

Here you will first have to enter the Company name in SharePoint, then Client ID & Client Secret. 

  1. Company Name in SharePoint: you can see this in the URL of SharePoint. The part between “https://” and “” is your company name. (If you’re an admin, exclude the -admin part as well).
  2. Client ID: You need to copy this from the Add-In in the previous step.
  3. Client Secret: You need to copy this from the Add-In in the previous step.
  4. Click Connect
  5. Does there appear a pop-up with the message: “‘Follow the connection instructions in the installation manual: ‘Powershell connection’.” ?
Optional Step: Powershell Connection

If you receive a warning after connecting to SharePoint: “Follow the connection instructions in the installation manual: ‘Powershell connection.”, you have to execute the following:
  1. Install extension for PowerShell (
  2. A. Add the following command:
    Connect-SPOService -Url (replace yourinstance with your SharePoint instance name)
    B. Login with the admin username and password.
    If a new line shows in the command, the login succeeded.
  3. Add the following command to the Powershell:
    set-spotenant -DisableCustomAppAuthentication $false
    And Enter.

2. Example of command

3. Example of command

Step 4: Login to Sharepoint

After connecting (and perhaps the Powershell connection), you will have to login to SharePoint via the blue button.

Then Trust Office365.

After that, you will be redirected back to Salesforce. And the blue button is replaced with the SharePoint site picker.  

The initial set-up of 24Files is now finished and your connection between Salesforce & Sharepoint has been established, hooray! 


24Files Manager Configuration

24Files Settings

Default Sharepoint Site:

  • Type and search for the Sharepoint Site that you want to store the files in, if no object specific configuration exists in the tab “24Files Object Configuration”. The loading may take a few seconds. (It’s important to state that you should select a site from the pick list.)
  • Click save
  • Next to that, you can select the appropriate document library. 

Default user credentials for search:

  • This is a functionality used for communities. To give anonymous community users the ability to search for Sharepoint files from 24Files, they need a set of Sharepoint rights to be able to do so. With this functionality you can choose the permissions set from a certain user for this. 
Object Configuration
What is the object configuration?

The object configuration gives you the possibility to set-up where you want to store your files & folder structure. You can choose from multiple Sharepoint site, on its turn choose a document library. There are also some extra features like automatic file upload and metadata mapping, which we will explain in a minute. 

Object configuration


A. Folders & Files Storage Location

  • Object: Choose the object for which you want to set-up the configuration.
  • Record: You can also make different configurations for certain record types of an object. Here you can choose a certain record type or just choose all. 
  • Sharepoint Site: Here you can select in which Sharepoint site you want to store the files & folders for this object.
  • Document Library: You can choose a document library of your Sharepoint site as well.

B. Enable Automatic File Upload

This section contains:

  • Enable Automatic File Upload: If you are still using the native Salesforce Files or Attachments component on this object, you can choose to automatically upload these files from Salesforce to Sharepoint via 24Files by enabling this feature.
  • Delete After Upload: By enabling the “delete after upload” feature, the file will automatically be deleted from the Salesforce files & attachments after uploading it to Sharepoint via 24Files.

C. Metadata Field Mappin

 With this functionality you can sync metadata between Salesforce and Sharepoint. By selecting certain fields of your object record, you can map the values to certain Sharepoint fields and vice versa. By clicking “New” you can add extra field mappings.
Folder Structure
What is a folder structure?

A folder structure is the way folders are organised in your SharePoint. This is differs for each company. 

Below, you will receive more information on how you can specify these folder structures to your needs. 


Folder structure VS Folder structure record
Folder structure = this is the way folders are organised in your SharePoint
Folder structure record (FSR from here) = the Salesforce record where you will enter all the specifics for the folder structure that will be created in SharePoint. Each time you will create an object record in Salesforce containing all information about the folder structure. 

Default folder structure record
This is your last resort & back-up plan, concerning the folder structures. This is a folder structure record (FSR) that is automatically created by 24Files or can be created by yourself. 

This ‘Default folder structure record‘ will be used, when no ‘Not-default folder structure records‘ are applicable. 

Not-default folder structure record
Not-default folder structure records are records that contain filter rules. 

Logic of 24Files:
Upon loading the 24Files component on an object record page for the first time, 24Files first searches for ‘Not-default folder structures‘ and if no ‘Not-default folder structures‘ are applicable or found, it will search for a ‘Default folder structure‘ for that object. If no ‘Default folder structure’ exists for that object, it will create a ‘Default folder structure‘.

Filter rules
Filter rules determine the folder structure record (FSR) that will be applied to a certain Object Record.

Important: once the 24Files component gets loaded on the object record, a folder structure will be created in SharePoint. From then on, the folder structure is fixed and can only be changed by manual changes (such as folder movement, renaming etc). In other words, filter rules will no longer have an impact on the object record nor will changes that happen on the Object Record change the Folder Structure Record. 

24Files Folder Structure Configuration

First will create a new folder structure record by clicking on “new”. We can give our Folder structure a name, choose for which object we want to make the folder and define if we want this structure to be the default one for this object.

Now, we will deep-dive in the Folder Structure Record (FSR) and discuss what is possible. After this, we will guide you through the process of creating a Folder Structure Record. 

A. Detail Section
This section contains:

  • 24Files Folder Structure Name: The name of the Folder Structure record
  • Object: Via a picklist, you can select the Salesforce object for that Folder Structure record.
  • Default: When selected, that Folder Structure is the default one. There can only be one default Folder Structure per object!
    When there is no ‘Default Folder Structure‘, 24Files will create a Default Folder Structure, namely: Document Library –> [Object name] –> Record folder –> Public folder 

B. Filter Rules

Filter rules can only be used for ‘Not-default folder structures‘. 

  • Conditions: 3 options, All of the conditions (= rules) should be fulfilled (AND) or Any of the conditions should be fulfilled (OR) or you can customise the logic (for example 1 AND (2 OR 3)). 
  • Field: The corresponding field for that object. You can select a field by clicking on the field and a pop-up screen will appear.
  • Operator: an operator such as ‘Equals’, ‘Starts with’, ‘Contains’ etc can be used
    •  ! If you use ‘Is Null’: enter ‘true’ or ‘false’ as values
  • Type: The field type: ‘Field reference’, ‘Picklist’ or ‘Boolean’.
  • Value: The corresponding value.
    • ! Case sensitive! 
    • ! For fields with date type, use this format: dd/mm/yyyy, for datetime: dd/mm/yyy hh:mm:ss

Important: once the 24Files component gets loaded on the object record, a folder structure will be created in SharePoint. From then on, the folder structure is fixed and can only be changed by manual changes (such as folder movement, renaming etc). In other words, filter rules will no longer have an impact on the object record nor will changes that happen on the Object Record change the Folder Structure Record. 

C. Folder Structure

A folder structure always start with the ‘Document Library’. This is the ‘Document Library’ that you’ve chosen in the 24Files Settings. After this, you are able to create the folders yourself. 

To add folders, you have to click on the dropdown sign and click on ‘Create a subfolder’. Then, a subfolder will be created on the level below the folder you’ve selected. You can rename and remove a subfolder. 

To save the folder structure, a Record Folder is required. A record folder can be added by ‘Creating a subfolder’ and then selecting the ‘Is Record Folder’ checkbox. You do not have the name the record folder right there. See below how to choose the name for the Folder Record. Important: Only one record folder can be present. 

You also need to create a Public folder. This public folder is important for the ‘Anonymous Access’. This folder will be the only folder visible for Anonymous Access users of 24Files (= user without SharePoint login). You can find more information below in the ‘Sharepoint plugin in Salesforce’ section. 

D. Dynamic Folder Structure & Naming

You also have the possibility to dynamically name your folders with record values. After saving your folder structure first, you can edit certain folders and add dynamic record values to them by clicking on the brackets ” { } ” on the right side of the folder name. This you will be able to insert certain record values into the folder naming automatically.. For example if you want to add the name and record ID of the lead in the lead folder structure, you can add this values the folder structure naming. 

This will also give you the possibility to map your folders dynamically together. Since 24Files maps the same folder names together. In the Lead Object example this can be as follows:

– You create a sub folder under document library

– You edit the name of the subfolder with a dynamic tag, let’s say Company. 

– Under this company folder you can now place the record folder. 

By doing this, all record folders of leads within the same company, will be stored in the same company folder. 


Remark: if no value is found for a field, null will appear instead for that field. For example: if the Folder Record Name is: {!Name} {!Description} and no value is in the field ‘Description’, the record will be named like this: “Mosaic-Sx null”. 

What if two or multiple Folder Structures Records (FSR) fit for one record?

The first time a user visits the Object Record, a pop-up will appear to give you a choice between the ‘Not-default folder structure records’. Reminder: A ‘Default FSR’ is a back-up plan.

Once a folder structure is chosen, it will not be possible to change it again.

If no Folder Structure is selected, the following error will appear: “There is no selected folder structure”. This can be resolved be refreshing the page and the pop-up will appear again. 


E. Default folder structure

By default, 24Files will create a ‘default folder structure record (FSR), if you don’t create a ‘default folder structure record‘ yourself.
Main reason: having a back-up plan if no ‘Not-default folder structure‘ (= folder structure record with filter rules) is applicable.

You can customise a ‘default folder structure record to your needs or accept the default setup, which is Document Library –> [Object Name] –> [Record Folder name]


A ‘Default folder structure record’ is always needed. I don’t need a customised folder structure, so I don’t have to create a folder structure myself.24Files will create one, from the moment the lightning component of 24Files gets added to the page (see below)

Imagine that I wanted a specific folder structure for the ‘default FSR’. Then I go to the Folder Structure tab, click on ‘New’ (1), enter a name for the FSR, select the checkbox and then select the right object. From there, I can customise the name and the folder structure itself (2). 

(1) After clicking on NEW, you get this screen

(2) Then you will receive this.

After the creation of the ‘Default FSR‘, a ‘Not-default FSR‘ can be created, but is not obligated. 


Link existing Sharepoint folders to 24Files

You have already folder present in SharePoint that you want to use?

No problem! You only have to create a subfolder with the exact same name and 24Files will figure it out.

We have 2 product families, the Receivers and the Antennas. We have a separate folder in SharePoint and we are creating a folder structure for the Receivers

The only thing we have to do in Salesforce, is create a subfolder named ‘Receivers’. 

The result wil be as follows:

24Files Lightning component

As final step of the 24Files configuration, the lightning component needs to be added to a lightning page. 

  1. Go to the Object where you want to use 24Files.
  2. Then go into a record.
  3. After that, click on Settings & Edit Page. 
  4. Select in Lightning Components under Custom – Managed the 24Files lightning component. 
  5. Drop it onto a page
Functionalities of the lightning component

The lightning component can be modified on object record level.

Parent Record
It is possible to show files from the parent object. In this field you will have to fill in the ‘Field Name’ of that parent object. 
Example: On the contact page, you want to see all files related to the company of that contact (= Account). All files & folders of the Account will be shown and you will be able to perform all folder & file actions. The bi-directional sync will work here. 

Field Name of parent record (Account) of Contact object is ‘AccountId’

This needs to be filled in the ‘Parent Record’ field.

Access: Authenticated & Anonymous

Everything a salesforce user does, will be tracked and assigned to this user. You need to login to Sharepoint via the component to have access.

Authenticated access includes that a user is able to upload, download, preview, rename, move and delete a file and create a new folder.
This user will be able to view the Sharepoint folders and documents (according to their permissions) within the 24Files component 

It’s possible to upload a file, without having credentials to SharePoint, so user won’t able to login via the 24Files lightning component. 

Anonymous access includes that a user is able to upload, download and preview the file he uploaded, but you can enable the delete, rename and move functionality on component level, below the Access picklist. 

No license Error Text
If you bought the user based version of 24Files. You can customise the error text that has to appear when a user has no license assigned. 

Add to mobile view - Salesforce Application

To use 24Files on the Salesforce application, you only have to activate this on the Object Record Page

  1. Click on the settings page, then ‘Edit page’
  2. Click ‘Activation’
  3. Set as default for ‘Phone’

To be sure: double check via the Phone preview, if the 24Files lightning component is added.

Chatter Functionality

In chatter, enter a ‘/’ and you can ‘tag’ a SharePoint file. 

User configuration


Assign the right permission set to the right user, namely ’24Files user’ or ’24Files Admin’.

24Files user
This is the common user of 24Files. This user will only need the necessary and does need the rights to change Folder Structure Records.

All these permissions are needed because records have different owners. In order for 24Files to modify the records, the ‘Modify all permission’ is needed.

For every profile, make sure to add all the required fields permissions. It’s possible that if not all necessary field permissions are given, the following error message will appear: “Not enough access to 24Files [XXX] object”.
Go to ‘Profiles’ –> Field-Level Security –> In the Custom Field-Level Security section, you will find the 24Files objects –> Click View

24Files Admin

This is the permission set for the System Administrator. That’s why we recommend the following settings. 

License Assignment

This section is only applicable for a version installed in Production. & when using the user-based version of 24Files. When having a trial, you won’t need to assign licenses as you are using the enterprise edition. 

When a user wants to manage SharePoint files & folders through the 24Files component, a license of 24Files is needed. 

This is how you do it:

  1. From Installed Packages, you select ‘Manage Licenses’ for the 24Files app. 
  2. On this screen, you will be able to add and remove users. Next to this, other information concerning your license for 24Files is displayed. 

Application Maintenance

Refresh Client ID & Client Secret

Each year, the Client ID & Client Secret (created through the add-in) need to be refreshed in order to secure the connection between Salesforce & SharePoint.

To refresh this, you have 2 options:

Recreate the Add-in by following the steps above.
by following the next steps in the Powershell:

  1. Run the Powershell on your windows computer
  2. Once opened, you need to log in into your environment. Execute the following command and you will get a prompt to enter your credentials (picture A):
  3. A pop-up will appear that directs you to the Microsoft login page.
  4. Enter your credentials.
  5. If you are logged in successfully, you will receive no message in the powershell
  6. Copy the next script and paste into the PowerShell (picture B). Press enter:
    $clientId = ‘<enter existing clientID>
    $bytes = New-Object Byte[] 32

    $rand = [System.Security.Cryptography.RandomNumberGenerator]::Create()
    $newClientSecret = [System.Convert]::ToBase64String($bytes)
    $dtStart = [System.DateTime]::Now
    $dtEnd = $dtStart.AddYears(1)
    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Symmetric -Usage Sign -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Symmetric -Usage Verify -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Password -Usage Verify -Value $newClientSecret -StartDate $dtStart -EndDate $dtEnd
  7. You will receive refreshed Client Secret which you can use in the 24Files app (picture C).

Picture A

Picture B

Picture C


Please find the most common issues here: FAQ Page

If the answer you are looking for, is not on the FAQ Page. Please contact support.

24Files Demo Video

Still looking for more answers?
Or did an error occur?