Purpose
AirMDR uses Microsoft Purview during investigations, not for alerting. Darryl can rebuild an account timeline from the unified audit log, scope a phishing campaign across every mailbox, list exactly which messages matched, preserve a user’s mailbox and OneDrive with a legal hold, purge a confirmed malicious email, judge the sensitivity of a file that left the company, and read DLP and Insider Risk Management alerts and activity for a user. Every capability is optional. Grant only the permissions for the capabilities you want; when the connection is saved, AirMDR checks each one and reports which are usable.Pre-requisites
Microsoft Entra access
- Application Administrator or Cloud Application Administrator, to register the app and grant admin consent
- For eDiscovery: Compliance Administrator or Organization Management in Purview, to assign Purview roles with PowerShell
Licensing
- Audit log search: any Microsoft 365 plan with auditing. Records are kept 180 days, or one year for Entra, Exchange and SharePoint records of E5 users
- eDiscovery: Microsoft 365 E5, or E3 with the eDiscovery and Audit add-on. Microsoft allows app-only access only to cases with premium features
- Insider Risk activity and alerts: Insider Risk Management licensing, with data sharing to Defender XDR turned on
Permissions by capability
Setup
1
Register an app for AirMDR
- In the Microsoft Entra admin center, open Identity → Applications → App registrations → New registration.
-
Name it, for example
AirMDR Purview, choose Single tenant, and click Register. - On the Overview page copy the Application (client) ID and Directory (tenant) ID.
- Open Certificates & secrets → New client secret, choose an expiry, and copy the secret Value.
2
Grant Microsoft Graph application permissions
- Open API permissions → Add a permission → Microsoft Graph → Application permissions.
- Add the permissions from the table above for the capabilities you want.
- Click Grant admin consent and confirm.
3
eDiscovery only: give the app Purview roles
Graph permissions alone are not enough for eDiscovery. Find the app’s Object ID under Enterprise applications (it differs from the Application ID), then run:To allow purge, also assign the Search And Purge role, for example through a custom role group that contains it.Then in the Purview portal open eDiscovery → Settings → General and turn on eDiscovery (Premium) as the default for new cases. This applies to new cases only; AirMDR also tries to enable premium features on each case it creates and warns when it cannot.
4
eDiscovery reports only: allow export downloads
AirMDR reads eDiscovery item reports (subject, sender, recipients, dates, location) so Darryl can see which messages a search matched. Downloads are served by a separate Microsoft application:Then on the app open API permissions → Add a permission → APIs my organization uses → MicrosoftPurviewEDiscovery → Application permissions →
eDiscovery.Download.Read, and grant admin consent.5
Insider Risk only: share data with Defender XDR
In the Purview portal open Insider risk management → Settings → Data sharing and turn on sharing with Microsoft Defender XDR. Without it, Insider Risk alerts and activity never reach the API.
Usernames that Purview pseudonymizes in its own portal are returned in clear text through the API. Confirm this with your privacy team before enabling.
6
Add the connection in AirMDR
- In AirMDR open Integrations, search for Microsoft Purview and click Add connection.
- Enter the Tenant ID, Client ID and Secret Value, and save.
- AirMDR requests a token and makes one real read per granted capability. A wrong or expired secret, an unknown tenant, or missing Purview roles are reported by name, and the connection shows which capabilities are usable.
Skills provided by this integration
Limits worth knowing
- Audit records appear 60 to 90 minutes after the activity, so a very recent empty result is not proof of no activity.
- Microsoft allows 5 eDiscovery requests per minute per app. Searches, exports and purges run as jobs; when one is still running the skill returns an ID and Darryl collects the result on a later call.
- Insider Risk activity covers the last 30 days and only users in scope of Insider Risk policies.
- The audit log search API is available on the Microsoft global cloud only, not GCC High, DoD or 21Vianet.

