Building Apps with Jigx
...
Data
Data Providers

Microsoft OneDrive

6min

Microsoft OneDrive connects you to all your files by storing and protecting your files, sharing them with others, and getting to them from all your devices. app solutions integrate with OneDrive allowing you to interact with your existing files or add new files. No files are stored in the Jigx cloud as they are routed to OneDrive.

Authorization requirements

A Graph OAuth token is required for a solution to integrate with OneDrive. Set the Graph OAuth token in the Credentials tab in . The Graph OAuth token must have the following permissions:

  • Files.ReadWrite.All (My Files)
  • Sites.ReadWrite.All (Shared Folders)

The Shared folder operations rely on permissions granted by the person who shared the folder.

Integration support includes:

  • Folder sync - syncs metadata and not file contents
  • Location paths - shared and my files (root)
  • Methods - create, update, save, delete, and download
  • Download to documents folder (private to app) - depends on the device's operating system. See device storage location for the exact location

Specifying the file path

When working with the OneDrive data provider use entity to specify the file path, for example, entity: myfiles/Finance/Invoices. The specified file path with the folders must already exist in OneDrive.

There are two supported base entities myfiles and shared.

  1. entity: myfiles, and myfiles with additional paths e.g. entity: myfiles/Finance/Invoices
  2. entity: shared/path, a shared entity always requires a path e.g. entity: shared/HR/Global/Forms

Supported methods:

  • Create
  • Update
  • Save - Using the method: save will create a new file if the filename does not exist, otherwise, the save will function as an update method.
  • Delete
  • List
  • Download

Properties :

  • file - reference the physical file
  • fileName - add the file name with the extension, e.g. Invoice.pdf
  • tokenType - OAuth token credentials name
  • method - the CRUD method to use

Examples and code snippets

The following examples with code snippets are provided