You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Create a Power BI report from Microsoft Sentinel data
3
-
description: Learn how to create a Power BI report using an exported query from Microsoft Sentinel Log Analytics. Share your report with others in the Power BI service and a Teams channel.
3
+
description: Learn how to create a Power BI report using an exported query from Microsoft Sentinel. Share your report with others in the Power BI service and a Teams channel.
4
4
author: yelevin
5
5
ms.author: yelevin
6
-
ms.topic: conceptual
7
-
ms.date: 01/09/2023
6
+
ms.topic: how-to
7
+
ms.date: 05/19/2024
8
8
---
9
9
10
10
# Create a Power BI report from Microsoft Sentinel data
11
11
12
12
[Power BI](https://powerbi.microsoft.com/) is a reporting and analytics platform that turns data into coherent, immersive, interactive visualizations. Power BI lets you easily connect to data sources, visualize and discover relationships, and share insights with whoever you want.
13
13
14
-
You can base Power BI reports on data from Microsoft Sentinel Log Analytics workspaces, and share those reports with people who don't have access to Microsoft Sentinel. For example, you might want to share information about failed sign-in attempts with app owners, without granting them Microsoft Sentinel access. Power BI visualizations can provide the data at a glance.
14
+
You can base Power BI reports on data from Microsoft Sentinel and share those reports with people who don't have access to Microsoft Sentinel. For example, you might want to share information about failed sign-in attempts with app owners, without granting them Microsoft Sentinel access. Power BI visualizations can provide the data at a glance.
15
+
16
+
Microsoft Sentinel runs on Log Analytics workspaces, and you can use Kusto Query Language (KQL) to query the data.
17
+
18
+
19
+
This article provides a scenario-based procedure to view analysis reports in PowerBI for your Microsoft Sentinel data. For more information, see [Connect data sources](connect-data-sources.md) and [Visualize collected data](get-visibility.md).
15
20
16
21
In this article, you:
17
22
18
23
> [!div class="checklist"]
19
-
> * Export a Log Analytics Kusto query to a Power BI M language query.
24
+
> * Export a KQL query to a Power BI M language query.
20
25
> * Use the M query in Power BI Desktop to create visualizations and a report.
21
26
> * Publish the report to the Power BI service, and share it with others.
22
27
> * Add the report to a Teams channel.
23
28
24
29
People you granted access in the Power BI service, and members of the Teams channel, can see the report without needing Microsoft Sentinel permissions.
25
30
26
-
> [!NOTE]
27
-
> This article provides a scenario-based procedure to view analysis reports in PowerBI for your Microsoft Sentinel data. For more information, see [Connect data sources](connect-data-sources.md) and [Visualize collected data](get-visibility.md).
- At least read access to a Microsoft Sentinel Log Analytics workspace that monitors sign-in attempts.
34
-
- A Power BI account that has read access to the Log Analytics workspace.
36
+
- At least read access to a Microsoft Sentinel workspace that monitors sign-in attempts.
37
+
- A Power BI account that has read access to the your Microsoft Sentinel workspace.
35
38
-[Power BI Desktop installed from the Microsoft Store](https://aka.ms/pbidesktopstore).
36
39
37
-
## Export a query from Log Analytics
38
-
39
-
Create, run, and export a Kusto query in your Microsoft Sentinel Log Analytics workspace.
40
-
41
-
1. To create a simple query, in your Microsoft Sentinel Log Analytics workspace, select **Logs**. In the query editor under **New Query 1**, enter the following Kusto query:
Or, use your favorite Microsoft Sentinel Log Analytics Kusto query.
52
-
40
+
## Export a query from Microsoft Sentinel
41
+
42
+
Create, run, and export a KQL query from Microsoft Sentinel.
43
+
44
+
1. To create a simple query, in Microsoft Sentinel, select **Logs**. If your workspace is onboarded to the unified security operations platform, select **General > Logs**.
45
+
46
+
1. In the query editor, under **New Query 1**, enter the following query, or any other Microsoft Sentinel query for your data:
1. Select **Run** to run the query and generate results.
54
-
55
-
:::image type="content" source="media/powerbi/query.png" alt-text="Screenshot showing the Log Analytics Kusto query and results.":::
56
-
57
-
1. To export the query to Power BI M query format, select **Export**, and then select **Export to Power BI (M query)**. Log Analytics exports the query to a text file called *PowerBIQuery.txt*.
58
-
59
-
:::image type="content" source="media/powerbi/export.png" alt-text="Screenshot showing query Export to Power BI M format.":::
60
-
57
+
58
+
:::image type="content" source="media/powerbi/query.png" alt-text="Screenshot showing the KQL query and results.":::
59
+
60
+
1. To export the query to Power BI M query format, select **Export**, and then select **Export to Power BI (M query)**. The query is exported to a text file called *PowerBIQuery.txt*.
61
+
62
+
:::image type="content" source="media/powerbi/export.png" alt-text="Screenshot showing query Export to Power BI M format.":::
63
+
61
64
1. Copy the contents of the exported file.
62
65
63
66
## Get the data in Power BI Desktop
64
67
65
68
Run the exported M query in Power BI Desktop to get data.
66
69
67
-
1. Open Power BI Desktop, and sign in to your Power BI account that has read access to the Log Analytics workspace.
68
-
69
-
:::image type="content" source="media/powerbi/sign-in.png" alt-text="Screenshot showing sign-in to Power BI Desktop.":::
70
-
70
+
1. Open Power BI Desktop, and sign in to your Power BI account that has read access to your Microsoft Sentinel workspace.
71
+
72
+
:::image type="content" source="media/powerbi/sign-in.png" alt-text="Screenshot showing sign-in to Power BI Desktop.":::
73
+
71
74
1. In the Power BI ribbon, select **Get data** and then select **Blank query**. The **Power Query Editor** opens.
72
-
73
-
:::image type="content" source="media/powerbi/blank-query.png" alt-text="Screenshot showing Blank query selected under Get data in Power BI Desktop.":::
74
-
75
+
76
+
:::image type="content" source="media/powerbi/blank-query.png" alt-text="Screenshot showing Blank query selected under Get data in Power BI Desktop.":::
77
+
75
78
1. In the **Power Query Editor**, select **Advanced Editor**.
76
-
79
+
77
80
1. Paste the copied contents of the exported *PowerBIQuery.txt* file into the **Advanced Editor** window, and then select **Done**.
78
-
79
-
:::image type="content" source="media/powerbi/advanced-editor.png" alt-text="Screenshot showing the M query pasted in to the Power BI Advanced Editor.":::
80
-
81
+
82
+
:::image type="content" source="media/powerbi/advanced-editor.png" alt-text="Screenshot showing the M query pasted in to the Power BI Advanced Editor.":::
83
+
81
84
1. In the **Power Query Editor**, rename the query to *App_signin_stats*, and then select **Close & Apply**.
82
-
83
-
:::image type="content" source="media/powerbi/close-apply.png" alt-text="Screenshot showing the renamed query and Close & Apply command in the Power Query Editor.":::
85
+
86
+
:::image type="content" source="media/powerbi/close-apply.png" alt-text="Screenshot showing the renamed query and Close & Apply command in the Power Query Editor.":::
84
87
85
88
## Create visualizations from the data
86
89
@@ -91,117 +94,117 @@ Now that your data is in Power BI, you can create visualizations to provide insi
91
94
First, create a table that shows all the results of the query.
92
95
93
96
1. To add a table visualization to the Power BI Desktop canvas, select the **table** icon under **Visualizations**.
94
-
95
-
:::image type="content" source="media/powerbi/table.png" alt-text="Screenshot showing the table icon under Visualizations in Power BI Desktop.":::
96
-
97
+
98
+
:::image type="content" source="media/powerbi/table.png" alt-text="Screenshot showing the table icon under Visualizations in Power BI Desktop.":::
99
+
97
100
1. Under **Fields**, select all the fields in your query, so they all appear in the table. If the table doesn't show all the data, enlarge the table by dragging its selection handles.
98
-
99
-
:::image type="content" source="media/powerbi/select-fields.png" alt-text="Screenshot showing all fields selected for the table visualization.":::
100
-
101
+
102
+
:::image type="content" source="media/powerbi/select-fields.png" alt-text="Screenshot showing all fields selected for the table visualization.":::
103
+
101
104
### Create a pie chart
102
105
103
106
Next, create a pie chart that shows which applications had the most failed sign-in attempts.
104
107
105
108
1. Deselect the table visual by clicking or tapping outside of it, and then under **Visualizations**, select the **pie chart** icon.
106
-
107
-
:::image type="content" source="media/powerbi/pie-chart.png" alt-text="Screenshot showing the pie chart icon under Visualizations in Power BI Desktop.":::
108
-
109
+
110
+
:::image type="content" source="media/powerbi/pie-chart.png" alt-text="Screenshot showing the pie chart icon under Visualizations in Power BI Desktop.":::
111
+
109
112
1. Select **AppDisplayName** in the **Legend** well, or drag it from the **Fields** pane. Select **Failed** in the **Values** well, or drag it from **Fields**. The pie chart now shows the number of failed sign-in attempts per application.
110
-
111
-
:::image type="content" source="media/powerbi/failed.png" alt-text="Screenshot showing the pie chart with number of failed sign-in attempts per application.":::
112
-
113
+
114
+
:::image type="content" source="media/powerbi/failed.png" alt-text="Screenshot showing the pie chart with number of failed sign-in attempts per application.":::
115
+
113
116
### Create a new quick measure
114
117
115
118
You also want to show what percentage of sign-in attempts failed for each application. Since your query doesn't have a percentage column, you can create a new measure to show this information.
116
119
117
120
1. Under **Visualizations**, select the **stacked column chart** icon to create a stacked column chart.
118
-
119
-
:::image type="content" source="media/powerbi/column-chart.png" alt-text="Screenshot showing the stacked column chart icon under Visualizations in Power BI Desktop.":::
120
-
121
+
122
+
:::image type="content" source="media/powerbi/column-chart.png" alt-text="Screenshot showing the stacked column chart icon under Visualizations in Power BI Desktop.":::
123
+
121
124
1. With the new visualization selected, select **Quick measure** in the ribbon.
122
-
125
+
123
126
1. In the **Quick measures** window, under **Calculation**, select **Division**. Drag **Failed** from **Fields** into the **Numerator** field, and drag **Attempts** from **Fields** to **Denominator**.
124
-
125
-
:::image type="content" source="media/powerbi/quick-measures.png" alt-text="Screenshot showing the settings in the Quick measures window.":::
126
-
127
+
128
+
:::image type="content" source="media/powerbi/quick-measures.png" alt-text="Screenshot showing the settings in the Quick measures window.":::
129
+
127
130
1. Select **OK**. The new measure appears in the **Fields** pane.
128
-
131
+
129
132
1. Select the new measure in the **Fields** pane, and under **Formatting** in the ribbon, select **Percentage**.
130
-
131
-
:::image type="content" source="media/powerbi/percentage.png" alt-text="Screenshot showing the new measure selected in the Fields pane, and Percentage selected under Formatting in the ribbon.":::
132
-
133
+
134
+
:::image type="content" source="media/powerbi/percentage.png" alt-text="Screenshot showing the new measure selected in the Fields pane, and Percentage selected under Formatting in the ribbon.":::
135
+
133
136
1. With the column chart visualization selected on the canvas, select or drag the **AppDisplayName** field into the **Axis** well, and the new **Failed divided by Attempts** measure into the **Values** well. The chart now shows the percentage of failed sign-in attempts for each application.
134
-
135
-
:::image type="content" source="media/powerbi/failed-percentage.png" alt-text="Screenshot showing the column chart with percentage of failed attempts for each application.":::
136
-
137
+
138
+
:::image type="content" source="media/powerbi/failed-percentage.png" alt-text="Screenshot showing the column chart with percentage of failed attempts for each application.":::
139
+
137
140
### Refresh the data and save the report
138
141
139
142
1. Select **Refresh** to get the latest data from Microsoft Sentinel.
140
-
141
-
:::image type="content" source="media/powerbi/refresh.png" alt-text="Screenshot showing the Refresh button in the ribbon.":::
142
-
143
+
144
+
:::image type="content" source="media/powerbi/refresh.png" alt-text="Screenshot showing the Refresh button in the ribbon.":::
145
+
143
146
1. Select **File** > **Save** and save your Power BI report.
144
147
145
148
## Create a Power BI online workspace
146
149
147
150
To create a Power BI workspace for sharing the report:
148
151
149
152
1. Sign in to [powerbi.com](https://powerbi.com) with the same account you used for Power BI Desktop and Microsoft Sentinel read access.
150
-
153
+
151
154
1. Under **Workspaces**, select **Create a workspace**. Name the workspace *Management Reports*, and select **Save**.
152
-
153
-
:::image type="content" source="media/powerbi/create-workspace.png" alt-text="Screenshot showing Create a workspace in the Power BI service.":::
154
-
155
+
156
+
:::image type="content" source="media/powerbi/create-workspace.png" alt-text="Screenshot showing Create a workspace in the Power BI service.":::
157
+
155
158
1. To grant people and groups access to the workspace, select the **More options** dots next to the new workspace name, and then select **Workspace access**.
156
-
157
-
:::image type="content" source="media/powerbi/workspace-access.png" alt-text="Screenshot showing Workspace access in the workspace More options menu.":::
158
-
159
+
160
+
:::image type="content" source="media/powerbi/workspace-access.png" alt-text="Screenshot showing Workspace access in the workspace More options menu.":::
161
+
159
162
1. In the **Workspace access** side pane, you can add users' email addresses and assign each user a role. The roles are Admin, Member, Contributor, and Viewer.
160
163
161
164
## Publish the Power BI report
162
165
163
166
Now you can use Power BI Desktop to publish your Power BI report so other people can see it.
164
167
165
168
1. In your new report in Power BI Desktop, select **Publish**.
166
-
167
-
:::image type="content" source="media/powerbi/publish.png" alt-text="Screenshot showing Publish in the Power BI Desktop ribbon.":::
168
-
169
+
170
+
:::image type="content" source="media/powerbi/publish.png" alt-text="Screenshot showing Publish in the Power BI Desktop ribbon.":::
171
+
169
172
1. Select the **Management Reports** workspace to publish to, and select **Select**.
170
-
171
-
:::image type="content" source="media/powerbi/select-workspace.png" alt-text="Screenshot that shows selecting the Power BI Management Reports workspace to publish to.":::
172
-
173
+
174
+
:::image type="content" source="media/powerbi/select-workspace.png" alt-text="Screenshot that shows selecting the Power BI Management Reports workspace to publish to.":::
175
+
173
176
## Import the report to a Microsoft Teams channel
174
177
175
178
You also want members of the Management Teams channel to be able to see the report. To add the report to a Teams channel:
176
179
177
180
1. In the Management Teams channel, select **+** to add a tab, and in the **Add a tab** window, search for and select **Power BI**.
178
181
179
-
:::image type="content" source="media/powerbi/add-tab.png" alt-text="Screenshot that shows selecting Power BI in the Add a tab window in Teams.":::
180
-
182
+
:::image type="content" source="media/powerbi/add-tab.png" alt-text="Screenshot that shows selecting Power BI in the Add a tab window in Teams.":::
183
+
181
184
1. Select your new report from the list of Power BI reports, and select **Save**. The report appears in a new tab in the Teams channel.
182
-
183
-
:::image type="content" source="media/powerbi/teams.png" alt-text="Screenshot showing the Power BI report in a tab in the Teams channel.":::
185
+
186
+
:::image type="content" source="media/powerbi/teams.png" alt-text="Screenshot showing the Power BI report in a tab in the Teams channel.":::
184
187
185
188
## Schedule report refresh
186
189
187
190
Refresh your Power BI report on a schedule, so updated data always appears in the report.
188
191
189
192
1. In the Power BI service, select the workspace you published your report to.
190
-
193
+
191
194
1. Next to the report's dataset, select **More options** > **Settings**.
192
-
193
-
:::image type="content" source="media/powerbi/settings.png" alt-text="Screenshot showing Settings under More options in the Power BI report dataset.":::
194
-
195
-
1. Select **Edit credentials** to provide the credentials for an account that has read access to the Log Analytics workspace.
196
-
195
+
196
+
:::image type="content" source="media/powerbi/settings.png" alt-text="Screenshot showing Settings under More options in the Power BI report dataset.":::
197
+
198
+
1. Select **Edit credentials** to provide the credentials for an account that has read access to the Microsoft Sentinel workspace.
199
+
197
200
1. Under **Scheduled refresh**, set the slider to **On**, and set up a refresh schedule for the report.
198
-
199
-
:::image type="content" source="media/powerbi/schedule.png" alt-text="Screenshot showing Scheduled refresh settings for the Power BI report dataset.":::
200
201
201
-
## Next steps
202
+
:::image type="content" source="media/powerbi/schedule.png" alt-text="Screenshot showing Scheduled refresh settings for the Power BI report dataset.":::
203
+
204
+
## Related content
202
205
203
206
For more information, see:
204
207
205
208
-[Azure Monitor service limits](../azure-monitor/service-limits.md)
206
209
-[Import Azure Monitor log data into Power BI](../azure-monitor/logs/log-powerbi.md)
0 commit comments