{% extends "base.html" %} {% block title %}OneDrive Setup{% endblock %} {% block content %}

OneDrive Integration Setup

Configure the Microsoft OneDrive integration for DocuElevate using our setup wizard.

Note: You only need to create an Azure application and get credentials. The setup wizard will handle the rest automatically.

Quick Setup Guide

Step 1: Register an Azure Application

  1. Go to the Azure Portal
  2. Navigate to "Azure Active Directory" > "App registrations"
  3. Click "New registration"
  4. Enter a name for your application (e.g., "DocuElevate")
  5. For "Supported account types", select:
    "Accounts in any organizational directory and personal Microsoft accounts"
  6. For Redirect URI:
    • Select "Web"
    • Enter: {{ request.url.scheme }}://{{ request.url.netloc }}/onedrive-callback
  7. Click "Register"

Step 2: Configure API Permissions

  1. In your application page, go to "API permissions"
  2. Click "Add a permission"
  3. Select "Microsoft Graph" > "Delegated permissions"
  4. Search for and add these permissions:
    • Files.ReadWrite
    • offline_access
  5. Click "Add permissions"

Step 3: Get Client ID and Create Secret

  1. Copy the "Application (client) ID" from the overview page
  2. Go to "Certificates & secrets"
  3. Under "Client secrets", click "New client secret"
  4. Add a description and select an expiration period
  5. Click "Add" and immediately copy the secret value (it will only be shown once)

Complete Setup with Wizard

Use "common" for personal accounts or your organization's Tenant ID for corporate accounts

Enter the folder path where files should be uploaded (e.g., Documents/Uploads)

{% if is_configured %} {% else %} {% endif %}

{% if is_configured %} OneDrive integration is properly configured! Your refresh token is valid. {% else %} OneDrive integration is not completely configured or token may be invalid. {% endif %}

Configuration for Worker Nodes

Copy these environment variables to configure all worker nodes:

ONEDRIVE_CLIENT_ID={{ client_id_value }}
ONEDRIVE_CLIENT_SECRET={{ client_secret_value|default('YOUR_CLIENT_SECRET', true) }}
ONEDRIVE_TENANT_ID={{ tenant_id }}
ONEDRIVE_REFRESH_TOKEN={{ refresh_token_value|default('YOUR_REFRESH_TOKEN', true) }}
ONEDRIVE_FOLDER_PATH={{ folder_path|default('Documents/Uploads', true) }}

Add these variables to your .env file or environment configuration.

Need More Information?

For detailed instructions and troubleshooting, refer to the OneDrive Setup Documentation.

Back to Status
{% endblock %} {% block scripts %} {% endblock %}