Wazuh Microsoft Graph integration for Defender, Entra ID and Intune

The ms-graph module in Wazuh pulls Defender alerts and incidents, Entra ID risk detections and Intune audit events through the Microsoft Graph API. This page explains how to scope, configure, verify and run it without duplicate collection.

On this page

How a Wazuh Microsoft Graph integration brings Defender, Entra ID and Intune into your SIEM

A security team that wants Microsoft identity, endpoint and device-management events next to its endpoint telemetry can do that with the ms-graph module in Wazuh. The module authenticates with an application registered in Azure, using the tenant ID, client ID and client secret of that registration, and then polls the Microsoft Graph API on a schedule. Its default interval is one day (1d), so the interval is one of the first settings to review against how quickly your analysts need these events. The full module reference is in the Wazuh ms-graph module reference, and it should be read alongside the tenant plan you are connecting.

The module collects several resource families. From identity, it reads identityProtection riskDetections, which describe risky sign-ins and risky users in Entra ID. From security, it reads security alerts, alerts_v2 and incidents, along with secure scores, which is where Defender signals reach Wazuh. It also reads Purview eDiscovery cases. From device management, it reads Intune auditEvents, managedDevices and detectedApps. Each family answers a different question: who is taking risky sign-in actions, what did the security platform alert on, which devices are enrolled, and what administrators changed. The api_type option selects the cloud the tenant lives in and accepts global, gcc-high or dod, so a government tenant must not be configured as a commercial one. Confirm the correct value with your Microsoft account team before the first run.

What a Wazuh Microsoft Graph integration needs before configuration starts

Six items need to be settled before the ms-graph module is configured: the Wazuh version, the Azure app registration, the Microsoft licenses behind each data source, network reachability, the host that runs the module, and permission consent. Each one changes what data arrives and who has to approve it, so gaps found here are cheaper to close than gaps found after the first pull.

Wazuh release line in use

Standardize on the 4.14 release line, which is the current line, and confirm the exact patch level before you begin. Wazuh 4.14.9 was released on 14 October 2026, and the 4.14 line has seen patch releases roughly every one to two months, so plan to re-check the release notes on the day you start. Record the manager version in your change ticket so later upgrades are traceable.

Wazuh release notes

Azure app registration credentials

The module authenticates as an application registered in Azure using a tenant ID, client ID and client secret. Create a dedicated registration for Wazuh rather than reusing an existing integration, decide who owns the secret, and set an expiry date that your team will actually rotate. Store the secret in your approved secrets system, not in a shared document.

Microsoft licenses for each data source

Each data source depends on a Microsoft license in your tenant. Defender alerts and incidents need the Defender product you have actually bought, Entra ID risk detections depend on Entra ID P1 or P2 features, and Intune audit events and devices depend on Intune. Ask your Microsoft account team or licensing admin to confirm which of these you hold, because an empty data source often means a missing license rather than a broken integration.

Outbound HTTPS to the Graph endpoint

The Wazuh node that runs the module must reach the Microsoft Graph endpoint for your cloud over HTTPS, and it must also reach the Microsoft login endpoint used to obtain tokens. Check egress firewall rules, proxies and DNS from that exact host. Choose the api_type value (global, gcc-high or dod) to match the tenant's cloud, because a mismatch will fail authentication or return no data.

Wazuh host that runs the module

Pick one manager or agent to run the ms-graph module, since the reference recommends a single collector to avoid duplicate logs. Confirm that this host has enough disk and indexer capacity for the extra alert volume, that its clock is synchronized, and that it is covered by your patching and backup routine. If you run a Wazuh server cluster, decide which node owns this job and document it.

ms-graph module reference

Graph permissions confirmed before consent

Do not grant admin consent until you have confirmed the exact Microsoft Graph application permissions required for each resource you plan to enable. Check the list in the ms-graph reference, then compare it with the permissions shown in your Microsoft Entra admin center for the registration. Approve only the resources you need in the first phase, and record who approved each permission and why.

Permission list in the reference

How ms-graph requests move from the Wazuh node to Microsoft Graph and into the indexer

