Upload Files from Scriptcase to Sharepoint

Hi everyone,

I’m working on a ScriptCase application where users need to upload travel documents (PDFs, images, etc.) via a form. The files should be:

  1. Uploaded to a SharePoint Online folder (via REST API).
  2. File references (URLs/metadata) stored in a MySQL database for tracking.

What I’ve Done So Far

  • Created a SharePoint “Travel Files” folder with proper permissions.
  • Registered an Azure AD app with Sites.ReadWrite.All permissions.
  • Set up a MySQL table to store file metadata (e.g., file_name, sharepoint_url, uploaded_by).

Where I Need Help

  1. ScriptCase Implementation:
  • How to properly integrate the SharePoint REST API upload in ScriptCase’s PHP code (using curl).
  • Best way to handle authentication (Azure AD tokens) securely.
  1. Database Design:
  • Should I store the SharePoint file URL, ID, or another reference?
  • Any recommended schema optimizations?
1 Like

i had to implement something similar years ago.

i ended up using rclone on the linux sc server to mount the sharepoint share: rclone mount

that way, as far as sc\php are concerned, files are managed as if they were on the local filesystem

Hello
For now, I only use this API integration to read a Sharepoint document and process its information in the application.
The user needs to config the api in the application, something like this


The secret is stored encrypted.
Then, this information is used to connect to sharepoint and read, download and process the document.
regards.