Setup OAuth on OneDrive for Business

Create your Microsoft Azure OAuth application, configure it for OneDrive access, and integrate with your Filestack application

Create your OneDrive for Business OAuth application

Filestack offers OneDrive for Business as a source in our file pickers. You must first have a Microsoft account that is configured by the admin of Azure Active Directory and an account that has the OneDrive for Business license assigned to access this Azure account.

To utilize Custom Authentication and use of your own Key, please have an admin of the Azure Active Directory and your Filestack account follow these steps:

  1. Login with admin credentials into Microsoft Azure.

  2. Click on Azure Active Directory on the left side of dashboard you wish to use with Filestack (if there is more than one AAD configured, it can be changed on the left side under the username).

    Screenshot showing Microsoft Azure Dashboard

  3. Go to App registrations and choose New application registration.

    Screenshot showing Microsoft Azure App registrations

  4. Fill in your App name and sign-on URL, choose Web app / API as application type and click Create.

    Screenshot showing Microsoft Azure Create

  5. From the list of apps choose your newly created app.

    Screenshot showing Microsoft Azure App registrations

  6. The Application ID will be required to use with your key in the Filestack Developer portal. You will be able to access this ID as long as this Azure Application exists in your account.

    Screenshot showing Microsoft Azure Settings

  7. Click All settings link to show settings tab and choose Properties.

    Screenshot showing Microsoft Azure Settings

  8. Optional Step - Toggle Multi-tenanted option which "Designates whether users in external organizations are allowed to grant your app access to data in their organization's directory. This control affects only the ability to grant access. It does not affect any access that has already been granted."

    Screenshot showing Microsoft Azure Properties

  9. Enter the following URLs into the Reply URLs tab.

    • https://www.filestackapi.com/api/client/onedriveforbusiness/authCallback/saveas
    • https://www.filestackapi.com/api/client/onedriveforbusiness/authCallback/open

    Screenshot showing Microsoft Azure Reply URLs

  10. Select the Required permissions tab and click Add.

    Screenshot showing Microsoft Azure Required permissions

  11. Choose Office 365 Sharepoint Online and click "Select".

    Screenshot showing Microsoft Azure Select an API

    Add these additional scopes to the Office 365 Sharepoint Online scopes:

    • Read items in all site collections
    • Read and write items in all site collection
    • Read user files
    • Read and write user files

    Screenshot showing Microsoft Azure Enable Access

  12. Windows Azure Active Directory will be in your application already, but you will need to add one scope:

    • Sign in and use user profile

    Screenshot showing Microsoft Azure Enable Access

  13. Scroll horizontally back to the Settings tab and click on the Keys. Name your new key and choose an expiration option. Once you click save the key will be displayed. Be sure to copy it because it will disappear after you leave this section.

    Screenshot showing Microsoft Azure Keys

  14. Take the Key from step 13 along with your Application ID from step 6 and add them to the custom auth section in the Filestack Developer Portal.

    Screenshot showing Filestack Developer Portal

Web Picker Config

The relevant source value in our web picker is onedriveforbusiness.

See all supported sources

const options = {
  fromSources: [ 'onedriveforbusiness' ]
};

client.picker(options).open();

If you have any questions about this process please reach out to our support team.