Upload File

Upload a file to OneDrive.

Options

Field Definition Type Required
Source

Choose a source:

  • My Drive: authenticated user's OneDrive.
  • Drive ID: a specified drive by the drive's unique ID.
  • Group ID: a specified group's document library for a group by the group's unique ID.
  • User ID: a specified user by the user's unique ID.
Dropdown TRUE

Input

Field Definition Type Required
Drive      
Drive ID

Unique ID for the drive requested.

Appears when Drive ID is selected from the Source option.

String FALSE
Group      
Group ID

Unique ID for the group which owns the document library.

Appears when Group ID is selected from the Source option.

String FALSE
User      
User ID

Unique ID for the user object who owns the drive item.

Appears when User ID is selected from the Source option.

String FALSE
File      
Parent Folder ID Unique ID of the parent folder where the file is uploaded. String TRUE
File Name Name of the file. The uploaded file will contain the specified name. The name must include the extension of the file type.

For example, fileName.jpg.

String TRUE
File Content Unique ID associated with the file content. Object TRUE
Description Provides a user-visible description of the file. String FALSE
Caution

A file must be at least 1 byte in size, but cannot be larger than 2 GB. See Workflows system limits.

Only files that are already stored in the Workflows platform file system can be uploaded. Local files cannot be uploaded to OneDrive using this action card.

Output

Field Definition Type
File Name Name of the file. String
File ID Unique ID of the file. String

Additional information

  • If the naming of the uploaded file conflicts with an existing file, the existing file will be replaced by the upload file.

  • When uploading a file from a group, the user must be part of the group.

  • Admins can upload files that are in another OneDrive drive or group. In addition, admins can upload files for another user. Files created by the admin are shown as created by the admin.

Related topics

OneDrive connector

About the elements of Okta Workflows

Microsoft Graph API documentation