Skip to main content

Microsoft 365 Defender

This guide explains how to integrate Microsoft 365 Defender (Microsoft Defender XDR) with RedCarbon.

Overview​

The Microsoft 365 Defender integration allows RedCarbon to ingest incidents and alerts from the unified Microsoft XDR platform, including Defender for Endpoint, Identity, and Office 365.

The connector talks exclusively to Microsoft Graph (https://graph.microsoft.com/v1.0) using an app-only OAuth2 client credentials flow. No other Microsoft host is contacted.

API Endpoints Used​

Authentication​

MethodEndpoint
POSThttps://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token

Scope https://graph.microsoft.com/.default, grant type client_credentials (app-only, no signed-in user).

Microsoft Graph — base https://graph.microsoft.com/v1.0​

MethodEndpointWhen it is called
GET/security/incidents?$top=&$skip=&$expand=alerts&$filter=Ingestion when the source is configured for incidents (alerts expanded)
PATCH/security/incidents/{incidentId}Incident mirroring / closure (status: resolved plus resolvingComment)
GET/security/alerts_v2?$top=&$skip=&$filter=Ingestion when the source is configured for alerts
PATCH/security/alerts_v2/{alertId}Alert mirroring / closure (status: resolved)
POST/security/runHuntingQueryAlert enrichment for alerts carrying additionalData.Query, and on-demand hunting

Enrichment queries are sent verbatim with | take 10 appended, so an enriched alert carries at most 10 result rows. A failed enrichment query is logged and does not fail the ingestion of the incident.

Configuration​

To configure the integration, you need to register an application in Azure Active Directory (Entra ID) and grant it permissions to access Microsoft 365 Defender APIs.

Step 1: Register an Application​

  1. Log in to the Azure Portal with an account that has the Global Administrator role.
  2. Navigate to Azure Active Directory > App registrations > New registration.
  3. Enter a name (e.g., RedCarbon-Defender).
  4. Click Register.

App Registration

Step 2: Grant API Permissions​

  1. On the application page, select API Permissions.

  2. Click Add permissions and add the following permissions.

  3. Select Microsoft Graph > Application permissions (the connector runs app-only; delegated permissions are not used).

  4. Add the following Microsoft Graph application permissions:

    PermissionCoversRequired for
    SecurityIncident.ReadWrite.AllGET and PATCH on /security/incidentsIncident ingestion and ticket mirroring back to Defender. SecurityIncident.Read.All is enough if incident closure from RedCarbon is not needed.
    SecurityAlert.ReadWrite.AllGET and PATCH on /security/alerts_v2Alert ingestion and alert closure. SecurityAlert.Read.All is enough if alert closure from RedCarbon is not needed.
    ThreatHunting.Read.AllPOST /security/runHuntingQueryAlert enrichment with KQL hunting queries and on-demand hunting from the RedCarbon platform.

    SecurityIncident.* also covers the alerts returned through $expand=alerts on incidents, but it does not replace SecurityAlert.* when the source ingests alerts directly (Product set to alerts).

    No permission under Microsoft Threat Protection (the legacy api.security.microsoft.com API) is required: the connector no longer uses that API.

  5. Important: Click Grant admin consent for [Organization Name] to activate the permissions.

Grant Permissions Grant Consent

Step 3: Create a Client Secret​

  1. Navigate to Certificates & secrets.
  2. Click New client secret.
  3. Add a description and expiration period.
  4. Click Add.
  5. Copy the Secret Value immediately.

Step 4: Gather Required IDs​

From the Overview page of your application, copy:

  • Application (Client) ID
  • Directory (Tenant) ID

Overview

Step 5: Configure RedCarbon​

  1. Log in to the RedCarbon Dashboard.

  2. Navigate to the customer's Integrations page.

  3. Select Microsoft 365 Defender.

  4. Paste the Tenant ID, Client ID, and Client Secret.

  5. Configure the optional ingestion settings:

    FieldDefaultDescription
    ProductIncidentsSet to alerts to ingest standalone alerts instead of incidents.
    Product FiltersAll sourcesRestrict ingestion to specific service sources. In incident mode, drops incidents whose alerts don't match any listed source. In alert mode, filters directly via an OData query.

    Valid service sources for Product Filters:

    • microsoftDefenderForEndpoint
    • microsoftDefenderForIdentity
    • microsoftDefenderForCloudApps
    • microsoftDefenderForOffice365
    • microsoft365Defender
    • azureAdIdentityProtection
    • microsoftAppGovernance
    • dataLossPrevention
    • microsoftDefenderForCloud
    • microsoftSentinel
    • microsoftThreatIntelligence
  6. Click Save and then Test.

Configure RedCarbon

Severity Mapping​

Original SeverityRedCarbon Score
Informational0
Unspecified0
Low10
Medium40
High70
Critical90

Any other value maps to 40.