SharePoint Online connector
Store in SharePoint, through Microsoft Graph, the email and attachments of each drop.
Important
Example to adapt, not working as is. In this version, the Graph address of the upload session is malformed (.../v1.0/sites{host}/..., without a slash after sites): the folder is created, then the file upload fails. Fix the connector, or move its logic into a handler, and test it before any use.
| Identifier | sharepoint |
| Address | https://<server>/api/webhook/sharepoint |
Settings and secrets
| Where | Key | Effect |
|---|---|---|
Connector:sharepoint |
SiteUrl |
Site address. Only its host name is used: the site path is ignored, and files go to the default library of the root site. |
Connector:sharepoint |
DocumentLibrary |
Read by no code in this version. |
Connectors.sharepoint.Secrets |
TenantId, ClientId, ClientSecret |
Microsoft Entra ID app registration, with a client secret. |
Connectors.sharepoint.Secrets |
PrivateAESKey |
Required, in the <key>_<IV> format: the same as in the SESAR configuration. The template does not provide it at this location. Without it, the connector's initialization fails. |
The app registration needs a Microsoft Graph application permission on files or sites, with an administrator's consent. Choose the most restricted permission that fits, for example Sites.Selected with access granted to the target site only.
What it does
- It obtains a token for Microsoft Graph (
https://graph.microsoft.com/.default), through the client credentials flow. - It creates a folder named after the drop's subject.
- It reads the drop's email (
EmailSent.htmlin the drop's folder on the SESAR server), decrypting it withPrivateAESKeyif needed, then turns it into anEmailSent.emlfile that it uploads. - It decrypts each attachment encrypted by SESAR and uploads it under its original name, in 10 MiB chunks.
- It deletes the decrypted copies.
The connector reads the files at the manifest's paths: the application must run on a machine with access to SESAR's storage.
Limits to fix before use
- The upload session address is malformed.
- Microsoft Graph responses are not checked: the connector answers "Manifest Processed" even if an upload failed.
- Upload chunks overlap by one byte, which compromises files larger than 10 MiB.
- On an exception, the decrypted copies of the email and attachments remain on the SESAR server's disk.
- The site path and
DocumentLibraryare ignored.
Test
POST /api/connectors/sharepoint/test only checks that a token can be obtained, without calling SharePoint.