The flow starts at the Wazuh node that runs the ms-graph wodle, which holds the tenant ID, client ID and client secret from the app registration in its configuration. The node requests a token from the Entra ID endpoint for the selected cloud, then calls the Graph resources enabled for collection. Returned events pass through the Wazuh server's decoders and rules before the alerts are stored in the Wazuh indexer and shown in the dashboard. The trust boundary sits between your network and Microsoft's cloud, so check that outbound HTTPS to the correct cloud endpoints is allowed and that only one node runs the module.

Data and credential flow for the ms-graph module across the trust boundary.

Configuring the ms-graph module in the order that avoids most rework

This sequence starts with choosing the one node that runs collection, because the module should run on a single manager or agent to avoid duplicate logs. Each later step adds one dependency, and each step closes with a check that tells you whether it worked before you move on.

  1. Choose the single node that runs collection

    Before you touch Azure, decide which Wazuh manager or agent will run the ms-graph module. The module should run on one node only, since running it on more than one produces duplicate logs. Confirm that the chosen node can reach the Microsoft Graph endpoints for your tenant's cloud, and record the hostname in your change plan. Done when the node is named in the plan and no other node has an ms-graph block planned.

  2. Register the Azure application and record credentials

    In the Microsoft Entra admin center, register an application for Wazuh in the tenant you will collect from. Create a client secret and copy its value at creation, since Azure does not show it again. Store the tenant ID, client ID and secret in your organization's secrets manager. Done when the application appears under App registrations, the secret is listed with an expiry date, and the three values are recorded in the secrets manager.

  3. Grant Graph permissions for each enabled resource

    For each resource you plan to enable, including identity risk detections, security alerts and incidents, secure scores, Purview eDiscovery cases, Intune audit events, managed devices and detected apps, add the matching Microsoft Graph application permission. Grant admin consent for the whole list. Keep the list to what you need, because every permission is access you will have to justify later. Confirm exact permission names in the module reference and check that your tenant has the licenses for the products you select. Done when every permission shows admin consent as granted.

  4. Set api_type to match the tenant cloud

    Set api_type to global, gcc-high or dod, matching the cloud where the tenant is hosted. The module accepts only these three values. Check the tenant's cloud before you choose, rather than assuming it from the company's location. A mismatch is the first thing to rule out if authentication fails in step six. Done when the value in your plan matches the tenant's cloud and the person who confirmed it is named in the change record.

  5. Add the ms-graph block and set the interval

    Add the ms-graph module block to the configuration on the node you chose in step one. Include the tenant ID, client ID, secret, the api_type value from step four, and only the resources you enabled in step three. The default interval is 1d. If you shorten it, set the new value explicitly and record the change, because it affects API call volume and how quickly alerts appear. Done when the configuration validates and the file contains no unrelated changes.

  6. Restart the component and confirm authentication

    Restart or reload the Wazuh component that the module reference describes, on the node from step one. Then read that component's log for ms-graph entries. A successful authentication entry confirms that the credentials, the cloud setting and the tenant are correct. An authentication error sends you back to steps two through four, so fix the credentials or api_type before continuing. Done when the log shows a successful authentication and the error does not repeat on the next run.

  7. Verify collection with a known test event

    Create a controlled event that should produce a record, such as an Intune change on a test device, and note the time it happened. Wait for the next collection cycle, then search the Wazuh dashboard for that event. Check that the resource type and tenant match what you expected. Done when the test event is found and its fields match what you created. If it is missing, check the interval, the permission grants and the node that runs the module, in that order.

  8. Confirm the event is collected only once

    Search for the same test event again and confirm that it appears a single time. Duplicate entries usually mean the module is enabled on a second manager or agent, or that a second copy of the configuration exists in a cluster. Remove the extra block, then repeat the test from step seven. Done when the test event appears once and the change record names the one node that collects Microsoft Graph data.

Which Microsoft Graph resources map to which Wazuh data and licenses

This table compares each Microsoft Graph resource the ms-graph module can collect with the Microsoft product that produces it, the license or role to confirm, and how the data is used for triage in Wazuh. Some resources return nothing until the underlying product is licensed and generating data, so confirm each row in your own tenant before you plan alert rules and retention.

