OneDrive365 Adapter
Provides access to OneDrive (Business) drives and files using SQL Server and REST commands.
This adapter requires advanced configuration with Azure AD and OAuth Configuration
OAuth Configuration
This adapter requires Azure AD and OAuth to be configured.
show steps-
Register an Application in Azure AD
Register an application in your Azure Active Directory environment. This will automatically generate an Application ID. Also, note your TenantID in which the application has been created. -
Find the Application Secret
In the Azure AD Portal, locate the application secret (found under Certificates and Secrets). -
Assign all necessary rights
In the Azure AD portal, assign all Drive related Microsoft Graph rights Application Permissions) and click to Grant Admin Consent. -
In Enzo Manager, create a Config Setting
Create a new Configuration Setting for OneDrive365 and save the secrets obtained above, along with the Tenant ID.
Access Tokens are automatically created and refreshed when needed; to view the access tokens currently in use, use the ListTokens handler. These tokens can also be manually refreshed by calling the RefreshTokens handler.
Configuration Settings
Name | Description | Default |
---|---|---|
Boolean _isDefault | Make this the default configuration. Defaults to true if configName is already the default. | |
String tenantId | TenantId used for authentication | |
String appId | AppId used for authentication | |
String clientSecret | Client secret used for authentication | |
String defaultUserId | The default userId to use if not provided when required |
Handlers
createFolder
folders |
Create new folder
details
Arguments
SQL CallEXEC OneDrive365.createFolder @folderName='Test Folder' Http Call/bsc/onedrive365/createfolder Output ColumnsThis call does not return data. |
||||||||||||||||||||||||||||||||||||||||||||
deleteFile
files |
Delete a file
details
Arguments
SQL CallEXEC OneDrive365.deleteFile @fileId='fileid' Http Call/bsc/onedrive365/deletefile Output ColumnsThis call does not return data. |
||||||||||||||||||||||||||||||||||||||||||||
deleteFolder
folders |
Delete a folder
details
Arguments
SQL CallEXEC OneDrive365.deleteFolder @fileId='fileId' Http Call/bsc/onedrive365/deletefolder Output ColumnsThis call does not return data. |
||||||||||||||||||||||||||||||||||||||||||||
downloadFile
file |
Download a file to a local or UNC path
details
Arguments
SQL CallEXEC OneDrive365.downloadFile @id='fileId',@downloadPath='D:\download' Http Call/bsc/onedrive365/downloadfile Output Columns
|
||||||||||||||||||||||||||||||||||||||||||||
listDrive
drive |
Returns the list of drives
details
Arguments
SQL Callexec OneDrive365.listDrive @userId='userid' Http Call/bsc/onedrive365/listdrive Output Columns
|
||||||||||||||||||||||||||||||||||||||||||||
listFiles
files |
Returns the list of files/folders that belong to a user drive
details
Arguments
SQL Callexec OneDrive365.listFiles 'driveid' Http Call/bsc/onedrive365/listfiles Output Columns
|
||||||||||||||||||||||||||||||||||||||||||||
ListTokens
Tokens |
Returns the list of available tokens (requires administrative access to view all tokens)
details
ArgumentsSQL Callexec OneDrive365.ListTokens Http Call/bsc/onedrive365/listtokens Output Columns
|
||||||||||||||||||||||||||||||||||||||||||||
listUsers
users |
Returns the list of users
details
ArgumentsSQL Callexec OneDrive365.listUsers Http Call/bsc/onedrive365/listusers Output Columns
|
||||||||||||||||||||||||||||||||||||||||||||
RefreshToken
|
Forces the creation of a new access token for the current logged in user
details
ArgumentsSQL Callexec OneDrive365.RefreshToken Http Call/bsc/onedrive365/refreshtoken Output Columns
|
||||||||||||||||||||||||||||||||||||||||||||
renameFile
files |
Rename an existing file
details
Arguments
SQL CallEXEC OneDrive365.renameFile @fileName='testFile.doc',@id='fileId' Http Call/bsc/onedrive365/renamefile Output ColumnsThis call does not return data. |
||||||||||||||||||||||||||||||||||||||||||||
renameFolder
folders |
Rename an existing folder
details
Arguments
SQL CallEXEC OneDrive365.renameFolder @fileName='test folder',@id='folderid' Http Call/bsc/onedrive365/renamefolder Output ColumnsThis call does not return data. |
||||||||||||||||||||||||||||||||||||||||||||
uploadFile
file |
Upload a file to OneDrive
details
Arguments
SQL CallEXEC OneDrive365.uploadFile @sourceFile='D:\Download\A100.pdf', @fileName='A100.pdf' Http Call/bsc/onedrive365/uploadfile Output ColumnsThis call does not return data. |