Send Microsoft 365 logs to LogPulse

The Microsoft 365 unified audit log (Exchange, SharePoint, OneDrive, Teams, Entra ID) through the Office 365 Management Activity API, and optionally the Exchange Online message trace.

In short
To send Microsoft 365 logs to LogPulse, add Microsoft 365 under Configure → Sources → Cloud. LogPulse reads the Office 365 Management Activity API itself, without an agent. Events land in the audit, email, iam indexes with source o365, exchange_online and fill the Cloud Audit, Email data models.

Overview

How Microsoft 365 data reaches LogPulse
Vendor
Office 365 Management Activity API
Collect
Integration pollerreads new events, maps the fields
Store
index=audit
index=email
index=iam
  1. Office 365 Management Activity API to Integration poller
  2. Integration poller to index=audit
  3. Integration poller to index=email
  4. Integration poller to index=iam

LogPulse signs in to Microsoft 365 with the credential you give it and fetches new events every five minutes by default. You can set the interval per integration, from one minute to 24 hours.

What you need

  • Microsoft 365 app registration (Tenant ID, Client ID, Client Secret)
  • Application permission: ActivityFeed.Read (Office 365 Management APIs)
  • For the message trace: ExchangeMessageTrace.Read.All and Domain.Read.All (Microsoft Graph)
  • Admin consent granted for the application permission
  • In LogPulse: a role that may manage API keys. Cloud integrations fall under that right.

1. Create a credential in Microsoft 365

Field in LogPulseWhere you find it
Tenant IDYour Microsoft 365 Directory (tenant) ID.
Client ID (application ID)The Application (client) ID of an app registration.
Client secretA client secret of that app registration. It needs the ActivityFeed.Read application permission (Office 365 Management APIs) with admin consent. Stored encrypted and never shown again.

2. Add the integration in LogPulse

Go to Configure → Sources → Cloud and choose Microsoft 365. Fill in the fields, tick the data sources you want and save. LogPulse first tests the connection with your credential and tells you what is wrong when it fails.

Tip: Secrets are stored encrypted and never shown again. To change one, paste a new value; the rest stays.

What arrives

Data sourceIndexSourceSourcetypeWhat it holds
General Audit (Audit.General)audito365o365:auditCross-workload audit events: Teams, Power BI, Forms, Yammer, and other M365 services. Normalized to the Cloud Audit data model.
Exchange Audit (Audit.Exchange)audito365o365:auditExchange Online mailbox and admin activity: mail access, sends, rule changes, and mailbox permission grants. Normalized to the Cloud Audit data model.
SharePoint Audit (Audit.SharePoint)audito365o365:auditSharePoint and OneDrive activity: file access, downloads, sharing, and sync events. Normalized to the Cloud Audit data model.
Message Trace (Exchange Online) (off by default)emailexchange_onlinem365_message_traceEvery message in and out of Exchange Online: sender, recipient, subject, status (delivered, quarantined, junked, failed) and IPs, via Microsoft Graph message traces. Normalized to the Email data model. Needs the ExchangeMessageTrace.Read.All permission.
Azure AD Audit (Audit.AzureActiveDirectory)iamo365o365:auditAzure AD / Entra activity surfaced through the unified audit log: sign-ins, consent grants, and directory changes. Normalized to the Cloud Audit data model.

The index is the kind of data and the source is the product, so detection rules for that kind of data find Microsoft 365 without changes.

Note: Unified audit logging must be on in the tenant, or the Management Activity API has nothing to return.
Note: The message trace is off by default and needs two extra Microsoft Graph permissions.

Fields and data models

Data modelWhat you get
Cloud AuditAudit records across Exchange, SharePoint, Teams and Entra ID with action, outcome, provider, user, src_ip and app.
EmailThe message trace: sender, recipient, subject, status and IP addresses.

Events are mapped to the data models above, with the same field names as other sources of the same kind. See field names.

3. Check the data

The first events arrive within a few minutes. Check what came in:

earliest=-1h index IN (audit, email, iam) source IN (o365, exchange_online)
| stats count by index, source, sourcetype

The integration page in LogPulse shows when it last read events and the last error, if any.

Troubleshooting

The connection test names what is wrong. These are the answers you are most likely to see.

What you seeWhat to do
App registration lacks the "ActivityFeed.Read" application permission for the Office 365 Management API, or admin consent has not been granted.Add ActivityFeed.Read under Office 365 Management APIs as an application permission and press Grant admin consent.
Could not reach Microsoft 365.Check the tenant ID, client ID and client secret. A client secret expires; create a new one when it has.
The test passes but no events arrive.Run the search above over a longer time. No results: check on the integration page that the data source is switched on and when it last read events. Microsoft 365 may also simply have had nothing new.

Frequently asked questions

How do I send Microsoft 365 logs to LogPulse?
Add the Microsoft 365 cloud integration under Configure, Sources, Cloud in LogPulse and fill in Tenant ID, Client ID (application ID), Client secret. LogPulse reads the Office 365 Management Activity API itself, every five minutes by default; there is nothing to install.
Which permissions does LogPulse need in Microsoft 365?
Microsoft 365 app registration (Tenant ID, Client ID, Client Secret). Application permission: ActivityFeed.Read (Office 365 Management APIs). For the message trace: ExchangeMessageTrace.Read.All and Domain.Read.All (Microsoft Graph). Admin consent granted for the application permission. Read access is enough for collecting logs.
Which index does Microsoft 365 data go to?
The index is the kind of data: audit, email, iam. The source is the product: o365, exchange_online. Each data source has its own sourcetype, listed on this page.
Which data models does Microsoft 365 fill?
Cloud Audit, Email. Detection rules and dashboards written for a data model work on Microsoft 365 without changes.
Why is Message Trace (Exchange Online) off by default?
To keep your daily ingest down until you need it: Message Trace (Exchange Online) is high volume or of use to fewer teams. Tick the data source in the integration to switch it on.