Graph resourceMicrosoft product that produces itLicense or role to confirmTriage use in Wazuh
identityProtection riskDetectionsMicrosoft Entra ID ProtectionConfirm the Entra ID P2 or equivalent license that enables risk detections in your tenantSign-in risk events such as anomalous or leaked-credential signals, used to spot account takeover attempts
Security alertsMicrosoft Defender products that raise alerts into the Microsoft Graph security APIConfirm which Defender workloads are licensed and onboarded, and that the app has the security alert read permissionEndpoint, identity and cloud alerts from several products in one feed, grouped by severity for first-pass review
alerts_v2Microsoft Defender XDR alertingConfirm Defender XDR is licensed and that alert data is populated, and that the app has the alert read permissionNewer alert records that carry richer entity details, used to correlate related activity across identity and endpoints
incidentsMicrosoft Defender XDR incident queueConfirm Defender XDR licensing and that incidents exist in the tenant, and grant incident read permissionGrouped attacks spanning several alerts, used to track scope and status of a suspected intrusion
secureScoresMicrosoft Secure Score across Microsoft 365 and EntraConfirm the tenant has Secure Score data and that the app has the score read permissionPosture trend over time, used as a configuration baseline rather than a real-time alert source
Purview eDiscovery casesMicrosoft Purview eDiscoveryConfirm the Purview license tier for eDiscovery and a role that can view cases, and confirm whether your policy allows this data to leave Microsoft 365Case lifecycle events, used to audit legal hold and export activity; review data handling before collecting
Intune auditEventsMicrosoft IntuneConfirm Intune is enrolled in the tenant and that the app has the audit event read permissionAdministrative changes to device policies and configuration, used to detect unexpected policy edits
managedDevicesMicrosoft Intune device managementConfirm devices are enrolled in Intune and that the app has the managed device read permissionDevice compliance and enrollment state, used to find unmanaged or noncompliant endpoints that Wazuh agents do not cover
detectedAppsMicrosoft Intune device inventoryConfirm Intune inventory is reporting on enrolled devices and that the app has the detected app read permissionSoftware inventory from managed devices, used to compare against vulnerability data and find unexpected software

Choosing api_type for global, GCC High and DoD tenants

Set api_type to global when the Microsoft 365 and Entra ID tenant is a commercial tenant in the public Microsoft cloud. This is the environment most businesses use, and it is the setting that matches the module's default collection interval of 1d. Confirm the tenant's cloud before you assume this value, because an organization can run more than one tenant.

  • Tenant check: Open the tenant overview in the Entra admin center and confirm it is a commercial tenant before you set global in the configuration.
  • Endpoints: The module calls the Microsoft Graph endpoints for the public cloud. Confirm the exact base address and sign-in authority with Microsoft's documentation before you open outbound firewall rules.
  • App registration: Register the application in the commercial Entra admin center, create a client secret, and record the tenant ID and client ID that the ms-graph block requires.
  • Consent: Add the Microsoft Graph application permissions for each resource you enable, then have an administrator with tenant-wide consent rights grant admin consent in the same tenant.

Before you finish, check the tenant's data location and residency commitments against your compliance team's approved list, using the Microsoft Entra data residency documentation.

Avoiding duplicate collection when several managers or agents exist

The Wazuh ms-graph reference says to run the module on a single manager or agent, because each enabled copy of the module polls the same Microsoft Graph resources and writes the same events into the indexer. The one collector per tenant rule is the main control in this integration, and it should be decided before the first run rather than discovered afterward. Duplicate logs look like identical Defender alerts, Entra ID risk detections or Intune audit events that share the same resource identifier and timestamp but arrive under two agent or manager names. In the dashboard, alert counts for a single Defender incident can double, and an incident timeline can show the same step twice, which makes responders think an attacker repeated an action when the evidence is only a collection artifact.

Multi-node layouts make this mistake easy to introduce. A Wazuh server cluster shares rules, decoders and agent configuration across nodes, so a ms-graph block placed in a shared configuration can run on every node, and a second block added on a different manager for another team's tenant can point at the same tenant ID. Confirm which settings your deployment synchronizes across cluster nodes and which it does not, then keep the ms-graph configuration on exactly one host per tenant, even if the cluster itself is healthy. Agent-based collection has the same risk when an agent group is pushed to several endpoints. Your team should own one named collector for each tenant and record it in a configuration inventory that lists the tenant, api_type, collector host, enabled resources and the person accountable for changes.

