Skip to main content

Cyware Orchestrate

Microsoft OneDrive

App Vendor: Microsoft

App Category: IT Services

Connector Version: 1.1.0

API Version: v1.0

About App

The Microsoft OneDrive app enables analysts to read, upload, and download files from Microsoft OneDrive.

The Microsoft OneDrive app is configured with the Orchestrate application to perform the following actions:

Action Name

Description

List Groups

This action lists the available groups.

List Drives

This action lists all the available drives for the given group.

List Root Drive Items

This action lists the child items available in a drive.

List Drive Item Children

This action lists the child items of a drive item.

Simple Upload

This action uploads files up to either 4MB or 60MB depending on your environment. It is recommended to try using this action before using complex upload to reduce API calls and avoid API limits.

Download File

This action downloads a file.

Get Drive Item Details

This action retrieves details about a given drive item.

Large File Upload

This action uploads large files that are over 4MB. This action sends your file in 60 MB portions resulting in more API calls than the Simple Upload action. If this action takes longer than 30 minutes, your workflow will fail. The general upper limit for large files is 5 GB depending on your environment and network speeds.

Get Drive Item by Name

This action retrieves a drive item by name. If the Parent ID is specified, it will look in that parent's children for the drive item.

Search for Drive Item

This action queries drive items for the given query text.

Configuration Parameters

The following configuration parameters are required for the Microsoft OneDrive app to communicate with the Microsoft OneDrive enterprise application. The parameters can be configured by creating instances in the app.

Parameter

Description

Field Type

Required/Optional

Comments

Tenant ID

Enter the tenant ID of the Azure instance to connect.

Example:

"09cd25c9-29b3-99ff-b49z-41235465b427"

Text

Required

Client ID

Enter the client ID of the application that will be used to connect to Azure.

Example:

"09cd25c9-29b3-99ff-b49z-41235465b427"

Text

Required

Client Secret

Enter the client secret of the application that will be used to connect to Azure.

Example:

"12345~123245123245abc~abc1234512345abc"

Password

Required

Action: List Groups

This action lists all the available groups. In large organizations with more than 100 groups, the Azure Active Directory app must be used to get all the group IDs.

This action requires one of the following permissions:

  • groupmember.read.all

  • group.read.all

  • directory.read.all

  • group.readwrite.all

  • directory.readwrite.all

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Limit

Enter the limit of the results to be returned.

Integer

Optional

Default value:

100

Example Request

[
    {
        "limit": 100
    }
]
Action: List Drives

This action lists the available drives for the given group based on the group ID.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Group ID

Enter the group ID to retrieve a list of drives.

Example:

"1e33b745-96a7-45a9-bx24-abc67208c69z"

Text

Required

You can retrieve the Group ID using the List Groups action.

Example Request

[
    {
        "group_id": "25ae5600-2b3c-49e7-893d-927e90cbaa4c"
    }
]
Action: List Root Drive Items

This action lists the child items available in a drive based on the Drive ID.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Drive ID

Enter the Drive ID to retrieve the child items.

Example:

"t!5x6lueqh2e-xyzphjeeas3ixzfmhidvirnlwdbrtuhpzvxy7tfchska5-crqnd1y"

Text

Required

You can retrieve the Drive ID using the List Drives action.

Example Request

[
    {
        "drive_id": "b!3Qkcwe8XcEeOuTDbg27wARLAKTAiuc1JuI3VvRjXhaDgvlGYY47iRpFex5VSvGMp"
    }
]
Action: List Drive Item Children

This action lists the child items of a drive item in the root of the drive. This can be used to get the drive items from a top level folder.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Drive ID

Enter the drive ID to retrieve the child items from.

Example:

"t!5x6lueqh2e-xyzphjeeas3ixzfmhidvirnlwdbrtuhpzvxy7tfchska5-crqnd1y"

Text

Required

You can retrieve the Drive ID using the List Drives action.

Item ID

Enter the drive item ID to get the children from.

Example:

"90leq7cbrymigwfdutoihyctxwvazvgks2"

Text

Required

You can retrieve the Item ID using the List Root Drive Items action.

Example Request

[
    {
        "item_id": "01U4XH47VUPKUEJPUVDNBYJF3OQMVGZERG",
        "drive_id": "b!3Qkcwe8XcEeOuTDbg27wARLAKTAiuc1JuI3VvRjXhaDgvlGYY47iRpFex5VSvGMp"
    }
]
Action: Simple Upload

This action uploads files up to either 4MB or 60MB depending on your environment. It is recommended to try this action before you start using any complex uploads to reduce API calls and avoid API limits.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Drive ID

Enter the Drive ID of the target drive to upload to.

Example:

"t!5x6lueqh2e-xyzphjeeas3ixzfmhidvirnlwdbrtuhpzvxy7tfchska5-crqnd1y"

Text

Required

You can retrieve the Drive ID using the List Drives action.

Filename

Enter the local path to the file to upload to OneDrive.

Example:

"/tmp/151eba77-9f8c-45a5-a8d7-d50d7f20def9/csol_file.txt"

Text

Required

Parent ID

Enter the parent ID of the target item to upload to. This is typically a folder.

Example:

"90leq7cbrymigwfdutoihyctxwvazvgks2"

Text

Optional

You can retrieve the Drive ID using the Get Root Drive Items action.

Example Request

[
    {
        "drive_id": "b!3Qkcwe8XcEeOuTDbg27wARLAKTAiuc1JuI3VvRjXhaDgvlGYY47iRpFex5VSvGMp",
        "filename": "/tmp/151eba77-9f8c-45a5-a8d7-d50d7f20def9/csol_file.txt",
        "parent_id": "01U4XH47UK2GH5S34D3NE2Z5PRSOG4R6CR"
    }
]
Action: Download File

