Microsoft Office 365 Audit connector setup
Polls unified audit logs from the "Office 365 Management Activity API" for Exchange, SharePoint, Azure AD, General, and DLP workloads.
What you need first
| Requirement | Details |
|---|---|
| Microsoft 365 tenant | Global administrator or equivalent to register apps and grant consent |
| Unified audit log | Audit logging enabled for the workloads you plan to collect |
| Tenant ID | Azure AD directory (tenant) GUID |
| Region | Commercial (manage.office.com) or GCC (manage.office365.us) |
"One subscription per workload per tenant. Microsoft allows only one active Management API subscription per content type per tenant."
1. Register an Azure application
- Sign in to the Microsoft Entra admin center.
- Go to Applications → App registrations → New registration.
- Name the app (e.g.
Perpetual Office 365 Audit). - Choose Accounts in this organizational directory only.
- Click Register (no redirect URI required).
- Copy the Application (client) ID and Directory (tenant) ID from Overview.
API permissions
- Open API permissions → Add a permission.
- Choose APIs my organization uses, search for "Office 365 Management APIs" (not Microsoft Graph).
- Add Application permissions:
ActivityFeed.Read— required for all workloadsActivityFeed.ReadDlp— required only if enabling the DLP workload
- Click Grant admin consent for [your organization].
Client secret
- Go to Certificates & secrets → New client secret.
- Add a description and expiration per your policy.
- Copy the secret value immediately (shown only once).
2. Enable audit logging (if needed)
- Exchange: Enable mailbox audit logging in Exchange Online (on by default for many tenants).
- SharePoint / OneDrive: Ensure audit logging is enabled in the Microsoft 365 compliance center.
- Unified audit log: Confirm the unified audit log is turned on for your tenant. New tenants may take up to 12 hours before historical content appears.
3. Perpetual credential
- Log in to Perpetual. Open Settings from the user/org control at the bottom left of the sidebar (click your name → Settings), then go to Credentials → New Credential.
- Choose OAuth 2.0 Client Credentials.
- Fill in:
| Field | Value |
|---|---|
| Name | Unique identifier using letters, digits, and underscores only (e.g. office_365_audit). |
| Allowed URL patterns | *.office.com, *.office365.us, *.microsoftonline.com |
| Token URL | https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token |
| Client ID | Application (client) ID from step 1 |
| Client Secret | Client secret from step 1 |
| Scopes | https://manage.office.com/.default (commercial) or the GCC equivalent for your tenant |
- Save the credential.
4. Create the Office 365 Audit connector
- Go to Datasets → Connectors → Create Connector.
- Select Microsoft Office 365 Audit.
- Connector name: unique identifier (letters, numbers, underscores).
- Configure:
- Office 365 Management API access: select the credential from step 3.
- Poll interval (minutes): default
5. - Tenant ID: directory (tenant) GUID from step 1.
- Region:
commercialorgcc— "cannot be changed" after creation. - Enable workloads (at least one required):
| Setting | Content type | Notes |
|---|---|---|
| Exchange | Audit.Exchange | Mailbox and admin operations |
| SharePoint | Audit.SharePoint | SharePoint and OneDrive file activity |
| Azure AD | Audit.AzureActiveDirectory | Sign-in and directory admin events |
| General | Audit.General | Other workloads (Teams, Power BI, etc.) |
| DLP | DLP.All | Requires ActivityFeed.ReadDlp permission |
- Optionally check Deploy, then save.
"First run backfills roughly the last 24 hours per enabled workload."
Operational notes
- Duplicate workloads: If a workload is already subscribed by another tool or connector in the same tenant, disable it on one side before enabling it here.
- DLP sensitivity: DLP events may include sensitive data classifications; restrict access accordingly.
- Secret rotation: Rotate the client secret in Entra, update the Perpetual credential, then remove the old secret.