file2sharepoint

file2sharepoint 0.1.0.4~bullseye

 pool/main/f/file2sharepoint/file2sharepoint_0.1.0.4~bullseye_amd64.deb file2sharepoint
Simple Sharepoint file uploader
Filename pool/main/f/file2sharepoint/file2sharepoint_0.1.0.4~bullseye_amd64.deb
Version0.1.0.4~bullseye
Age in days435
Release date2025 08. 26.
Size1.63 KB
id3506
Namefile2sharepoint
Package
Appname
Essential
Vendor
License
Distributionbullseye
Suitemain
Source
Architecturebinary-amd64
MultiArchforeign
MaintainerVítězslav Dvořák
InstalledSize9
Dependscomposer-debian
PreDepends
Breaks
Enhances
Sectionunknown
Priorityoptional
DescriptionSimple Sharepoint file uploader
LongDescriptionPush your files to Sharepoint from command line
AutoBuiltPackage
Filenamepool/main/f/file2sharepoint/file2sharepoint_0.1.0.4~bullseye_amd64.deb
MD5sumbea468e7e2b646f7b34bfd262a9769d4
SHA130c55d32d2efb2eb055ccabc379569c9bb881b2f
SHA2567efc5c7c556db2a66f2906d938bdcc1726a4f3b76ee28d3805be8a9979fc5e47
SHA5121156c6732fd62218c9b468ece82ef7c3a3ed79b1078fee4b0b019fd9a1c18b9a12020c85d1c64aca62e07979860a585900baf5ea445ca72d2d2733fb7a285c71
Size1664
Auto-Built-Package
Homepagehttps://github.com/VitexSoftware/file2sharepoint
Provides
Existing
fileMtime2025-08-26 21:59:53
created2024-11-28 12:52:56
updated2025-08-26 19:59:53
file2sharepoint
<>

Packaging: deb

File to Sharepoint

Upload local files into sharepoint and print the resulting url to stdout

Requirements

  • php 8.1+

Debian/Ubuntu installation

Please use the .deb packages. The repository is availble:

    echo "deb http://repo.vitexsoftware.com $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
    sudo wget -O /etc/apt/trusted.gpg.d/vitexsoftware.gpg http://repo.vitexsoftware.com/keyring.gpg
    sudo apt update
    sudo apt install file2sharepoint

Setup

Run the interactive wizard to create an Azure App Registration and write a .env file:

    bin/azure-setup-wizard        # writes .env in the project root
    bin/azure-setup-wizard /path/to/.env  # writes to a custom path
    make setup-wizard             # shorthand via Makefile

The wizard will:

  1. Ask for the SharePoint tenant, site, and library/folder.
  2. Let you choose between App registration (Client ID + Secret, recommended for automation) or User credentials (Username + Password).
  3. For App registration it optionally uses the Azure CLI to create the app, assign the Microsoft Graph Sites.Selected application permission, grant the app access to the target site, and generate a client secret automatically.
  4. Write the resulting credentials to the .env file (mode 600).

Required Azure permission for client-credentials mode
Resource: Microsoft Graph (00000003-0000-0000-c000-000000000000)
Application role: Sites.Selected
Admin consent must be granted by a Global Administrator, and the app must additionally be granted access to the specific site via POST /sites/{siteId}/permissions (the wizard does this automatically).

Client-credentials auth authenticates via the modern Entra ID v2 client_credentials flow, not the legacy SharePoint "App-Only via Azure ACS" flow (AllSites.Write under the classic SharePoint API resource 00000003-0000-0ff1-ce00-000000000000) — Microsoft fully retired ACS for all tenants on 2026-04-02, with no extension possible (details). Confirmed empirically: ACS still issues a syntactically valid token, but SharePoint Online now rejects it on the real REST call regardless of credential correctness.

Usage

file2sharepoint <source/files/path/.> <Sharepoint/dest/folder/path/> [/path/to/config/.env]

Configuration

Login based auth

OFFICE365_USERNAME=me@company.tld
OFFICE365_PASSWORD=xxxxxxxxxxxxxx

ClientID based auth

OFFICE365_CLIENTID=78842b49-651d-516e-0f2g-f979956aa620
OFFICE365_CLSECRET=8FR8Q~3Rab4-5o8dVd~1vDRId9oYiqEtMJB.Ucb2

Destination options

OFFICE365_TENANT=yourcompany
OFFICE365_SITE=YourSite
SHAREPOINT_LIBRARY='Shared documents/files'

Into configuration file .env please put ClientID OR Login/Password values.

Exit Codes

This application uses the following exit codes:

  • 0: Success
  • 1: General error