This action downloads a file.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Drive ID

Enter the drive ID to retrieve the child items from.

Example:

"t!5x6lueqh2e-xyzphjeeas3ixzfmhidvirnlwdbrtuhpzvxy7tfchska5-crqnd1y"

Text

Required

You can retrieve the Drive ID using the List Drives action.

Item ID

Enter the drive item ID to download.

Example:

"90leq7cbrymigwfdutoihyctxwvazvgks2"

Text

Required

You can retrieve the Item ID using the List Root Drive Items action.

Example Request

[
    {
        "item_id": "01U4XH47TYKZU7LV3OJFDI3ZO3XACY2S2E",
        "drive_id": "b!3Qkcwe8XcEeOuTDbg27wARLAKTAiuc1JuI3VvRjXhaDgvlGYY47iRpFex5VSvGMp"
    }
]
Action: Get Drive Item Details

This action retrieves details about a given drive item.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Drive ID

Enter the Drive ID to retrieve the child items.

Example:

"t!5x6lueqh2e-xyzphjeeas3ixzfmhidvirnlwdbrtuhpzvxy7tfchska5-crqnd1y"

Text

Required

You can retrieve the Drive ID using the List Drives action.

Item ID

Enter the Drive Item ID to download.

Example:

"90leq7cbrymigwfdutoihyctxwvazvgks2"

Text

Required

You can retrieve the Item ID using the List Root Drive Items action.

Example Request

[
    {
        "item_id": "01U4XH47VUPKUEJPUVDNBYJF3OQMVGZERG",
        "drive_id": "b!3Qkcwe8XcEeOuTDbg27wARLAKTAiuc1JuI3VvRjXhaDgvlGYY47iRpFex5VSvGMp"
    }
]
Action: Large File Upload

This action uploads large files that are over 4MB. This action sends your file in 60 MB portions resulting in more API calls than the Simple Upload action. If this action takes longer than 30 minutes, your workflow will fail. The general upper limit for large files is 5 GB depending on your environment and network speeds.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Drive ID

Enter the Drive ID of the target drive to upload.

Example:

"t!5x6lueqh2e-xyzphjeeas3ixzfmhidvirnlwdbrtuhpzvxy7tfchska5-crqnd1y"

Text

Required

You can retrieve the Drive ID using the List Drives action.

Filename

Enter the local path to a file to upload to OneDrive.

Example:

"/tmp/151eba77-9f8c-45a5-a8d7-d50d7f20def9/csol_file.txt"

Text

Required

Parent ID

Enter the parent ID of the target item to upload to. This is typically a folder.

Example:

"90leq7cbrymigwfdutoihyctxwvazvgks2"

Text

Optional

You can retrieve the Parent ID using the Get Root Drive Items action.

Description

Enter the description of the uploaded file. This defaults to 'file uploaded by Orchestrate.'

Text

Optional

Conflict Behavior

Provide the behavior if the file name is already taken.

Example:

"Rename"

Text

Optional

Allowed values:

  • Rename

  • Fail

  • Replace

Default value:

Replace

Example Request

[
    {
        "drive_id": "b!3Qkcwe8XcEeOuTDbg27wARLAKTAiuc1JuI3VvRjXhaDgvlGYY47iRpFex5VSvGMp",
        "filename": "/tmp/151eba77-9f8c-45a5-a8d7-d50d7f20def9/csol_file.txt",
        "parent_id": "01U4XH47UK2GH5S34D3NE2Z5PRSOG4R6CR"
    }
]
Action: Get Drive Item by Name

This action finds a drive item by name. If the parent ID is specified, it will look in that parent's children for the drive item.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Drive ID

Enter the Drive ID of the target drive to upload.

Example:

"t!5x6lueqh2e-xyzphjeeas3ixzfmhidvirnlwdbrtuhpzvxy7tfchska5-crqnd1y"

Text

Required

You can retrieve the Drive ID using the List Drives action.

Drive Item Name

Enter the exact name of the drive item to search.

Example:

"test_file.txt"

Text

Required

Parent ID

Enter the Parent ID of the item. This is typically a folder.

Example:

"90leq7cbrymigwfdutoihyctxwvazvgks2"

Text

Optional

You can retrieve the Parent ID using the Get Root Drive Items action.

Example Request

[
    {
        "drive_id": "b!3Qkcwe8XcEeOuTDbg27wARLAKTAiuc1JuI3VvRjXhaDgvlGYY47iRpFex5VSvGMp",
        "parent_id": "01U4XH47UK2GH5S34D3NE2Z5PRSOG4R6CR",
        "drive_item_name": "sample_file.txt"
    }
]
Action: Search for Drive Item

This action searches for drive items for the given query text.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Drive ID

Enter the drive ID of the target drive.

Example:

"t!5x6LueQH2E-XYZPhjeEaS3iXZFmHIdVIrNLWdBrTuhpZvxY7tfchSKA5-Crqnd1Y"

Text

Required

<div>You can retrieve the Drive ID using the List Drives action.</div>

Query String

Enter the query text to search for items.

Example:

"sample string"

Text

Required

The values may match across several fields including filename, metadata, and file content.

Parent ID

Enter the parent ID of the item.

Example:

"90LEQ7CBRYMIGWFDUTOIHYCTXWVAZVGKS2"

Text

Optional

  • The parent ID will typically be a folder.

  • <div>You can retrieve the Parent ID using the Get Root Drive Items action.</div>
<div></div><div> Example Request </div>
[
   {
      "drive_id":"b!3Qkcwe8XcEeOuTDbg27wARLAKTAiuc1JuI3VvRjXhaDgvlGYY47iRpFex5VSvGMp",
      "query_string":"sample string"
   }
]