M365 Backup Plugin¶
Overview¶
The M365 Backup plugin backs up Microsoft 365 mailboxes to S3-compatible storage. It supports scheduled backups, per-user exclusions, and message browsing/download from the panel.
Plugin ID: m365-backup
All endpoints require superuser. The plugin also requires the m365_backup feature flag in your license.
Configuration¶
# Get config
GET /api/m365-backup/config
# Save config
POST /api/m365-backup/config
{
"azure_tenant_id": "...",
"azure_client_id": "...",
"azure_client_secret": "...",
"s3_endpoint": "https://s3.amazonaws.com",
"s3_bucket": "my-m365-backups",
"s3_access_key": "...",
"s3_secret_key": "...",
"s3_region": "us-east-1"
}
# Test S3 connectivity
POST /api/m365-backup/test-s3
# Test Azure connectivity
POST /api/m365-backup/test-azure
Backup Operations¶
# Service status
GET /api/m365-backup/status
# List backed-up users
GET /api/m365-backup/users
# Trigger manual backup run
POST /api/m365-backup/run
# Get backup logs
GET /api/m365-backup/logs
Message Browsing¶
# Browse messages for a mailbox
GET /api/m365-backup/messages/:email?folder=Inbox&offset=0&limit=50
# Download a message (.eml)
GET /api/m365-backup/messages/:email/:msgId/download
# List attachments
GET /api/m365-backup/messages/:email/:msgId/attachments
# Download attachment
GET /api/m365-backup/attachment/:email/:attachId
Schedule¶
Exclusions¶
POST /api/m365-backup/exclude
{
"emails": ["[email protected]", "[email protected]"]
}