×
Microsoft Graph Files
MS Graph Files

Overview

The Microsoft Graph Files plugin adds the ability to locate drives and manage driveItems, files and folders, within OneDrive and SharePoint.

Functionality

The Security Flow Microsoft Graph Files plugin provides the ability to

  • retrieve a drive by drive ID
  • retrieve the root drive for a group ID, site ID, or user ID/UPN
  • list the drives for a group ID, site ID, or user ID/UPN
  • create a folder within a parent folder in the specified drive ID
  • create a folder within a parent folder in the root drive of the specified group ID, site ID, or user ID/UPN
  • search for driveItems (files or folders) based on a keyword search within the specified drive ID
  • search for driveItems (files or folders) based on a keyword search within the root drive of the specified group ID, site ID, or user ID/UPN
  • retrieve a driveItem (file or folder) based on the supplied path or driveItem ID within the specified drive ID
  • retrieve a driveItem (file or folder) based on the supplied path or driveItem ID within the root drive of the specified group ID, site ID, or user ID/UPN
  • retrieve the children of a driveItem (folder) based on the supplied path or driveItem ID within the specified drive ID
  • retrieve the children of a driveItem (folder) based on the supplied path or driveItem ID within the root drive of the specified group ID, site ID, or user ID/UPN
  • checkout a driveItem (file) based on the supplied driveItem ID within the specified drive ID
  • checkout a driveItem (file) based on the supplied driveItem ID within the root drive of the specified group ID, site ID, or user ID/UPN
  • checkin a driveItem (file) based on the supplied driveItem ID within the specified drive ID
  • checkin a driveItem (file) based on the supplied driveItem ID within the root drive of the specified group ID, site ID, or user ID/UPN
  • download a driveItem’s content (file) based on the supplied path or driveItem ID within the specified drive ID
  • download a driveItem’s content (file) based on the supplied path or driveItem ID within the root drive of the specified group ID, site ID, or user ID/UPN
  • update a driveItem (file) based on the supplied driveItem ID within the specified drive ID
  • update a driveItem (file) based on the supplied driveItem ID within the root drive of the specified group ID, site ID, or user ID/UPN
  • upload file(s) associated with the current message into a driveItem (folder) and, if needed, create the file(s) based on the supplied path within the specified drive ID
  • upload file(s) associated with the current message into a driveItem (folder) and, if needed, create the file(s) based on the supplied path within the root drive of the specified group ID, site ID, or user ID/UPN
  • upload a driveItem’s content (file) and, if needed, create the file based on the supplied path within the specified drive ID
  • upload a driveItem’s content (file) and, if needed, create the file based on the supplied path within the root drive of the specified group ID, site ID, or user ID/UPN

Instance Configuration Parameters

Property
Description

Instance Name

Name for the Microsoft Graph Files plugin instance.


Unique ID

A system-wide unique identifier for this plugin instance used to locate the service.


Authorization (OAuth2)

Application authorization used to access Microsoft Graph Files services. See the Authorizations (OAuth2) Screen for details on configuring an authorization. The set of relevant scopes are Files.Read, Files.Read.All, and Sites.Read.All for read-only requests and Files.ReadWrite, Files.ReadWrite.All, and Sites.ReadWrite.All for read-write requests.

Flow Nodes

This node provides access to the Drive operations within the MS Graph API. See the drive resource type page for the overview of options.
Property
Description

Name

The display name of the node within the flows.


Unique ID

A system-wide unique identifier for this plugin instance used to locate the service.


Action

Configuration option determining the type of operation to perform:

  • Get Drive By ID: Retrieves a drive based on its ID.
  • Get Group Drive: Retrieves the default document library of the specified group ID.
  • Get Site Drive: Retrieves the default document library of the specified site ID.
  • Get User Drive: Retrieves a user’s drive based on the specified user ID or User Principle Name (UPN).
  • List Group’s Drives : Retrieves the list of document libraries associated with a group ID.
  • List Site’s Drives: Retrieves the list of document libraries associated with a site ID.
  • List User’s Drives: Retrieves the list of user’s drives based on the specified user ID or User Principle Name (UPN).

Successful results for an action are placed in msg.payload.msgraphfiles.[uniqueId].response.


Drive ID

A drive’s unique ID string.


Group ID

A group’s unique ID string.


Site ID

A site’s unique ID string.


User (UPN)

A user’s unique ID string or User Principle Name (UPN).


Selected Fields

A comma separated list of fields to retrieve for a drive. The available fields are detailed in the Graph API’s drive resource page.


Size Limit

The maximum number of drives to return from a list action.


Order By

A drive’s field to order results by.


Sort Order

Sort Order determines whether results are sorted in ascending or descending order.

This node provides access to the DriveItem operations within the MS Graph API. See the driveItem resource type page for the overview of options.
Property
Description

Name

The display name of the node within the flows.


