---
id: microsoft-graph-security-api-source
title: Microsoft Graph Security API Source
sidebar_label: Microsoft Graph Security API
tags:
- cloud-to-cloud
- microsoft-graph-security-api
description: The Microsoft Graph Security API Source provides a secure endpoint to receive alerts from the Microsoft Graph Security API endpoint.
slug: /help/docs/send-data/hosted-collectors/cloud-to-cloud-integration-framework/microsoft-graph-security-api-source/
canonical: https://www.sumologic.com/help/docs/send-data/hosted-collectors/cloud-to-cloud-integration-framework/microsoft-graph-security-api-source/
---
import ForwardToSiem from '/docs/reuse/forward-to-siem.md';
import useBaseUrl from '@docusaurus/useBaseUrl';
The Microsoft Graph Security API Source provides a secure endpoint to receive alerts from the [Microsoft Graph](https://docs.microsoft.com/en-us/graph/overview) Security API endpoint. It securely stores the required authentication, scheduling, and state tracking information. One threat event is reported for each affected device.
:::note
* Upgrade the Microsoft Graph Security API source to the latest version 2.x.x for seamless data collection experience. Older versions may be discontinued, so upgrading ensures continued support and the latest improvements. For upgrade instructions, see [Cloud-to-Cloud Source Versions](/docs/send-data/hosted-collectors/cloud-to-cloud-integration-framework/cloud-to-cloud-source-versions/)
* This source does not support Microsoft GCC High environments. For GCC High-compatible log collection, see the [MS Office 365 Audit Source](/docs/send-data/hosted-collectors/microsoft-source/ms-office-audit-source/).
:::
## Data collected
| Polling Interval | Data |
| :--- | :--- |
| 5 min | [Alerts](https://learn.microsoft.com/en-us/graph/api/security-list-alerts_v2?view=graph-rest-1.0&tabs=http) |
## Setup
### Vendor configuration
You need to create and register a service application within the [Azure Active Directory portal](https://aad.portal.azure.com/). The user creating the service application does not need to be an administrator, however, an administrator will be needed to grant the application the appropriate permissions to the Graph Security API.
The following steps show you how to create a service application:
1. Log into the [Azure Active Directory Portal](https://aad.portal.azure.com/)
1. Select **Azure Active Directory** in the left menu.
1. Select **App Registrations**.
1. Select **New Registration**. Go through the [registration process](https://docs.microsoft.com/en-us/graph/auth-register-app-v2), providing a name for the application. Selecting **Accounts in this organizational directory only** is sufficient.
1. After the application is registered ensure you copy the **Application (client) ID** and **Directory (tenant) ID** displayed on the **Overview** page. These are needed when creating the Source in Sumo Logic.
1. Within the application configuration page, select **Certificates and Secrets** and create an [Application Client Secret Key](https://docs.microsoft.com/en-us/graph/notifications-integration-app-registration#app-certificates-and-secrets).
1. Copy the Client Secret value, you'll need it when creating the Source in Sumo Logic.
1. Request the appropriate [permissions for the application](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#application-permission-to-microsoft-graph). Click on **API Permissions**, then **Add a permission** and select **Microsoft Graph**.
You need to find and select the **SecurityAlert.Read.All**, **SecurityIncident.Read.All**, and **SecurityEvents.Read.All** permissions. See [this list](https://docs.microsoft.com/en-us/graph/permissions-reference#security-permissions) to view all available security permissions.
:::note
An Administrator must approve (grant) these permissions before the Source will function.
:::
1. Follow the steps below to enable the Application permission role.
- In the Manage menu, select App roles.
- Click the **Create app role** tab.
- **Display name**. Enter the display name for the role.
- **Allowed member types**. Select Applications as the allowed member type.
- **Value**. Enter `SecurityAlert.Read.All` as the value.
- **Description**. Enter a brief description.
- Select the checkbox to enable the app role.
- Click **Apply**.
### Source configuration
When you create a Microsoft Graph Security API Source, you add it to a Hosted Collector. Before creating the Source, identify the Hosted Collector you want to use or create a new Hosted Collector. For instructions, see [Configure a Hosted Collector](/docs/send-data/hosted-collectors/configure-hosted-collector).
To configure a Microsoft Graph Security API Source:
1. [**New UI**](/docs/get-started/sumo-logic-ui). In the Sumo Logic main menu select **Data Management**, and then under **Data Collection** select **Collection**. You can also click the **Go To...** menu at the top of the screen and select **Collection**.
[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Collection > Collection**.
1. On the Collectors page, click **Add Source** next to a Hosted Collector.
1. Search for and select **Microsoft Graph Security API**.
1. Enter a **Name** for the Source. The description is optional.
1. (Optional) For **Source Category**, enter any string to tag the output collected from the Source. Category metadata is stored in a searchable field called `_sourceCategory`.
1. **Forward to SIEM**. Check the checkbox to forward your data to [Cloud SIEM](/docs/cse/).
1. (Optional) **Fields.** Click the **+Add Field** link to define the fields you want to associate, each field needs a name (key) and value.
*
A green circle with a check mark is shown when the field exists and is enabled in the Fields table schema.
*
An orange triangle with an exclamation point is shown when the field doesn't exist in the Fields table schema. In this case, you'll see an option to automatically add or enable the nonexistent fields to the Fields table schema. If a field is sent to Sumo Logic but isn’t present or enabled in the schema, it’s ignored and marked as **Dropped**.
1. Enter the **Directory (tenant) ID**, **Application (client) ID**, and **Application Client Secret Value** you got from the Application you created in the [Vendor configuration](#vendor-configuration) section.
1. The **Polling Interval** is set to 5 minutes by default. You can adjust it based on your needs.
1. **Processing Rules for Logs**. Configure any desired filters, such as allowlist, denylist, hash, or mask, as described in [Create a Processing Rule](/docs/send-data/collection/processing-rules/create-processing-rule).
1. When you are finished configuring the Source, click **Submit**.
:::info
After configuring the Microsoft Graph Security API source, you can install relevant Sumo Logic Azure security apps to visualize and analyze the collected data through prebuilt dashboards and monitor alerts.
Depending on your security monitoring needs, you can choose from several apps such as [Microsoft Defender for Endpoint](/docs/integrations/microsoft-azure/microsoft-defender-for-endpoint), [Microsoft Defender for Identity](/docs/integrations/microsoft-azure/azure-security-microsoft-defender-for-identity/), [Microsoft Defender for Office 365](/docs/integrations/microsoft-azure/azure-security-microsoft-defender-for-office-365), [Microsoft Defender for Cloud Apps](/docs/integrations/microsoft-azure/azure-security-microsoft-defender-for-cloud-apps), [Microsoft Entra ID Protection](/docs/integrations/microsoft-azure/azure-security-microsoft-entra-id-protection), or [Microsoft Graph Security](/docs/integrations/saas-cloud/microsoft-graph-security-v2).
:::
#### Base URL
Internally, the source will use the following base URL depending on the respective cloud region:
| BASE_URL | Value |
| :--- | :--- |
| Azure Government | https://graph.microsoft.us |
| Azure Global Service | https://graph.microsoft.com |
## Metadata fields
| Field | Value | Description |
| :--- | :--- | :--- |
| `_siemForward` | (true \| false) | Set to `true` when **Forward To SIEM** is checked. |
| `_siemVendor` | `Microsoft` | Set when **Forward To SIEM** is checked. |
| `_siemProduct` | `Graph Security API` | Set when **Forward To SIEM** is checked. |
| `_siemFormat` | `JSON` | Set when **Forward To SIEM** is checked. |
| `_siemEventID` | `{{category}}` | This field is dynamically set based on the value of the category key in the log. |
## JSON schema
Sources can be configured using UTF-8 encoded JSON files with the Collector Management API. See [how to use JSON to configure Sources](/docs/send-data/use-json-configure-sources) for details.
| Parameter | Type | Value | Required | Description |
|:--|:--|:--|:--|:--|
| schemaRef | JSON Object | `{"type":"Microsoft Graph Security API"}` | Yes | Define the specific schema type. |
| sourceType | String | `"Universal"` | Yes | Type of source. |
| config | JSON Object | [Configuration object](#configuration-object) | Yes | Source type specific values. |
### Configuration Object
| Parameter | Type | Required | Default | Description | Example |
|:--|:--|:--|:--|:--|:--|
| name | String | Yes | `null` | Type a desired name of the source. The name must be unique per Collector. This value is assigned to the [metadata](/docs/search/get-started-with-search/search-basics/built-in-metadata) field `_source`. | `"mySource"` |
| description | String | No | `null` | Type a description of the source. | `"Testing source"`
| category | String | No | `null` | Type a category of the source. This value is assigned to the [metadata](/docs/search/get-started-with-search/search-basics/built-in-metadata) field `_sourceCategory`. See [best practices](/docs/send-data/best-practices) for details. | `"mySource/test"`
| fields | JSON Object | No | `null` | JSON map of key-value fields (metadata) to apply to the Collector or Source. Use the boolean field _siemForward to enable forwarding to SIEM.|`{"_siemForward": false, "fieldA": "valueA"}` |
| tenant_id | String | Yes | `null` | The Directory (tenant) ID of the Azure AD application. | |
| secret_key | Boolean | Yes | `null` | The Application Client Secret Key created with access to the Azure AD application. | |
| application_id | String | Yes | `null` | The Application (client) ID of the Azure AD application. |
| azure_gov | Boolean | No | false | Set to true if Azure tenant uses Azure Government region. | |
| polling_interval | Integer | Yes | 5 | This sets how many minutes the Source checks for new data. | |
### JSON example
```json reference
https://github.com/SumoLogic/sumologic-documentation/blob/main/static/files/c2c/microsoft-graph-security-api/example.json
```
### Terraform example
```sh reference
https://github.com/SumoLogic/sumologic-documentation/blob/main/static/files/c2c/microsoft-graph-security-api/example.tf
```
## Troubleshooting
### 403 Error with "Account is not provisioned"
The "**Unauthorized request - Account is not provisioned**" error occurs when Microsoft Defender For Cloud hasn't started collecting alerts. This issue is explained [here](https://stackoverflow.com/questions/79380921/microsoft-graph-api-security-alerts-v2-gives-error-unauthorized-request-acco). Make sure to go to your Microsoft Defender for Cloud account, click on **Incidents** and then **Alerts**. If it's the first time, you will see a screen loading the information. Once you see the list of alerts screen, restart your source and you should no longer see the error.
## FAQ
:::info
Click [here](/docs/c2c/info) for more information about Cloud-to-Cloud sources.
:::