The SharePoint File System Provider extension allows Nucleus to connect to Microsoft SharePoint document libraries and access the files stored within them.
You can browse and manage SharePoint folders and files from within Nucleus, and use SharePoint as a storage location for files used by your website. This allows you to access files already stored in SharePoint without needing to maintain duplicate copies in your Nucleus file system.
In most cases, the SharePoint File System Provider will be used as a secondary file system provider, with one of the other file system providers used as your main file system provider. The SharePoint File System Provider can then be used to access files stored in SharePoint without maintaining duplicate copies in multiple locations. Nucleus can have multiple file system providers configured, and you can choose which provider to use when uploading files to your website.
The SharePoint File System Provider uses the Microsoft Graph API to communicate with SharePoint. Authentication is performed using an application registration in Microsoft Entra ID. This allows Nucleus to access SharePoint without requiring an individual user's credentials.
Navigate to the Microsoft Entra ID portal.
your-site-name".Local Machine/Personal certificate store of your web server.Sites.ReadWrite.All. The Sites.ReadWrite.All application permission provides Nucleus with read and write access to all SharePoint
site collections in your tenant.If you are setting up a new instance of Nucleus, you can add the SharePoint File System Provider from the setup wizard. If you already have an instance
of Nucleus, you will need to edit your appSettings.{environment}.json file.
In your appSettings.{environment}.json file, you will need to add an entry to the Nucleus:FileSystems:Providers section:
Refer to the Nucleus Configuration Reference for information on configuration files.
{
"Key": "my-company-sharepoint",
"Name": "SharePoint",
"ProviderType": "Nucleus.Extensions.SharePointFileSystemProvider.FileSystemProvider,Nucleus.Extensions.SharePointFileSystemProvider",
"TenantId": "your-entra-tenant-id",
"ClientId": "your-app-registration-id",
"ClientSecret": "your-secret"
}
{
"Key": "my-company-sharepoint",
"Name": "SharePoint",
"ProviderType": "Nucleus.Extensions.SharePointFileSystemProvider.FileSystemProvider,Nucleus.Extensions.SharePointFileSystemProvider",
"TenantId": "your-entra-tenant-id",
"ClientId": "your-app-registration-id",
"CertificateFile": "C:\\path\\to\\your\\certificate.pfx"
}
{
"Key": "my-company-sharepoint",
"Name": "SharePoint",
"ProviderType": "Nucleus.Extensions.SharePointFileSystemProvider.FileSystemProvider,Nucleus.Extensions.SharePointFileSystemProvider",
"TenantId": "your-entra-tenant-id",
"ClientId": "your-app-registration-id",
"CertificateFile": "C:\\path\\to\your\\certificate.pfx"
}
{
"Key": "my-company-sharepoint",
"Name": "SharePoint",
"ProviderType": "Nucleus.Extensions.SharePointFileSystemProvider.FileSystemProvider,Nucleus.Extensions.SharePointFileSystemProvider",
"TenantId": "your-entra-tenant-id",
"ClientId": "your-app-registration-id",
"CertificateIdentity": "your-certificate-thumbprint"
}
| Setting | Description |
|---|---|
| TenantId | Your Microsoft Entra ID directory (tenant) ID. You can view this value in the App Registrations - Overview page in the Microsoft Entra ID portal. |
| ClientId | The Application (client) ID for your App Registration. You can view this value in the App Registrations - Overview page. |
| One of: | |
| - ClientSecret | If you are using a client secret, this setting specifies the client secret from your App Registration. |
| - CertificateFile | Loads a certificate from a PFX file. CertificateFile specifies the path and file name of your certificate file, which must be in PFX format. |
| - CertificateIdentity | Specifies a certificate from your Windows certificate store. The certificate can be identified by thumbprint, serial number, subject key identifier or subject name of your certificate, which must be stored in the Local Machine/Personal certificate store. |
| CertificatePassword | This option can be used with the CertificateFile option to specify a password, if your .pfx file is password-protected. |
The SharePoint File System Provider does not support the Site Home Directory property or the RootPath configuration setting.
SharePoint document libraries are identified internally by unique IDs rather than user-friendly paths, so the SharePoint provider cannot use the same home directory and root path conventions as other file system providers.
The download URL provided by the Microsoft Graph API is temporary and expires after a short period. Additionally, SharePoint responds with a Content-Disposition header that instructs browsers to download the file rather than display it inline.
Consequently, the SharePoint File System Provider cannot use these download URLs as permanent direct links to files stored in SharePoint.
Instead, the provider generates URLs that direct requests through the Nucleus File Controller. The controller retrieves the file from SharePoint and streams it to the browser.
This additional processing introduces overhead compared with serving files directly. For this reason, SharePoint should not be used to host frequently accessed resources such as website logos, CSS files or JavaScript files.