Verify the control with a count, not a visual check. After the first few days of collection, query the indexer for events grouped by the resource identifier and the event timestamp, and look for any pair of identical records that came from different hosts. A non-zero result means two collectors are active or a configuration was copied. Repeat the query after each change to the configuration inventory, and treat any new collector as a change that needs approval. The exact index pattern and field names depend on your Wazuh version, so confirm them in your own environment before you write the query.

Protecting the app registration, the secret and the collected identity data

The ms-graph module gives one Azure app registration read access to identity, security and device data, so that registration, its secret and the Wazuh indexes holding the results are one protection surface. The cards below cover the controls to set before the first collection runs and the reviews to keep after go-live.

Scope permissions to each resource

Grant the app registration only the Microsoft Graph permissions for the resources you enable in the ms-graph block: identity protection risk detections, security alerts, incidents, secure scores, Intune audit events, managed devices and detected apps, and Purview eDiscovery cases if you use them. Each resource you leave out is data the app cannot read, so review the permission list against the ms-graph configuration line by line before admin consent. Confirm the exact permission names in Microsoft's current Graph documentation rather than copying them from older guides.

ms-graph reference

Keep the client secret out of plain config

The module authenticates with the tenant ID, client ID and client secret, so the secret is the credential that unlocks every enabled resource. Check whether your Wazuh hardening standard allows a file with restricted ownership, a secrets manager or an environment-based approach, and avoid pasting the value into shared runbooks or tickets. Limit read access to the manager configuration to the people and service accounts that need it.

Rotate the secret and record expiry

A client secret has a fixed expiry set when it is created, and when it lapses the collection stops without any alert in the security content. Record the expiry date in your certificate or secret inventory, set a reminder well before it, and plan the rotation as a change: create the new secret, update the manager, confirm a successful collection run in the logs, then remove the old secret. Ask whether your identity team prefers certificate credentials for the app registration.

Restrict access to the identity data

Entra risk detections, sign-in-linked alerts and device inventory are sensitive in their own right, and they become easier to misuse once they sit in the Wazuh indexer and dashboard. Create indexer and dashboard roles that cover only the identity and security indexes, and avoid giving broad analyst access to every Wazuh index by default. Review the role mapping after each onboarding, including any single sign-on role mapping in use.

Review who can edit the ms-graph block

A small change to the ms-graph block can widen the resource list, change the api_type or add a second collector that duplicates logs. Restrict write access to the manager configuration, keep it under version control with reviews, and watch for unexpected edits in file integrity monitoring on the manager. Run the module on one manager or agent only, as the reference advises, and record which one that is.

Decide retention before Intune and eDiscovery data arrive

Intune audit events can reveal administrator actions and device details, and Purview eDiscovery cases may point to legal matters or personal content. Before collection starts, decide how long each index keeps these records, who may search them, and whether they belong in the same index as lower-sensitivity alerts. Confirm the retention and legal hold requirements with your privacy, legal and records owners, because the Wazuh defaults may not match them.

Failures in the ms-graph integration, their likely cause and the fix

This table pairs each common symptom in the ms-graph integration with its likely cause and the fix to try first. Read it from the symptom you see, then check the cause in the order listed, because several symptoms share a root cause. Confirm log locations and message text in the Wazuh logs for your version before acting on any row.

