Reference

Endpoint Get User Drives


Name

get_user_drives

Description

List all drives which are either shared with you (i.e. via shared files or folders) or you have full access to that drive. [API reference]

Related Tables

UserDrives

Parameters

Parameter Required Options
Name: OrderBy

Label: Order By

Order the specified column by ascending or descending order
Option Value
None
AscendingOrder SomeColumn asc
DescendingOrder SomeColumn desc
Name: SearchCriteria

Label: Search Criteria

Data filter (e.g. somecolumn -eq 'somevalue')
Option Value
None
Equal Search SomeColumn eq 'SomeValue'
Substring Search substringof(SomeField,'abc')
Starts With startswith(SomeField, 'abc')
Name: PageSize

Label: Page Size

The number of records to include in each page of results

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
DriveId DT_WSTR nvarchar(255) 255
DriveName DT_WSTR nvarchar(255) 255
DriveType DT_WSTR nvarchar(255) 255
Description DT_WSTR nvarchar(500) 500
WebUrl DT_WSTR nvarchar(500) 500
CreatedDateTime DT_DBTIMESTAMP datetime
LastModifiedDateTime DT_DBTIMESTAMP datetime
CreatedByByDisplayName DT_WSTR nvarchar(500) 500
LastModifiedByDisplayName DT_WSTR nvarchar(500) 500
LastModifiedByEmail DT_WSTR nvarchar(500) 500
LastModifiedById DT_WSTR nvarchar(500) 500
QuotaDeleted DT_I8 bigint
QuotaRemaining DT_I8 bigint
QuotaTotal DT_I8 bigint
QuotaUsed DT_I8 bigint
QuotaState DT_WSTR nvarchar(50) 50
UserId DT_WSTR nvarchar(255) 255
UserDisplayName DT_WSTR nvarchar(500) 500
UserDescription DT_WSTR nvarchar(4000) 4000
UserBusinessPhones DT_WSTR nvarchar(4000) 4000
UserGivenName DT_WSTR nvarchar(80) 80
UserJobTitle DT_WSTR nvarchar(200) 200
UserMail DT_WSTR nvarchar(200) 200
UserMobilePhone DT_WSTR nvarchar(500) 500
UserOfficeLocation DT_WSTR nvarchar(500) 500
UserPreferredLanguage DT_WSTR nvarchar(100) 100
UserSurName DT_WSTR nvarchar(80) 80
UserPrincipalName DT_WSTR nvarchar(200) 200
UserCreatedDateTime DT_DBTIMESTAMP datetime
UserDeletedDateTime DT_DBTIMESTAMP datetime
If the column you are looking for is missing, consider customizing OneDrive Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

Use OneDrive Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

This Endpoint belongs to the UserDrives table, therefore it is better to use it, instead of accessing the endpoint directly:

API Source - OneDrive
OneDrive Connector can be used to integrate OneDrive and your defined data source, e.g. Microsoft SQL, Oracle, Excel, Power BI, etc. Get, write, delete OneDrive data in a few clicks!
OneDrive
UserDrives
Optional Parameters
DataFormat OData
SSIS API Source - Read from table or endpoint

API Destination

This Endpoint belongs to the UserDrives table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to get user drives:

API Destination - OneDrive
OneDrive Connector can be used to integrate OneDrive and your defined data source, e.g. Microsoft SQL, Oracle, Excel, Power BI, etc. Get, write, delete OneDrive data in a few clicks!
OneDrive
UserDrives
Select
Optional Parameters
DataFormat OData
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Get UserDrives

SELECT * FROM UserDrives

get_user_drives endpoint belongs to UserDrives table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Get UserDrives

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM UserDrives';

EXEC (@MyQuery) AT [LS_TO_ONEDRIVE_IN_GATEWAY];

get_user_drives endpoint belongs to UserDrives table(s), and can therefore be used via those table(s).