{% extends "documentation/base.html" %} {% block doc_content %}
Configure Microsoft Graph API integration to automatically retrieve backup report emails from an Exchange Online mailbox.
BackupChecks uses the Microsoft Graph API to retrieve emails from an Exchange Online (Microsoft 365) mailbox. This allows the system to automatically import backup reports sent to a dedicated mailbox.
The mail import process involves:
Before configuring mail import in BackupChecks, you need:
To allow BackupChecks to access your mailbox, you must create an Azure AD app registration and grant it the necessary permissions.
After registration, note the following values from the Overview page:
BackupChecks requires application permissions (not delegated) to access the mailbox. Start with read-only access for initial testing:
Mail.Read - Read mail in all mailboxesTo follow the principle of least privilege, restrict the application to access only the backup mailbox instead of all mailboxes in your tenant.
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com
New-ApplicationAccessPolicy `
-AppId "<CLIENT_ID>" `
-PolicyScopeGroupId "backupreports@yourdomain.com" `
-AccessRight RestrictAccess `
-Description "Allow Graph app to access only the backup mailbox"
<CLIENT_ID> with your Application (client) ID from Step 1.1backupreports@yourdomain.com with your backup mailbox addressTest-ApplicationAccessPolicy `
-Identity backupreports@yourdomain.com `
-AppId "<CLIENT_ID>"
AccessCheckResult : GrantedTest-ApplicationAccessPolicy `
-Identity someuser@yourdomain.com `
-AppId "<CLIENT_ID>"
AccessCheckResult : DeniedPolicyScopeGroupId. Even though the app has tenant-wide Mail.Read permissions, Exchange Online enforces the policy and blocks access to other mailboxes.
Once you've tested read-only access and confirmed it works correctly, add write permissions to allow BackupChecks to move processed emails.
Mail.ReadWrite - Read and write mail in all mailboxesMail.ReadWrite permission is required to move processed emails from the incoming folder to the processed folder. If you only grant Mail.Read, BackupChecks can import emails but cannot move them after processing. They will remain in the incoming folder.
Note: If you configured the Application Access Policy in Step 1.4, the write restriction still applies - the app can only write to the backup mailbox, not other mailboxes.
After creating the Azure AD app registration, configure BackupChecks to use it:
Fill in the following fields with values from your Azure AD app registration:
| Field | Description | Example |
|---|---|---|
| Tenant ID | Azure AD Directory (tenant) ID | 12345678-1234-1234-1234-123456789abc |
| Client ID | Azure AD Application (client) ID | 87654321-4321-4321-4321-abcdef123456 |
| Client secret | The secret value you copied in Step 1.2 | abc123...xyz789 |
| Mailbox address | Email address of the mailbox to import from | backupreports@yourdomain.com |
******** (stored) when a secret is already saved. Leave this field empty to keep the existing secret, or enter a new secret to replace it.
BackupChecks uses two folders in the mailbox:
| Folder | Purpose | Example Path |
|---|---|---|
| Incoming folder | Where backup reports arrive and are fetched from | Inbox or Inbox/Backup Reports |
| Processed folder | Where emails are moved after processing | Archive or Inbox/Processed |
To configure folders:
Inbox)
Inbox or Inbox/Backup Reports)Archive or create a subfolder like Inbox/ProcessedInbox/Backup Reports) is automatically generated.
After configuring the folder paths:
After saving settings, verify that mail import is working:
To manually trigger a mail import without waiting for the scheduled task:
If you see "Failed to obtain access token" errors:
If folder configuration fails:
If manual import succeeds but no emails appear:
BackupChecks stores email content in the database but can also retain the original .eml file for a specified period:
This setting is configured in Settings → Imports tab.
BackupChecks currently supports importing from one mailbox at a time. If you need to monitor multiple mailboxes:
Mail.Read only, test thoroughly, then add Mail.ReadWrite after validation