SymptomLikely causeFix
Authentication fails with an error at startupTenant ID or client ID mistyped, or the values come from a different app registrationCopy the tenant ID and client ID from the Azure app registration overview, then re-enter them in the ms-graph block and restart the manager
Authentication fails after the integration previously workedClient secret expired or was replaced, or the secret value was copied from the wrong fieldCreate a new client secret in the app registration, store the value (not the secret ID) in the configuration, and restart the component
Authentication succeeds in one tenant but not in a government tenantapi_type is set to global while the tenant is in US government cloud, or to gcc-high or dod for a commercial tenantSet api_type to match the cloud the tenant runs in, then confirm the endpoint in the logs matches that cloud
One resource returns no events while others return dataThe Microsoft product or license behind that resource is not in use, so the API has nothing to returnConfirm the product is licensed and populated in the tenant, then wait for data to appear in the portal before expecting events in Wazuh
One resource returns an access or forbidden errorThe application permission for that resource was not granted or admin consent was not givenAdd the missing Microsoft Graph application permission in the app registration, grant admin consent, and restart the module
No new events appear for a long periodThe run interval is still the default 1d, or the manager process or the module is stoppedCheck the configured interval against expectations, confirm the Wazuh manager service is running, and review the module messages in the logs for the last run
The same events appear more than once in the indexerThe ms-graph module is enabled on more than one manager or agent, so each node collects the same dataEnable the module on a single node, remove the block from the others, and delete the duplicate entries only after confirming the source
Requests time out or fail to connect to Microsoft endpointsA proxy, firewall or egress rule blocks outbound HTTPS to the Microsoft login and Graph hosts for the selected cloudAllow outbound HTTPS to the required login and Graph endpoints from the node running the module, and test connectivity from that host

What Microsoft licensing and data residency decide before you enable resources

The data a Wazuh integration can collect depends on what the Microsoft tenant actually contains, and the license tier is the first thing to confirm. Microsoft Entra ID Free ships with Microsoft cloud subscriptions such as Azure and Microsoft 365, and it provides multifactor authentication, single sign-on to SaaS apps, basic reports and self-service password change. Entra ID P1 is listed from $7.00 per user per month and P2 from $10.00 per user per month with annual commitment, according to the Microsoft Entra pricing page. Entra Suite is listed from $12.00 per user per month and requires an existing P1 subscription. These are list prices from that source. Your agreement may differ, so ask your Microsoft partner or account team for the price that applies to your tenant. Before enabling any ms-graph resource, check which Entra and Microsoft 365 licenses are assigned, because the identity risk and Intune data you expect to collect may depend on a tier you do not hold.

Tenant data location is set when the tenant is created and cannot be changed afterward. Microsoft maps it from the country or region chosen at creation, and Entra multifactor authentication data is stored in North America and or the tenant's geo-location, as described in the Microsoft Entra data residency documentation. This matters for Wazuh because the risk detections, alerts and Intune audit events you pull will originate in that location, and your data handling review will need to record where the source data lives before it is copied to your manager. Confirm the tenant's home geography with your Entra administrator, and confirm whether the tenant is a US government or other sovereign cloud, since the api_type setting in the module must match the cloud the tenant runs in.

Microsoft's data boundary commitments also depend on how the customer bought the service. Microsoft's EU Data Boundary, for example, excludes customers who purchased Multi-Geo Capabilities even when their tenant is listed in an EU or EFTA country, so a tenant's listed location alone does not settle the question. Ask your Microsoft account team to confirm which commitments apply to your specific subscriptions and write the answer into the data flow document before the integration goes live. The reader should record the tenant ID, the license tiers in use, the tenant's data location and any boundary exclusions in one place, since those facts determine what Wazuh receives and what your compliance reviewers will ask about.

Questions buyers ask about cost, effort and doing this in-house

What drives the effort of a Microsoft Graph integration with Wazuh?

The effort follows the shape of your Microsoft estate more than the Wazuh configuration itself. The main drivers are the number of Entra ID tenants, how many ms-graph resources you enable (risk detections, security alerts, incidents, Purview eDiscovery cases, Intune audit events and managed devices), the licensing state of each tenant, whether you run in the global cloud, GCC High or DoD, and how much testing your evidence process requires. Each tenant needs its own app registration and secret handling, and each resource needs its own validation of fields and alert rules. Ask any quote to list tenants, resources and cloud environments separately so the scope can be compared line by line.

Does self-hosted Wazuh have a license fee?

The self-hosted Wazuh software is open source and carries no license fee. It is distributed under the GNU General Public License version 2, with an exception that permits linking with the OpenSSL library. Wazuh Cloud is a separate managed, cloud-delivered XDR and SIEM service, sold in Small, Medium, Large and Custom tiers, and every paid plan includes at least Standard support. Wazuh Cloud offers a 14-day free trial that needs no credit card. Your costs for a self-hosted deployment are therefore infrastructure, storage, staff time and any services you buy, not a Wazuh license.

