Overview
The OneDrive add-on enables serving files from Microsoft OneDrive, including personal accounts and OneDrive for Business. Integrate with Microsoft 365, leverage enterprise security features, and manage files through the familiar OneDrive interface.
Prerequisites
- WordPress Download Manager installed
- OneDrive add-on installed and activated
- Microsoft account (personal or work/school)
- Azure AD app registration
Benefits
| Feature | Benefit |
|---|---|
| 5GB Free | Personal accounts |
| 1TB with M365 | Business accounts |
| Microsoft Integration | Part of Office ecosystem |
| Enterprise Security | Compliance features |
| Real-time Collaboration | Co-authoring support |
Azure AD App Setup
Step 1: Register Application
- Go to portal.azure.com
- Navigate to Azure Active Directory
- Click App registrations > New registration
- Configure:
Name: WPDM OneDrive Integration Supported account types: ○ Single tenant (organization only) ● Multi-tenant + personal accounts (recommended) ○ Personal Microsoft accounts only Redirect URI: Platform: Web URL: https://yoursite.com/wp-admin/admin.php?page=wpdm-onedrive-callback
- Click Register
Step 2: Get Application ID
After registration:
Application (client) ID: 12345678-abcd-efgh-ijkl-1234567890ab Directory (tenant) ID: 87654321-dcba-hgfe-lkji-ba0987654321
Step 3: Create Client Secret
- Go to Certificates & secrets
- Click New client secret
- Enter description and expiry
- Copy the secret value immediately
Client Secret Value: abc123~DEF456_ghiJKL789 (Copy now - won't be shown again!)
Step 4: Configure API Permissions
- Go to API permissions
- Click Add a permission
- Select Microsoft Graph
- Choose Delegated permissions
- Add these permissions:
☑ Files.Read ☑ Files.Read.All ☑ Files.ReadWrite ☑ Files.ReadWrite.All ☑ offline_access ☑ User.Read
- Click Grant admin consent (if admin)
Plugin Configuration
Step 1: Access Settings
- Go to Downloads > Settings
- Click OneDrive tab
Step 2: Enter Credentials
┌─────────────────────────────────────────────────────────────┐ │ OneDrive Configuration │ ├─────────────────────────────────────────────────────────────┤ │ │ │ Application (Client) ID: │ │ [12345678-abcd-efgh-ijkl-1234567890ab ] │ │ │ │ Client Secret: │ │ [abc123~DEF456_ghiJKL789 ] │ │ │ │ Tenant ID: (optional, for single tenant) │ │ [common ] │ │ (Use 'common' for multi-tenant, or specific tenant ID) │ │ │ │ [Save Settings] │ │ │ │ [Connect to OneDrive] │ │ │ └─────────────────────────────────────────────────────────────┘
Step 3: Authorize
- Click Connect to OneDrive
- Sign in with Microsoft account
- Review permissions
- Click Accept
- Redirected back to WordPress
✓ Successfully connected to OneDrive Account: user@outlook.com Storage: 2.5 GB used of 5 GB
Using OneDrive Files
Adding Files to Package
- Edit a package
- In Attached Files, click Browse OneDrive
- Navigate folders
- Select file(s)
- Click Attach Selected
┌─────────────────────────────────────────────────────────────┐ │ OneDrive Browser │ ├─────────────────────────────────────────────────────────────┤ │ 📁 My files │ │ ├── 📁 Documents │ │ │ ├── 📄 report.docx (2 MB) [Select] │ │ │ └── 📄 manual.pdf (5 MB) [Select] │ │ ├── 📁 Downloads │ │ │ └── 📄 software.zip (45 MB) [Select] │ │ └── 📁 Shared │ │ └── 📄 team-file.xlsx (1 MB) [Select] │ │ │ │ [Attach Selected Files] │ └─────────────────────────────────────────────────────────────┘
OneDrive for Business
For work/school accounts:
┌─────────────────────────────────────────────────────────────┐ │ OneDrive for Business │ ├─────────────────────────────────────────────────────────────┤ │ 📁 My files │ │ 📁 Shared with me │ │ 📁 SharePoint Sites │ │ ├── 📁 Team Site │ │ │ └── 📁 Documents │ │ └── 📁 Project Site │ │ └── 📁 Shared Documents │ └─────────────────────────────────────────────────────────────┘
Download Methods
Sharing Links
Generate OneDrive sharing links:
☑ Use sharing links Link type: [View only ▼] Expiry: [7] days (0=never)
Direct Download
Use download URLs:
☑ Use direct download URLs
Faster but may require authentication.
Proxy Downloads
Route through WordPress:
☑ Proxy downloads
Full access control, uses server bandwidth.
Personal vs Business
Personal OneDrive
| Feature | Availability |
|---|---|
| Storage | 5 GB free, up to 6 TB paid |
| Sharing | Public/specific people |
| Admin | Self-managed |
| Compliance | Basic |
OneDrive for Business
| Feature | Availability |
|---|---|
| Storage | 1 TB – unlimited |
| Sharing | Organization controls |
| Admin | IT managed |
| Compliance | Enterprise (DLP, eDiscovery) |
Tenant Configuration
For business/organization:
Tenant ID: your-org.onmicrosoft.com or Tenant ID: 87654321-dcba-hgfe-lkji-ba0987654321
For personal accounts:
Tenant ID: common or Tenant ID: consumers
SharePoint Integration
Accessing SharePoint
With OneDrive for Business:
- In file browser, navigate to SharePoint Sites
- Select site
- Browse document libraries
- Attach files
Site Permissions
Files inherit SharePoint permissions. Ensure:
- Site accessible to your account
- Appropriate sharing policies set
Storage Plans
Personal
| Plan | Storage | Price |
|---|---|---|
| Free | 5 GB | $0 |
| Microsoft 365 Basic | 100 GB | $1.99/mo |
| Microsoft 365 Personal | 1 TB | $6.99/mo |
| Microsoft 365 Family | 6 TB | $9.99/mo |
Business
| Plan | Storage | Price |
|---|---|---|
| OneDrive for Business Plan 1 | 1 TB | $5/user/mo |
| OneDrive for Business Plan 2 | Unlimited | $10/user/mo |
| Microsoft 365 Business Basic | 1 TB | $6/user/mo |
| Microsoft 365 Business Standard | 1 TB | $12.50/user/mo |
Troubleshooting
“Authorization Failed”
Causes:
- Wrong app credentials
- Redirect URI mismatch
- Permissions not granted
Solutions:
- Verify Application ID and Secret
- Check redirect URI matches exactly
- Grant admin consent for permissions
- Re-authorize
“Access Denied”
Causes:
- Insufficient permissions
- Tenant restrictions
- Conditional access policies
Solutions:
- Add required API permissions
- Check tenant settings
- Contact IT admin for business accounts
“Token Expired”
Cause: Refresh token expired (90 days inactive)
Solution:
- Re-authorize connection
- Use app more frequently to keep token fresh
“File Not Found”
Causes:
- File deleted or moved
- Permission revoked
- Path changed
Solutions:
- Verify file exists in OneDrive
- Check sharing settings
- Re-attach file
Security
App Permissions
Minimize permissions:
- Use
Files.Readfor read-only - Use
Files.Read.Allfor shared files - Only add write permissions if needed
Secret Management
- Rotate client secrets regularly
- Don’t commit secrets to version control
- Use Azure Key Vault for production
Conditional Access
For business accounts:
- Configure conditional access policies
- Require compliant devices
- Enable MFA
Best Practices
- Use business accounts for enterprise features
- Regular token refresh – Access periodically
- Organize files – Clear folder structure
- Monitor storage – Watch quota usage
- Backup critical files – Don’t rely solely on OneDrive
- Review permissions – Audit app access regularly
Related Documentation
Last updated: January 2026
Applies to: WordPress Download Manager 7.x + OneDrive Add-on