Skip to content

OneDrive Storage

The OneDrive storage provider enables file operations via Microsoft Graph API. Supports personal OneDrive, OneDrive for Business, and SharePoint document libraries.

  • Microsoft Azure account
  • Azure Active Directory (Entra ID) tenant
  • App registration with Microsoft Graph permissions
  1. Register an application in Azure AD

    Go to Azure Portal > Azure Active Directory > App registrations > New registration:

    • Name: satware AI OnlyOffice MCP
    • Supported account types: Single tenant or Multitenant
    • Redirect URI: http://localhost:8080/oauth/callback (for delegated auth)
    • Note the Application (client) ID and Directory (tenant) ID
  2. Create a client secret

    Go to Certificates & secrets > New client secret. Copy the secret value immediately (it won’t be shown again).

  3. Configure API permissions

    Go to API permissions > Add a permission > Microsoft Graph:

    • Select Application permissions
    • Add: Files.ReadWrite.All, User.Read.All
    • Click Grant admin consent

Best for automated systems without user interaction:

{
"type": "onedrive",
"tenantId": "your-tenant-id",
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"authType": "application",
"userId": "user@contoso.com"
}

For applications acting on behalf of a user:

{
"type": "onedrive",
"tenantId": "your-tenant-id",
"clientId": "your-client-id",
"authType": "delegated"
}
Parameter Required Description
type Yes Must be "onedrive"
tenantId Yes Azure AD Tenant ID
clientId Yes Application (client) ID
clientSecret No Client secret (required for application auth)
authType No "application" or "delegated" (default: "delegated")
userId No User ID/UPN (required for application auth)
driveId No Specific drive ID (for SharePoint)
basePath No Base path prefix
{
"type": "onedrive",
"tenantId": "xxx-xxx-xxx",
"clientId": "yyy-yyy-yyy",
"clientSecret": "your-secret",
"authType": "application",
"driveId": "b!xxxxx-drive-id",
"basePath": "/Shared Documents"
}
Variable Description
STORAGE_TYPE Set to onedrive
AZURE_TENANT_ID Azure AD Tenant ID
AZURE_CLIENT_ID Application ID
AZURE_CLIENT_SECRET Client secret