Skip to main content

OneDrive File System Provider

  • 2 minutes to read

The OneDrive file system provider (OneDriveFileSystemProvider) allows you to connect ASPxFileManager to OneDrive without user authentication.

Prerequisites

Register your application with Azure Active Directory to get an access token that sets permissions for your application. This also allows your application to use OneDrive APIs to work with the App Folder.

Configure OneDrive Storage

Note

Register your account in Azure and Office365 for Business to configure OneDrive Storage.

  1. Select Azure Active Directory/App registrations and click New application registration.

    One Drive - Register New App

  2. Enter the application’s name, type, and sign-on URL, and click Create.

    One Drive - Application's Name

  3. Click Endpoints to get the Token Endpoint and Authorization Endpoint.

    One Drive - Endpoints

  4. Click Settings to access your application’s settings. Use the “Application ID” field value to specify the clientID parameter for the RegisterOneDrive(String, String, String) method.

    One Drive - Application's Settings

  5. Click Reply URLs to specify URLs to which Azure Active Directory sends the authentication responses.

    One Drive - ReplyURL

  6. Click Required permissions and then click Add to specify permissions for Microsoft Graph.

    One Drive - Required Permissions

  7. Click Keys to create the clientSecret key and then use it as a parameter for the RegisterOneDrive(String, String, String) method.

    One Drive - clientSecret Key

Provider Settings

Set the ASPxFileManager.ProviderType property to FileManagerProviderType.OneDrive to allow the file manager to manage files and folders in OneDrive’s App Folder.

The OneDriveFileSystemProvider class allows you to access the file and folder hierarchy, and manipulate these files in the file manager.

ASPxFileManager_OneDriveFileSystemProvider

Do the following to connect ASPxFileManager to OneDrive:

ASPxFileManager allows you to handle every request to OneDrive (the ASPxFileManager.CloudProviderRequest event).