Integration
Microsoft 365
The Microsoft 365 unified audit log: Exchange mailbox and rule changes, SharePoint and OneDrive file activity, Teams and Entra events, read every 5 minutes through the Office 365 Management Activity API; optionally Microsoft Purview DLP alerts (beta).
- Category: Security
- How data is sent: Logthread reads the API with a token you create (nothing to install)
- Status: Beta
How it works#
- Answer a few questions. The ids and client secret of the read-only app registration made in "Before you start". The secret is stored encrypted and never shown again; Logthread reads with it and changes nothing in your tenant.
- Logthread reads Microsoft 365 every 5 minutes. There is nothing to install or paste: the poll starts as soon as the connector is created and carries on from where it left off, with every event sent once.
- Data arrives. Events from Microsoft 365 appear under the service microsoft-365 within minutes. The connection page shows the last poll, what arrived and any error from the API, and turns Active with the first record.
Before you start#
The form first asks: Connect Entra ID, Microsoft 365, or both? The steps below are for Microsoft 365 alone.
1. Register an app in your tenant. In the Microsoft Entra admin center (entra.microsoft.com): Identity, Applications, App registrations, New registration. Name it Logthread audit reader, choose Accounts in this organizational directory only, leave Redirect URI empty, then Register. The Overview page shows the Application (client) ID and the Directory (tenant) ID asked for below.
2. Give it read-only access for Microsoft 365, with admin consent. API permissions, Add a permission: Office 365 Management APIs, Application permissions: ActivityFeed.Read. Add it before going on. Then choose Grant admin consent for your organization (a Privileged Role Administrator or Global Administrator can); the Status column turns Granted for every permission. These permissions only read; Logthread changes nothing in your tenant.
3. Create a client secret. Certificates & secrets, Client secrets, New client secret, an expiry of up to 24 months. Copy its Value straight away (it is shown once) and paste it below with the date in its Expires column. Home reminds you 30 days before it expires.
If you choose Entra ID only: API permissions, Add a permission: Microsoft Graph, Application permissions: AuditLog.Read.All and Directory.Read.All. Add all of them before going on. Then choose Grant admin consent for your organization (a Privileged Role Administrator or Global Administrator can); the Status column turns Granted for every permission. These permissions only read; Logthread changes nothing in your tenant. Optional: to see privileged directory roles and MFA registration in the access review and the identity report, also add Microsoft Graph, Application permissions: RoleManagement.Read.Directory, and turn that option on below.
If you choose Both, with one app registration (recommended): API permissions, Add a permission: Microsoft Graph, Application permissions: AuditLog.Read.All and Directory.Read.All; then Office 365 Management APIs, Application permissions: ActivityFeed.Read. Add all of them before going on. Then choose Grant admin consent for your organization (a Privileged Role Administrator or Global Administrator can); the Status column turns Granted for every permission. These permissions only read; Logthread changes nothing in your tenant. Optional: to see privileged directory roles and MFA registration in the access review and the identity report, also add Microsoft Graph, Application permissions: RoleManagement.Read.Directory, and turn that option on below.
What you answer#
| Question | Answer | Notes |
|---|---|---|
| Directory (tenant) ID | Text | On the app registration's Overview page, a GUID. |
| Application (client) ID | Text | On the same Overview page, a GUID. |
| Client secret value | Secret (stored encrypted, never shown) | The Value column of the new secret (not its Secret ID); stored encrypted. |
| Client secret expires on | Date (YYYY-MM-DD) | Home reminds you 30 days before, with a guided way to replace it. Where to find it: In the Microsoft Entra admin center, open the app registration, then Certificates & secrets, Client secrets. The Expires column shows the date for each secret; use the one of the secret you are pasting. |
| Exchange (mailboxes, inbox rules, forwarding) | Yes or no | Default: Yes. |
| SharePoint and OneDrive (files and sharing) | Yes or no | Default: Yes. |
| Everything else (Teams, Power Platform, Defender and more) | Yes or no | Default: Yes. |
| DLP alerts from Microsoft Purview (beta) | Yes or no | Data loss prevention policy matches, overrides and false positives; the matched content itself is never stored. Default: No. |
| Entra sign-ins and directory changes | Yes or no | Off because the Microsoft Entra ID connector reads your sign-ins. With both on, every sign-in would be counted twice. Default: Yes. |
| Your email domains (optional) | Text | Comma separated, for example acme.com,acme.co.uk. Forwarding to any other domain is outside; each user's own domain always counts as yours. |
Setup#
These are the steps for the default answers. In the app, they follow your answers, and the connector's ingest key replaces YOUR_INGEST_KEY.
Step 1. Test the connection. Choose Test connection on this page. Logthread signs in as the app and reads the Microsoft 365 audit log once, now. A wrong id or secret, a missing permission or missing admin consent shows here, with what to fix.
Step 2. Check the first records. The first poll starts the audit subscriptions you chose. Microsoft makes the first content available up to 12 hours after a subscription starts (then within about an hour of each event), as service microsoft-365. Auditing must be on in Microsoft Purview (Audit), which it is by default. After that Logthread reads every 5 minutes from where it left off, re-reading the last minutes for records Microsoft writes late, and sends each record once.
Step 3. Turn on security detections for your data. Impossible travel, MFA fatigue, legacy authentication, risky sign-ins, admin roles granted, forwarding to outside addresses and mass downloads or deletions read these records, and so do brute force and password spraying. Each shows its data status before you turn it on; the alert suggestions below show their matches over the last 24 hours.
Check that it works#
The connection page under Integrations counts what has arrived and turns Active with the first record. In Explore, search service:microsoft-365.
Then add#
Each is one click on the connection page and opens with your data, so you can check it before saving.
- Alert: Mail forwarded outside:
service:microsoft-365 m365.forward.external:true, at least 1 in 15 minutes - Alert: SharePoint and OneDrive deletions:
service:microsoft-365 event.action:(file_deleted OR file_recycled), at least 100 in 15 minutes - Alert: Microsoft 365 failed operations:
service:microsoft-365 event.outcome:failure, at least 50 in 10 minutes
Security detections#
Turn them on under Security → SIEM (Turn on recommended offers the ones whose data arrives). Each opens one incident per user, address or resource it groups by, and Use opens its query in the rule editor.
| Detection | Severity | Fires on |
|---|---|---|
| Brute force from one address | critical | Many failed sign-ins from one address in a short time: password guessing against SSH, VPN, a web login or the cloud console. |
| Password spraying | critical | Failed sign-ins for many different users from one address: one or two passwords tried against many accounts, which stays under per-user lockouts. |
| MFA fatigue | critical | Many MFA prompts denied or not answered for one user in a short time: someone with the password pushes requests until the user accepts one. |
| Directory role granted | warning | A user is added to an Entra ID directory role, permanently, as eligible or through Privileged Identity Management: more power for an account, or a new way to keep access. |
| Mail forwarded to an outside address | critical | An inbox rule or mailbox setting forwards or redirects mail to a domain that is not yours: the usual way a taken-over mailbox keeps leaking mail. Rules saved from Outlook itself (UpdateInboxRules) are not read yet. |
| Mass file download from SharePoint or OneDrive | warning | One user downloads 200 or more files from SharePoint or OneDrive in 15 minutes: data taken before leaving, or by someone using their account. OneDrive sync-client downloads (a new device's first sync) are left out. |
| Mass file deletion in SharePoint or OneDrive | critical | One user deletes 100 or more files or folders in SharePoint or OneDrive in 15 minutes: destruction, or ransomware working through a synced folder. |
| High-severity DLP policy match | critical | A Microsoft Purview data loss prevention rule of high severity matched content a user shared, sent or copied: sensitive data on its way out. One incident per user; offer an escalation so it is handled within your notice deadline. |
| Many DLP policy matches by one user | warning | One user sets off 20 or more data loss prevention rule matches in an hour, of any severity: bulk sharing or sending of sensitive data, or an account used to take it. |
| DLP policy overridden by a user | warning | A user overrides a data loss prevention policy tip (with or without a business justification), so a blocked share or message goes through: often legitimate, worth a look when it repeats or the content is sensitive. |
| One account signing in from many networks | warning | Successful sign-ins for one account from three or more networks (ASNs) within an hour. Moving between home Wi-Fi and mobile data is two; three or more in an hour is a shared or stolen password, or an attacker rotating proxies after a good guess. |
| One device signing in to many accounts | critical | Sign-in attempts for five or more different accounts from one device or TLS fingerprint within an hour: credential stuffing (leaked passwords tried account by account) or fake-account farming, even when every attempt comes from a different address. Needs device.id: a per-device id your app keeps (a device cookie or app install id). Not a TLS or browser fingerprint such as JA4: one of those is shared by millions of people on the same browser. |
| One device hopping between countries | warning | One device or TLS fingerprint seen from three or more countries within an hour: the same client rotating through VPN or proxy exits to hide where it is, or a session token replayed from elsewhere. Needs a per-device id in device.id (see "One device signing in to many accounts"). |
| Many accounts signed in from one address | warning | Successful sign-ins for five or more different accounts from one address within an hour: automation holding many accounts, or a credential-stuffing run that succeeded. An office or VPN gateway that everyone shares fires too: exclude it with -source.address:<address> in the rule. |
| Impossible travel between sign-ins | critical | Two successful sign-ins for one account in a row, in different countries, further apart than anyone can travel in the time between them (over 900 km/h by the GeoIP city location). Moves inside one country never fire: mobile networks place their addresses in a hub city. From your own app as well as Entra ID, Okta and Microsoft 365. A VPN exit abroad fires too: exclude its network or address in the rule. |
| Sign-in from a server, VPN or Tor network | warning | A successful sign-in from a cloud or hosting provider, a commercial VPN exit or Tor (Cloudflare and Microsoft networks are left out: iCloud Private Relay and Microsoft's own traffic are ordinary people). People sign in from home, office and mobile networks; scripts, rented servers and people hiding where they are come from these. If your own VPN or jump host runs in the cloud, exclude its address with -source.address:<address> in the rule. |
| Brute force on one account that succeeded | critical | Ten or more failed sign-ins for one account in a row, then a successful one, within 30 minutes, counted across every address and device: an attacker rotating addresses and devices still adds up on the account they target. Only the failures since the account's previous successful sign-in count, so a person who mistypes, or an old phone with a stale password, stays quiet. An SSH key sign-in never counts as the success. |
Price#
The integration itself has no charge. What it sends is billed as data ingested, ₹85 ($0.90) per GB on every plan, like any other data; parsing, detections and the dashboard add nothing. See Prices.
More: DLP alerts (Microsoft Purview).
Set it up under Integrations in the app, or from an AI agent with MCP (add_integration). All integrations: Integrations guide. Next: find what it sends in Explore and live tail.