Microsoft Management Activity v2
Microsoft 365 audit log: subscriptions, content and audit events
Enables Microsoft 365 audit subscriptions and pulls SharePoint, Exchange, Entra ID and DLP audit records from the Management Activity API with a resume cursor.
microsoft-management-activity-v2_2.0.1.tgz
Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.
Wraps the Office 365 Management Activity API (the Microsoft 365 audit log on manage.office.com). It enables and disables audit subscriptions for the five audit content types (Audit.General, Audit.AzureActiveDirectory, Audit.Exchange, Audit.SharePoint and DLP.All), lists the content blobs of a type for a time window, fetches the audit records of a blob, and pulls audit records since a time in 24-hour windows with a resume cursor. Use it for audit-driven detections such as SharePoint sharing, mailbox rule changes, Entra ID sign-ins and admin actions. An execute operation sends a GET or POST to a path under the feed.
Live-tested on FortiSOAR 8.0.1 against a Microsoft 365 lab tenant. All 8 operations pass and both branches of the sample playbook run to their end step.
Not live-tested:
- Start Subscription on a content type that is not enabled (DLP.All in the lab): starting it would change the lab tenant's audit state. Start was run on an enabled Audit type, where it is idempotent.
- Stop Subscription on an enabled content type: the connector's subscription rule excludes it, and stopping an audit type would change the lab tenant's audit state. Stop was run on a type that is not enabled, where it is a no-op.
- Start Subscription throttle (HTTP 429): a repeat start on an enabled type returned success, so the throttle response was not reached live. The 429 mock is synthetic.
- HTTP 403 on any operation: the lab feed did not produce it. The 403 mocks are synthetic.
- AF20022 (no subscription for the content type, returned when a type that is not enabled is pulled): not captured in the lab.
Authentication is application-only (client credentials). The Entra ID app registration needs the Office 365 Management APIs permissions ActivityFeed.Read and, for DLP.All, ActivityFeed.ReadDlp, both granted with admin consent, and the audit subscriptions must be enabled for the tenant. Enter the tenant ID, client ID and client secret in the configuration.
Configuration · 6 fields
- Tenant ID
tenant_idtext requiredMicrosoft Entra ID tenant (directory) ID or domain.
- Client ID
client_idtext requiredApplication (client) ID of the Entra ID app registration (ActivityFeed.Read, admin consent).
- Client Secret
client_secretpassword requiredClient secret of the app registration (Certificates & secrets).
- Publisher Identifier
publisher_identifiertext(Optional) PublisherIdentifier sent with every call (a dedicated quota per publisher). Default: the tenant ID.
- Verify SSL
verify_sslcheckboxSpecifies whether SSL certificates are to be verified.
Default
true - Timeout (seconds)
timeoutintegerTimeout for each request.
Default
60
Operations · 8
Health Check
health_checkhealth_checkAcquire a token and read the subscription list.
No parameters.
ReturnstypepropertiesList Subscriptions
list_subscriptionslist_subscriptionsList the audit subscriptions of the tenant and their status.
No parameters.
ReturnstypepropertiesStart Subscription 1 param
start_subscriptionstart_subscriptionEnable an audit subscription for a content type (throttled: 15 minutes between starts).
- Content Type
content_typeselect requiredAudit content type: Audit.General (Teams, OneDrive, Power Platform and other workloads), Audit.AzureActiveDirectory (Entra ID sign-ins and admin actions), Audit.Exchange, Audit.SharePoint, or DLP.All. The subscription must be enabled.
Default
Audit.GeneralOptions Audit.GeneralAudit.AzureActiveDirectoryAudit.ExchangeAudit.SharePointDLP.All
ReturnstypepropertiesStop Subscription 1 param
stop_subscriptionstop_subscriptionDisable an audit subscription for a content type.
- Content Type
content_typeselect requiredAudit content type: Audit.General (Teams, OneDrive, Power Platform and other workloads), Audit.AzureActiveDirectory (Entra ID sign-ins and admin actions), Audit.Exchange, Audit.SharePoint, or DLP.All. The subscription must be enabled.
Default
Audit.GeneralOptions Audit.GeneralAudit.AzureActiveDirectoryAudit.ExchangeAudit.SharePointDLP.All
ReturnstypepropertiesList Available Content 4 params
list_contentlist_contentList the content blobs of a content type for a window (follows paging), newest first as the API returns them.
- Content Type
content_typeselect requiredAudit content type: Audit.General (Teams, OneDrive, Power Platform and other workloads), Audit.AzureActiveDirectory (Entra ID sign-ins and admin actions), Audit.Exchange, Audit.SharePoint, or DLP.All. The subscription must be enabled.
Default
Audit.GeneralOptions Audit.GeneralAudit.AzureActiveDirectoryAudit.ExchangeAudit.SharePointDLP.All - Start Time
start_timetext(Optional) ISO 8601 UTC start of the window, at most 7 days back. Give with End Time; the window is at most 24 hours.
- End Time
end_timetext(Optional) ISO 8601 UTC end of the window (after Start Time, at most 24 hours later).
- Limit
limitinteger(Optional) Stop after this many items. Default 1000, max 10000.
Default
1000
ReturnstypepropertiesGet Content Blob 1 param
get_contentget_contentFetch one content blob by its contentUri and return its audit records.
- Content URI
content_uritext requiredcontentUri of a content blob from List Available Content (manage.office.com only).
ReturnstypepropertiesPull Audit Events Since 4 params
pull_audit_eventspull_audit_eventsWalk the audit records of a content type from a time (in 24-hour windows) and return them with a cursor. Convenience over List Available Content and Get Content Blob.
- Content Type
content_typeselect requiredAudit content type: Audit.General (Teams, OneDrive, Power Platform and other workloads), Audit.AzureActiveDirectory (Entra ID sign-ins and admin actions), Audit.Exchange, Audit.SharePoint, or DLP.All. The subscription must be enabled.
Default
Audit.GeneralOptions Audit.GeneralAudit.AzureActiveDirectoryAudit.ExchangeAudit.SharePointDLP.All - Since
sincetext requiredISO 8601 UTC time to pull from (at most 7 days back). Use the previous run's window_end to resume.
- Until
untiltext(Optional) ISO 8601 UTC end. Default: now.
- Limit
limitinteger(Optional) Maximum records to return. Default 1000, max 10000.
Default
1000
ReturnstypepropertiesExecute API Request 4 params
execute_api_requestexecute_api_requestSend a GET or POST to the Management Activity API (feed-relative path, or an absolute manage.office.com URL) and return the raw status, paging link and body.
- Method
methodselectDefault GET.
Options GETPOST - Path
pathtext requiredPath under https://manage.office.com/api/v1.0/<tenant>/activity/feed, or an absolute manage.office.com URL.
- Query
querytext(Optional) Query parameters as a JSON object.
- Body
bodytext(Optional) JSON body for a POST.
Returnstypeproperties