Collect Microsoft Graph activity logs
Overview
This parser extracts fields from Microsoft Graph activity logs, transforming them into the Unified Data Model (UDM). It initializes UDM fields, parses the payload, extracts timestamps, maps various properties to UDM fields, handles IP addresses and ports, and categorizes the event type based on the presence of principal and network information.
Before you begin
Ensure that you have the following prerequisites:
- Google SecOps instance.
- Privileged access to Microsoft Entra ID and Azure storage accounts.
Configure Azure storage account
- In the Azure console, search for storage accounts.
- Click Create.
- Specify values for the following input parameters: - Subscription: select the subscription.
- Resource Group: select the resource group.
- Region: select the region.
- Performance: select the performance level that you want (standard is recommended).
- Redundancy: select the redundancy level that you want (GRS or LRS is recommended).
- Storage account name: enter a name for the new storage account.
 
- Click Review + create.
- Review the overview of the account and click Create.
- From the Storage Account Overviewpage, select submenu Access keysin Security + networking.
- Click Shownext to key1or key2
- Click Copy to clipboardto copy the key.
- Save the key in a secure location for future reference.
- From the Storage Account Overviewpage, select submenu Endpointsin Settings.
- Click Copy to clipboardto copy the Blob serviceendpoint URL (for example, https://.blob.core.windows.net).
- Save the endpoint URL in a secure location for future reference.
Configure Microsoft Graph activity logs export to storage account
- In the Azure console, search for Entra ID.
- Select Monitoring > Diagnostic settings.
- Click + Add diagnostic setting.
- Give the setting a unique name (for example, ms-graph-activity).
- Select the MicrosoftGraphActivityLogcategory you want to export to Google SecOps.
- Under Destination details, select Archive to a storage account.
- Select your subscription and the storage account you created in the previous step.
- Click Save.
How to set up the Microsoft Graph Activity logs
- Go to SIEM Settings > Feeds.
- Click Add New Feed.
- On the next page, click Configure a single feed.
- In the Feed namefield, enter a name for the feed; for example, Microsoft Graph Activity Logs.
- Select Microsoft Azure Blob Storage V2as the Source type.
- Select Microsoft Graph Activity Logsas the Log type.
- Click Next.
-  Specify values for the following input parameters: -  Azure uri: the blob endpoint URL. ENDPOINT_URL/BLOB_NAMEReplace the following: -  ENDPOINT_URL: the blob endpoint URL (https://<storageaccountname>.blob.core.windows.net)
-  BLOB_NAME: the name of the blob (for example, insights-logs-)
 
-  
-  Source deletion options: select deletion option according to your preference. 
 - Maximum File Age: Files modified in the last number of days. Default is 180 days.
- Shared key: the access key to the Azure Blob Storage.
 
-  
-  Click Next. 
-  Review your new feed configuration in the Finalizescreen, and then click Submit. 
UDM Mapping Table
| Log Field | UDM Mapping | Logic | 
|---|---|---|
| callerIpAddress | principal.asset.ip | The raw log field callerIpAddressis copied to the UDM field. | 
| callerIpAddress | principal.ip | The raw log field callerIpAddressis copied to the UDM field. | 
| category | security_result.category_details | The raw log field categoryis copied to the UDM field. | 
| correlationId | security_result.detection_fields.value | The raw log field correlationIdis copied to the UDM field, where key iscorrelationId. | 
| Level | security_result.detection_fields.value | The raw log field Levelis converted to string and copied to the UDM field, where key isLevel. | 
| operationName | metadata.product_event_type | The raw log field operationNameis copied to the UDM field. | 
| operationVersion | additional.fields.value.string_value | The raw log field operationVersionis copied to the UDM field, where key isoperationVersion. | 
| properties.apiVersion | metadata.product_version | The raw log field properties.apiVersionis copied to the UDM field. | 
| properties.appId | target.resource.product_object_id | The raw log field properties.appIdis copied to the UDM field. | 
| properties.atContent | additional.fields.value.string_value | The raw log field properties.atContentis copied to the UDM field, where key isatContent. | 
| properties.clientAuthMethod | extensions.auth.auth_details | Based on the value of properties.clientAuthMethod, the UDM field is set to "Public Client" (0), "Client ID/Client Secret" (1), or "Client Certificate" (2). | 
| properties.clientRequestId | additional.fields.value.string_value | The raw log field properties.clientRequestIdis copied to the UDM field, where key isclientRequestId. | 
| properties.durationMs | network.session_duration.seconds | The raw log field properties.durationMsis converted from milliseconds to seconds and copied to the UDM field. | 
| properties.identityProvider | security_result.detection_fields.value | The raw log field properties.identityProvideris copied to the UDM field, where key isidentityProvider. | 
| properties.ipAddress | principal.asset.ip | The IP address from the raw log field properties.ipAddressis extracted and copied to the UDM field. | 
| properties.ipAddress | principal.ip | The IP address from the raw log field properties.ipAddressis extracted and copied to the UDM field. | 
| properties.location | principal.location.name | The raw log field properties.locationis copied to the UDM field. | 
| properties.operationId | security_result.detection_fields.value | The raw log field properties.operationIdis copied to the UDM field, where key isoperationId. | 
| properties.requestMethod | network.http.method | The raw log field properties.requestMethodis copied to the UDM field. | 
| properties.requestId | metadata.product_log_id | The raw log field properties.requestIdis copied to the UDM field. | 
| properties.responseSizeBytes | network.received_bytes | The raw log field properties.responseSizeBytesis converted to an unsigned integer and copied to the UDM field. | 
| properties.responseStatusCode | network.http.response_code | The raw log field properties.responseStatusCodeis converted to an integer and copied to the UDM field. | 
| properties.roles | additional.fields.value.string_value | The raw log field properties.rolesis copied to the UDM field, where key isroles. | 
| properties.scopes | additional.fields.value.string_value | The raw log field properties.scopesis copied to the UDM field, where key isScopes. | 
| properties.servicePrincipalId | principal.user.userid | The raw log field properties.servicePrincipalIdis copied to the UDM field ifproperties.userIdis empty. | 
| properties.signInActivityId | network.session_id | The raw log field properties.signInActivityIdis copied to the UDM field. | 
| properties.tenantId | metadata.product_deployment_id | The raw log field properties.tenantIdis copied to the UDM field. | 
| properties.tokenIssuedAt | additional.fields.value.string_value | The raw log field properties.tokenIssuedAtis copied to the UDM field, where key istokenIssuedAt. | 
| properties.userAgent | network.http.user_agent | The raw log field properties.userAgentis copied to the UDM field. | 
| properties.userId | principal.user.userid | The raw log field properties.userIdis copied to the UDM field. | 
| properties.wids | security_result.detection_fields.value | The raw log field properties.widsis copied to the UDM field, where key iswids. | 
| resourceId | target.resource.attribute.labels.value | The raw log field resourceIdis copied to the UDM field, where key isResource ID. | 
| resultSignature | additional.fields.value.string_value | The raw log field resultSignatureis copied to the UDM field, where key isresultSignature. | 
| time | metadata.event_timestamp | The raw log field timeis parsed and converted to a timestamp and copied to the UDM field. The UDM fieldevent.idm.read_only_udm.metadata.event_typeis set to "NETWORK_HTTP" ifhas_principalis true andnetwork.httpis not empty, "STATUS_UPDATE" ifhas_principalis true andnetwork.httpis empty, or "GENERIC_EVENT" otherwise. The UDM field is set to "Microsoft Graph". The UDM field is set to "Microsoft". | 
Need more help? Get answers from Community members and Google SecOps professionals.