Unique ID

A system-wide unique identifier for this plugin instance used to locate the service.


Action

Configuration option determining the type of operation to perform:

  • Checkin DriveItem: Check in a checked out file identified by its driveItem ID within the specified drive ID.
  • Checkin Group DriveItem: Check in a checked out file identified by its driveItem ID in the default document library of the specified group ID.
  • Checkin Site DriveItem: Check in a checked out file identified by its driveItem ID in the default document library of the specified site ID.
  • Checkin User DriveItem: Check in a checked out file identified by its driveItem ID in the default drive of the specified user.
  • Checkout DriveItem: Check out a file identified by its driveItem ID within the specified drive ID.
  • Checkout Group DriveItem: Check out a file identified by its driveItem ID in the default document library of the specified group ID.
  • Checkout Site DriveItem: Check out a file identified by its driveItem ID in the default document library of the specified site ID.
  • Checkout User DriveItem: Check out a file identified by its driveItem ID in the default drive of the specified user.
  • Create Folder: Create a folder within the specified drive ID.
  • Create Group Folder: Create a folder within the default document library of the specified group ID.
  • Create Site Folder: Create a folder within the default document library of the specified site ID.
  • Create User Folder: Create a folder within the default drive of the specified user.
  • Download File by ID: Download a driveItem’s content identified by its ID from within the specified drive ID.
  • Download File by Path: Download a driveItem’s content identified by its path from within the specified drive ID.
  • Download Group File by ID: Download a driveItem’s content identified by its ID from within the default document library of the specified group ID.
  • Download Group File by Path: Download a driveItem’s content identified by its path from within the default document library of the specified group ID.
  • Download Shared File: Download a driveItem’s content by its share URL or share ID.
  • Download Site File by ID: Download a driveItem’s content identified by its ID from within the default document library of the specified site ID.
  • Download Site File by Path: Download a driveItem’s content identified by its path from within the default document library of the specified site ID.
  • Download User File by ID: Download a driveItem’s content identified by its ID from within the default drive of the specified user.
  • Download User File by Path: Download a driveItem’s content identified by its path from within the default drive of the specified user.
  • Get DriveItem by ID: Retrieve a driveItem identified by its ID from within the specified drive ID.
  • Get DriveItem by Path: Retrieve a driveItem identified by its path from within the specified drive ID.
  • Get Group DriveItem by ID: Retrieve a driveItem identified by its ID from within the default document library of the specified group ID.
  • Get Group DriveItem by Path: Retrieve a driveItem identified by its path from within the default document library of the specified group ID.
  • Get Site DriveItem by ID: Retrieve a driveItem identified by its ID from within the default document library of the specified site ID.
  • Get Site DriveItem by Path: Retrieve a driveItem identified by its path from within the default document library of the specified stie ID.
  • Get User DriveItem by ID: Retrieve a driveItem identified by its ID from within the default drive of the specified user.
  • Get User DriveItem by Path: Retrieve a driveItem identified by its path from within the default drive of the specified user.
  • List DriveItem Children by ID: Retrieve the children of a driveItem identified by its ID from within the specified drive ID.
  • List DriveItem Children by Path: Retrieve the children of a driveItem identified by its path from within the specified drive ID.
  • List Group DriveItem Children by ID: Retrieve the children of a driveItem identified by its ID from within the default document library of the specified group ID.
  • List Group DriveItem Children by Path: Retrieve the children of a driveItem identified by its path from within the default document library of the specified group ID.
  • List Site DriveItem Children by ID: Retrieve the children of a driveItem identified by its ID from within the default document library of the specified site ID.
  • List Site DriveItem Children by Path: Retrieve the children of a driveItem identified by its path from within the default document library of the specified site ID.
  • List User DriveItem Children by ID: Retrieve the children of a driveItem identified by its ID from within the default drive of the specified user.
  • List User DriveItem Children by Path: Retrieve the children of a driveItem identified by its path from within the default drive of the specified user.
  • Search DriveItems: Search for driveItems matching a query within the specified drive ID.
  • Search Group DriveItems: Search for driveItems matching a query within the default document library of the specified group ID.
  • Search Site DriveItems: Search for driveItems matching a query within the default document library of the specified site ID.
  • Search User DriveItems: Search for driveItems matching a query within the default drive of the specified user.
  • Update File by ID: Update a driveItem’s properties identified by its ID from within the specified drive ID.
  • Update File by Path: Update a driveItem’s properties identified by its path from within the specified drive ID.
  • Update Group File by ID: Update a driveItem’s properties identified by its ID from within the default document library of the specified group ID.
  • Update Group File by Path: Update a driveItem’s properties identified by its path from within the default document library of the specified group ID.
  • Update Site File by ID: Update a driveItem’s properties identified by its ID from within the default document library of the specified site ID.
  • Update Site File by Path: Update a driveItem’s properties identified by its path from within the default document library of the specified site ID.
  • Update User File by ID: Update a driveItem’s properties identified by its ID from within the default drive of the specified user.
  • Update User File by Path: Update a driveItem’s properties identified by its path from within the default drive of the specified user.
  • Upload Associated File(s) by Path: Uploads file(s) associated with the message into the specified drive ID.
  • Upload Associated File(s) to Group by Path: Uploads file(s) associated with the message into the default document library of the specified group ID.
  • Upload Associated File(s) to Site by Path: Uploads file(s) associated with the message into the default document library of the specified site ID.
  • Upload Associated File(s) to User by Path: Uploads file(s) associated with the message into the default drive of the specified user.
  • Upload File Content by Path: Upload a driveItem’s content identified by its path into the specified drive ID.
  • Upload Group File Content by Path: Upload a driveItem’s content identified by its path into the default document library of the specified group ID.
  • Upload Site File Content by Path: Upload a driveItem’s content identified by its path into the default document library of the specified site ID.
  • Upload User File Content by Path: Upload a driveItem’s content identified by its path into the default drive of the specified user.

