Collect Microsoft Dynamics 365 User Activity logs
This document describes how you can collect Microsoft Dynamics 365 User Activity logs by setting up a Google SecOps feed using Microsoft Azure Blob Storage V2.
Microsoft Dynamics 365 is a cloud-based business applications platform that combines CRM and ERP capabilities. User activity logs capture actions and events performed by users within Dynamics 365 applications, including entity operations, data access, and administrative activities. Dynamics 365 is built on Microsoft Dataverse, which provides comprehensive audit logging through the Microsoft Purview unified audit log.
Before you begin
Ensure that you have the following prerequisites:
- A Google SecOps instance
- Privileged access to Microsoft Azureportal with permissions to:
- Create Storage Accounts
- Configure Azure Synapse Link for Dataverse
- Manage access keys
- A Microsoft 365 subscription that includes Dynamics 365
- System Administrator security role in the Dynamics 365 environment
-
Global Administrator or Power Platform administrator access to the Power Platform admin center
Enable Dataverse auditing
Before exporting Dynamics 365 user activity logs, you must enable auditing in the Power Platform admin center.
- Sign in to the Power Platform admin center .
- In the navigation pane, select Environments.
- Select the environment that contains your Dynamics 365 deployment.
- In the command bar, select Settings.
- Expand Audit and logsand select Audit settings.
- Under Auditing, enable the following options:
- Start Auditing: Activates auditing for the environment.
- Log access: Tracks user sign-ins.
- Read logs: Captures most user activities and events.
- Set the Retention policyfor auditing logs based on your requirements.
- Select Saveto apply the changes.
Enable table-level auditing
- Sign in to Power Apps and select the environment.
- In the command bar, select Settings > Advanced settings.
- Go to Settings > Customizations > Customize the System.
- In the navigation pane, under Components, expand Entitiesand select the entity to audit (for example, Account).
- Scroll down to Data Servicesand enable the Auditingcheckbox.
- Under Auditing, enable the following options:
- Single record auditing. Log a record when opened.
- Multiple record auditing. Log all records displayed on an opened page.
- Select Saveand then select Publish.
- Repeat steps 4-7 for each table you want to audit.
For more information, see Microsoft Dataverse and model-driven apps activity logging .
Configure Azure Storage Account
Create Storage Account
- In the Azure portal, search for Storage accounts.
- Click + Create.
-
Provide the following configuration details:
Setting Value Subscription Select your Azure subscription Resource group Select existing or create new Storage account name Enter a unique name (for example, secopsd365logs)Region Select the same region as your Dataverse environment Performance Standard (recommended) Redundancy GRS (Geo-redundant storage) or LRS (Locally redundant storage) -
Select the Advancedtab and enable the Hierarchical Namespaceoption.
-
Click Review + create.
-
Review the overview of the account and click Create.
-
Wait for the deployment to complete.
Get Storage Account credentials
- Go to the Storage Accountyou just created.
- In the left navigation, select Access keysunder Security + networking.
- Click Show keys.
- Copy and save the following for later use:
- Storage account name:
secopsd365logs - Key 1or Key 2: The shared access key (a 512-bit random string in base-64 encoding)
- Storage account name:
Get Blob Service endpoint
- In the same Storage Account, select Endpointsfrom the left navigation.
- Copy and save the Blob serviceendpoint URL.
- Example:
https://secopsd365logs.blob.core.windows.net/
- Example:
Grant storage account permissions
Grant permissions to the Power Platform administrator who will configure the Azure Synapse Link:
- In the Storage Account, select Access control (IAM)in the left pane.
- Click + Add > Add role assignment.
- Assign the following roles to the Power Platform administrator:
- Storage Blob Data Contributor
- Storage Blob Data Owner
Configure Azure Synapse Link for Dataverse
Azure Synapse Link for Dataverse exports the Dataverse audit table to Azure Data Lake Storage Gen2, which is compatible with Azure Blob Storage V2 feeds.
Create Azure Synapse workspace
- In the Azure portal, search for Synapse Analytics.
- Click + Create.
- Provide the following configuration details:
- Subscription: Select the subscription where you created the storage account.
- Resource group: Select the same resource group as the storage account.
- Workspace name: Enter a unique name (for example,
synapse-d365-secops). - Region: Select the same region as your Dataverse environment.
- Storage account name: Select the storage account you created earlier (
secopsd365logs). - File system name: Click Create newand enter a name (for example,
d365-audit).
- Click Review + createand then click Create.
- Wait for the deployment to complete.
Create Apache Spark pool
- In the Azure portal, go to the Synapse workspace you created.
- Click + New Apache Spark pool.
- Provide the following configuration details:
- Apache Spark pool name: Enter a name (for example,
sparkpoold365). - Number of nodes: Enter
5.
- Apache Spark pool name: Enter a name (for example,
- Select the Additional settingstab and enter
5for the Number of minutes idle. - Click Review + createand then click Create.
Connect Dataverse audit table to Synapse workspace
- Sign in to Power Apps and select the environment containing your Dynamics 365 deployment.
- In the left navigation pane, select Azure Synapse Link. If the item is not visible, select More > Discover alland locate Azure Synapse Link.
- Click New link.
- On the New linkpage:
- Select the Connect to your Azure Synapse Analytics workspaceoption.
- Subscription: Select the Azure subscription.
- Resource group: Select the resource group containing the Synapse workspace.
- Storage account: Select the storage account (
secopsd365logs). - Select the Use Spark pool for Delta Lake data conversion joboption.
- Spark pool: Select the Spark pool you created (
sparkpoold365). - Storage account: Select the same storage account.
- Click Next.
- Expand the Advancedtab and enter
480minutes in the Time intervalfield. - Under the list of tables, select the Auditingand Usertables.
-
Click Save.
For more information, see Access audit data with Azure Synapse Link and Power BI .
Configure a feed in Google SecOps to ingest Microsoft Dynamics 365 User 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 Dynamics 365 User Activity). - Select Microsoft Azure Blob Storage V2as the Source type.
- Select Microsoft Dynamics 365as the Log type.
- Click Next.
-
Specify values for the following input parameters:
- Azure URI: Enter the Blob Service endpoint URL with the container path:
https://secopsd365logs.blob.core.windows.net/d365-audit/Replace the following:
-
secopsd365logs: Your Azure storage account name. -
d365-audit: The file system (container) name configured in the Synapse workspace.
- Source deletion option: Select the deletion option according to your preference:
- Never: Never deletes any files after transfers.
- Delete transferred files: Deletes files after successful transfer.
- Delete transferred files and empty directories: Deletes files and empty directories after successful transfer.
- Maximum File Age: Include files modified in the last number of days (default is 180 days)
- Shared key: Enter the shared key value (access key) you captured from the Storage Account earlier
- Asset namespace: The asset namespace
- Ingestion labels: The label to be applied to the events from this feed
-
Click Next.
-
Review your new feed configuration in the Finalizescreen, and then click Submit.
Configure Azure Storage firewall (if enabled)
If your Azure Storage Account uses a firewall, you must add Google SecOps IP ranges.
- In the Azure portal, go to your Storage Account.
- Select Networkingunder Security + networking.
- Under Firewalls and virtual networks, select Enabled from selected virtual networks and IP addresses.
- In the Firewallsection, under Address range, click + Add IP range.
-
Add each Google SecOps IP range in CIDR notation.
To get the current IP ranges:
- See IP Allowlisting documentation
- Or retrieve them programmatically using the Feed Management API
-
Click Save.
UDM mapping table
| Log Field | UDM Mapping | Logic |
|---|---|---|
|
BuildNumber
|
about.labels | Merged about_BuildNumber with key "BuildNumber" and value from BuildNumber if not empty |
|
RECORD_IDENTIFIER
|
additional.fields | Merged with labels created from each respective field if not empty |
|
LastProcessedChange_DateTime
|
additional.fields | |
|
DataLakeModified_DateTime
|
additional.fields | |
|
Application_Object_Server_node
|
additional.fields | |
|
ClientType
|
additional.fields | |
|
LogoutDateTime
|
additional.fields | |
|
LOGOUTDATETIMETZID
|
additional.fields | |
|
TerminatedOk
|
additional.fields | |
|
Type
|
additional.fields | |
|
Alive
|
additional.fields | |
|
PARTITION
|
additional.fields | |
|
has_user
|
metadata.event_type | Set to "GENERIC_EVENT", then "USER_UNCATEGORIZED" if has_user true, else "STATUS_UPDATE" if has_principal true |
|
has_principal
|
metadata.event_type | |
|
RECVERSION
|
metadata.product_version | Value copied directly if not empty |
|
SessionId
|
network.session_id | Value copied directly if not empty |
|
LOG_SEQUENCE_NUMBER
|
security_result.detection_fields | Merged LOG_SEQUENCE_NUMBER_label with key "LOG_SEQUENCE_NUMBER" and value from LOG_SEQUENCE_NUMBER if not empty |
|
UserId
|
target.user.userid | Value copied directly if not empty |
|
timestamp
|
timestamp | Parsed using date match with ISO8601 or RFC3339 format if not empty |
|
metadata.product_name
|
metadata.product_name | Set to "MICROSOFT_DYNAMICS_365" |
|
metadata.vendor_name
|
metadata.vendor_name | Set to "MICROSOFT_DYNAMICS_365" |
Need more help? Get answers from Community members and Google SecOps professionals.

