Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this tutorial, you learn how to:
- Create a custom workbook
- Add a query to an existing workbook template
Prerequisites
To analyze activity logs with Log Analytics, you need the following roles and requirements:
The appropriate role for Azure Monitor:
- Monitoring Reader
- Log Analytics Reader
- Monitoring Contributor
- Log Analytics Contributor
The appropriate role for Microsoft Entra ID:
- Reports Reader
- Security Reader
- Global Reader
- Security Administrator
If you haven't already created a Log Analytics workspace, complete the Configure Log Analytics workspace tutorial.
Create a custom workbook
In addition to querying the data with Kusto Query Language (KQL), you can create a custom workbook for further analysis and alerting. The least privileged role to create or update a workbook is the Security Administrator role.
Browse to Entra ID > Monitoring & health > Workbooks.
In the Quickstart section, select Empty.
From the Add menu, select Add text.
In the textbox, enter
# Client apps used in the past week
and select Done Editing.Below the text window, open the Add menu and select Add query.
In the query textbox, enter:
SigninLogs | where TimeGenerated > ago(7d) | project TimeGenerated, UserDisplayName, ClientAppUsed | summarize count() by ClientAppUsed
Select Run Query.
In the toolbar, from the Visualization menu select Pie chart.
Select Done Editing at the top of the page.
Select the Save icon to save your workbook.
In the dialog box that appears, enter a title, select a Resource group, and select Apply.
Add a query to a workbook template
You can add Kusto queries to your workbook. The example is based on a query that shows the distribution of successful and failed sign-ins with applied Conditional Access policies. The least privileged role to create or update a workbook is the Security Administrator role.
Browse to Entra ID > Monitoring & health > Workbooks.
In the Conditional Access section, select Conditional Access Insights and Reporting.
In the toolbar, select Edit.
In the toolbar, select the three dots next to the Edit button, then Add, and then Add query.
In the query textbox, enter:
SigninLogs | where TimeGenerated > ago(20d) | where ConditionalAccessPolicies != "[]" | summarize dcount(UserDisplayName) by bin(TimeGenerated, 1d), ConditionalAccessStatus
Select Run Query.
From the Time Range menu, select Set in query.
From the Visualization menu, select Bar chart.
Select Advanced Settings.
In the Chart title field, enter
Conditional Access status over the last 20 days
and select Done Editing.
Your Conditional Access success and failure chart displays a color-coded snapshot of your tenant.