Successful results for an action are placed in msg.payload.msgraphfiles.[uniqueId].response.


Drive ID

A drive’s unique ID string.


Group ID

A group’s unique ID string.


Site ID

A site’s unique ID string.


User (UPN)

A user’s unique ID string or User Principle Name (UPN).


Share ID/URL

A share’s unique ID string or URL.


Item ID

A driveItem’s unique ID string.


Item Path

A driveItem’s full path within a drive. The may be either a folder of file. The leading / is optional. This field uses mustache variable substitution from the incoming message to set the value. Visit the Template Engine and Formatters page to learn more.


Parent Folder

A folder driveItem’s full path within a drive. The leading / is optional. This field uses mustache variable substitution from the incoming message to set the value. Visit the Template Engine and Formatters page to learn more.


New Folder Name

The name of the folder to create within the specified Parent Folder. This field uses mustache variable substitution from the incoming message to set the value. Visit the Template Engine and Formatters page to learn more.


Search

A search’s query.


Selected Fields

A comma separated list of fields to retrieve for a driveItem. The available fields are detailed in the Graph API’s driveItem resource type page.


Size Limit

The maximum number of driveItems to return from a list or search action.


Order By

A driveItem’s field to order results by.


Sort Order

Sort Order determines whether results are sorted in ascending or descending order.


Comment

The Checkin action’s comment. This field uses mustache variable substitution from the incoming message to set the value. Visit the Template Engine and Formatters page to learn more.


Check In As

Check In As determines if the document is published after check-in. If specified, the Check In As must evaluate to published.


Download Behavior

Download Behavior determines what to do with the downloaded file. When Download Behavior is set to Associate with Message, the downloaded file is associated with the message and can, for example, be sent as an attachment in an email or viewed in the Incident Timeline. When Download Behavior is set to Add Content to Message, the downloaded file is placed in a Buffer object or String object in the message at the location specified by Download Content Into. The Convert Content value determines if the resultant content is stored as a Buffer object or String object. When Download Behavior is set to Add Content to and Associate with Message, both operations are performed. Possible evaluated values for Download Behavior are add, associate, or addAndAssociate. Invalid Download Behavior values will cause a runtime error.


Download Content Into (when adding content to a message)

Location with the message to place the downloaded driveItem’s file content. This is only used when the Download Behavior is set to Add Content to Message or Add Content to and Associate with Message.


Convert Content

The Convert Content value determines if the downloaded content is stored as a Buffer object or String object. Possible evaluated values for Convert Content are buffer or string-utf8. Invalid values for Convert Content are ignored and a default of buffer is chosen.


Associated File(s) to Upload (e.g. *.csv)

A glob value, e.g. “*.foo”, specifying the associated file names to upload. If left blank, all files associated with the message are uploaded.


Description

The description of the uploaded file.


File Content

If the File Content data is not a Buffer object, the data will be converted to a String and then a Buffer for upload. Maximum uploads are limited to 60 MiB. In practice, this type of in-memory upload should be limited to smaller files.


Conflict Behavior

When creating a new file of folder driveItem, this determines the behavior to take in the case of a name conflict. Conflict Behavior must evaluate to a value of fail, replace, or rename.


Update DriveItem JSON Payload

Updates a DriveItem’s properties based on the API defined in Update DriveItem properties. The sample Update DriveItem JSON Payload renames the specified DriveItem and moves it into the specified payload.newFolderId. This field uses mustache variable substitution from the incoming message to set the value. Visit the Template Engine and Formatters page to learn more.

Nevelex Labs, Main Office

Metro Office Park
2950 Metro Drive, Suite 104
Bloomington, MN 55425
Phone: +1 952-500-8921

©Nevelex Labs, LLC. 2018-2024, All Rights Reserved.

EULA