How long does a Microsoft Graph integration take to set up?

The duration depends on your scope and on your tenant. A single tenant with a few resources enabled takes less time than several tenants across commercial and government clouds with Intune and Purview data in scope. Time is also spent waiting on Entra and Microsoft 365 admins for consent, role assignments and a test window. DeployOpen works on fixed-scope engagements, so the timeline is agreed in writing before work starts, and a fixed-scope quote follows from that written scope. Ask for the timeline to be split into discovery, app registration, collection tuning, validation and handover.

What does the work need from our team?

The work needs people with the right access and time at specific points. Expect to provide administrative access to Microsoft Entra and Microsoft 365 that is sufficient to register the application and grant the Graph permissions the resources require. You need a named Wazuh owner who can approve configuration changes and receive alerts, and a test window in which collection can be switched on and checked without disrupting production monitoring. Your security and compliance leads should confirm which evidence they need to keep, because that decides which resources and retention rules are configured.

Can our internal team set up the ms-graph module without a partner?

Yes, an internal team with Wazuh and Microsoft 365 experience can build this alone. The Wazuh ms-graph module reference describes the required settings, including the tenant ID, client ID and secret, the api_type value for your cloud and the interval. Your team will still need a test tenant, a runbook for secret rotation and a repeatable retest after each Wazuh or tenant change. Plan for the Wazuh server or agent that runs the module to be the only place collection is enabled, so duplicate logs do not appear. Teams that prefer outside help can ask DeployOpen for a fixed-scope engagement that covers the same steps.

Which parts of the Microsoft licensing affect what we can collect?

Licensing decides which data exists in each tenant, so confirm it before scoping. Microsoft Entra ID Free is included with Microsoft cloud subscriptions such as Azure and Microsoft 365, while Entra ID P1 and P2 add capabilities listed on Microsoft's pricing page. Entra ID P1 is included in Microsoft 365 E3 and Business Premium, and P2 in Microsoft 365 E5. Purview eDiscovery exports require a Microsoft 365 E3 or E5 license, so a Business tenant may not produce the same eDiscovery data. Confirm your SKUs with your Microsoft account team and the current pricing page before the scope is written.

What testing should we expect before we rely on the integration as evidence?

Test that each enabled resource produces the events you expect, that the alerts reach the dashboard with the fields your rules use, and that no event is collected twice. Confirm the interval and the sovereign cloud setting match your tenant, and check that the collection still works after a secret rotation. If your evidence process depends on this data, record the test results with dates and the configuration version, so an auditor or your own compliance lead can trace each control to a working collection path. Ask for the test plan and retest steps in the written scope.

How DeployOpen scopes, delivers and supports Wazuh Microsoft integrations

DeployOpen plans and implements self-hosted Wazuh in infrastructure you control, including the ms-graph module that pulls Defender, Entra ID and Intune data into the Wazuh server. We agree the scope, build and test the collection in your tenant, document the configuration, and hand it to your team with a path for ongoing support.

How we scope

  • Written scope lists which Graph resources to collect, such as Defender alerts, Entra risk detections and Intune audit events.
  • We confirm the Microsoft cloud your tenant runs in, including whether the api_type should be global, gcc-high or dod.
  • Scope records which single manager or agent runs the module so collection is not duplicated across the cluster.

How we build

  • We register the Azure application, set the API permissions and secret handling, and document each value you need to issue.
  • We configure the ms-graph module interval and resource list, then test that each enabled resource produces expected alerts.
  • We check overlap with any existing Microsoft 365 or Azure collection so the same events are not ingested twice.

How we hand over

  • Deliverables include the configuration, app registration record, resource inventory and the list of enabled resources with reasons.
  • Your team receives a runbook covering secret rotation, interval changes and steps to disable a resource safely.
  • We walk your security and identity staff through test alerts so they know what each source produces in the dashboard.

How we support

  • Ongoing support, Wazuh upgrades and continuous testing are available as retainers after the fixed-scope work ends.
  • Retainers can cover checks after Wazuh patch releases, since the module configuration may need review during upgrades.
  • We can retest collection after changes to tenant settings, Graph resources or the Wazuh server layout, and report the results in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.