FileRelay
Documentation
Try our Sandbox

SharePoint

Forward SAP documents to SharePoint Online document libraries. Supports site resolution, custom libraries, folder paths, and chunked upload.

Use Cases

  • Enterprise document collaboration for SAP data
  • SharePoint-based SAP document workflows
  • Team access to SAP invoices and POs

Store SAP documents in SharePoint Online document libraries. FileRelay uses the Microsoft Graph API to upload files, resolve sites from URLs, and create folders automatically. Authentication is Entra app-only — no user session involved.

Validated against a real tenant with Entra app-only auth (recommended path), including list-field metadata writes.

Setup — app registration

  1. Go to the Azure Portal → Microsoft Entra ID > App registrations → New registration (e.g. "FileRelay SharePoint").
  2. Note the Application (client) ID and Directory (tenant) ID from the Overview page.
  3. Under API permissions → Add a permission > Microsoft Graph > Application permissions, add Sites.ReadWrite.All (or Sites.Selected for least privilege — see below).
  4. Click Grant admin consent (required).
  5. Go to Certificates & secrets → New client secret; copy the value immediately.

Setup — least privilege with Sites.Selected (optional)

Sites.ReadWrite.All grants every site. To scope to one site collection:

  1. Grant Sites.Selected (Application) instead, with admin consent.
  2. Grant the app access to the specific site via Graph (needs the site ID from the error message or a lookup):
    POST https://graph.microsoft.com/v1.0/sites/{site-id}/permissions
    {"roles": ["write"], "grantedToIdentities": [{
      "application": {"id": "{fileRelay-app-client-id}", "displayName": "FileRelay SharePoint"}}]}
    
  3. Use role: read instead of write for read-only destinations.

Configure FileRelay

  1. Add a SharePoint destination: site URL (e.g. https://contoso.sharepoint.com/sites/finance) or site ID, library name (default Documents), optional folder path.
  2. Paste tenant ID, client ID, client secret.
  3. Click Test — FileRelay resolves the site and library, then uploads and deletes a probe file. Saving requires a passing test.

How It Works

FileRelay resolves the SharePoint site from the URL you provide, finds the specified document library (defaults to "Documents"), and uploads files using the Graph API.

For files larger than 4MB, FileRelay automatically uses chunked upload sessions — no configuration needed.

Folder Structure

Documents are uploaded to:

{library}/{folder_path}/{subfolder}/{doc_id}.{ext}

Folders are created automatically if they don't exist.

Permissions

Permission Type Purpose
Sites.ReadWrite.All Application All site collections (simplest)
Sites.Selected Application Named sites only (least privilege, needs the grant above)

Enriched metadata

Enrichment key-values are written to the item's library columns through metadata_mapping (our key → column name). Columns must exist in the library — create them as single-line-of-text columns first. Unmapped keys pass through as column names. A field-update failure is noted on the delivered result; the file itself is already stored.

Troubleshooting

Symptom Cause / fix
401 on Test Secret wrong/expired, or admin consent missing.
403 on Test App lacks the site (Sites.Selected without a grant) or the role hasn't propagated.
Site won't resolve URL misspelt — paste the site ID instead (Graph Explorer: GET /sites/{host}:/{path}).
Metadata note on deliveries A mapped column doesn't exist or is the wrong type — check library settings.

Configuration Fields

FieldTypeRequiredDescription
site_urlstringRequiredSharePoint site URL (e.g. https://contoso.sharepoint.com/sites/finance)
library_namestringOptionalDocument library name (default: Documents)
folder_pathstringOptionalFolder path within the library
metadata_mappingobjectOptionalOur-key → library-column map for enrichment metadata (e.g. {invoice_no: InvoiceNo})

Credentials

FieldTypeRequiredDescription
client_idstringRequiredEntra app (client) ID
client_secretstringRequiredEntra app client secret
tenant_idstringRequiredEntra tenant ID

All credentials are encrypted at rest using envelope encryption.

Ready to set up SharePoint?

Create a free account and add this connector in under 2 minutes.

Get Started Free