Plan and Automate Identity Governance · Topic 4 of 4
Monitoring with Logs, Workbooks and Identity Secure Score
SC-300 monitoring: sign in, audit and provisioning logs, retention, diagnostic settings, KQL, workbooks, reports and Identity Secure Score.
- 5 min
- Sign in logs have four tabs. Audit logs record changes. Provisioning logs record app provisioning.
- Audit and sign in logs are kept 7 days on Free and 30 days on P1 and P2.
- Diagnostic settings send logs to Log Analytics, a storage account, Event Hubs or a partner.
What it is
You cannot secure what you cannot see. Microsoft Entra records what happens in your tenant in several logs. You read them in the admin center, send them to Azure Monitor to keep them longer and query them with Kusto Query Language (KQL), and visualise them in workbooks. Identity Secure Score measures your identity security posture and suggests what to improve.
How it works
The main logs
| Log | What it records |
|---|---|
| Sign in logs | Every authentication, in four tabs: interactive user, non interactive user, service principal and managed identity sign ins |
| Audit logs | Changes to the directory, such as adding a user, assigning a role, or adding a client secret to an app registration |
| Provisioning logs | Events from provisioning to apps, such as a user being created in a SaaS app |
The four sign in tabs matter. Interactive sign ins are where the user types credentials or approves MFA. Non interactive sign ins are done by a client for the user, such as a mobile mail app refreshing tokens in the background. Service principal and managed identity sign ins are for workloads.
Retention
Logs shown in the admin center are kept only briefly.
| Report | Entra ID Free | Entra ID P1 and P2 |
|---|---|---|
| Audit logs | 7 days | 30 days |
| Sign in logs | 7 days | 30 days |
To keep logs longer, or to analyse them with other data, export them with diagnostic settings. Entra ID P1 or P2 is needed to export sign in logs.
Diagnostic settings
A diagnostic setting sends the logs you choose to one or more destinations.
| Destination | Use |
|---|---|
| Log Analytics workspace | Run KQL queries, build workbooks and alerts. Also the source for Microsoft Sentinel |
| Storage account | Cheap long term archive |
| Azure Event Hubs | Stream to an external SIEM or other tool |
| Partner solution | Send to a supported third party |
Create the setting under Diagnostic settings in the Entra admin center, choose the categories such as SignInLogs, AuditLogs and NonInteractiveUserSignInLogs, and pick the destination.
Querying with KQL
In a Log Analytics workspace, the Entra logs are tables. Common ones are SigninLogs, AuditLogs, AADNonInteractiveUserSignInLogs, AADServicePrincipalSignInLogs and AADManagedIdentitySignInLogs.
SigninLogs
| where TimeGenerated > ago(7d) and ResultType != 0
| summarize Failures = count() by UserPrincipalName
| order by Failures desc
AuditLogs
| where OperationName has "role"
| project TimeGenerated, OperationName, InitiatedBy, TargetResources
The first query lists users with the most failed sign ins. The second shows role related changes and who made them. To find out who added a client secret to an app, search the audit logs for the app's credential change.
Workbooks and reports
Workbooks are interactive reports built on the log data. Entra ID includes templates, such as the Conditional Access insights and reporting workbook, which shows the effect of each policy over time, and workbooks on sign in activity, authentication methods and risk. You can edit a template or build your own. The admin center also has built in reports, such as authentication methods activity, risky users and usage.
Identity Secure Score
Identity Secure Score is a percentage that shows how well your tenant follows identity security best practices. It lists improvement actions, such as requiring MFA for administrators, blocking legacy authentication or reducing the number of Global Administrators, each with its impact on the score and the steps to complete it. As you finish the actions, the score rises, and you can compare it with similar organisations.
Who can view what
| Role | Access |
|---|---|
| Reports Reader | Reads sign in and audit reports |
| Security Reader | Reads security information and reports |
| Global Reader | Reads almost everything, without changing it |
| Log Analytics Reader or Contributor | Query the workspace that holds the exported logs |
Choose the narrowest role. An external auditor who must read nearly all settings across workloads fits Global Reader.
Choosing the tool
| The need | Tool |
|---|---|
| Who added a client secret to an app last night | Audit logs |
| A mobile mail client refreshes tokens in the background | The non interactive user sign ins tab |
| Keep sign in logs for a year | Diagnostic settings to a storage account or Log Analytics |
| Run custom queries and alerts | A Log Analytics workspace with KQL |
| See the effect of Conditional Access policies | The Conditional Access insights workbook |
| Track and improve identity posture | Identity Secure Score |
A worked scenario
A security team needs to keep identity logs for a year and run queries on them. It creates a diagnostic setting that sends the audit, sign in, non interactive and service principal logs to a Log Analytics workspace, and also archives them to a storage account. A KQL query reports failed sign ins by user. When a suspicious change appears, an analyst checks the audit logs to see who added a client secret and when. The team uses the Conditional Access insights workbook to review policy results, and works through the Identity Secure Score actions each month.
What to remember for the exam
- Sign in logs have four tabs. Audit logs record changes. Provisioning logs record app provisioning.
- Audit and sign in logs are kept 7 days on Free and 30 days on P1 and P2.
- Diagnostic settings send logs to Log Analytics, a storage account, Event Hubs or a partner.
- KQL queries run in Log Analytics. Workbooks visualise the data.
- Identity Secure Score gives a percentage and improvement actions.
Background token refreshes by a client appear on the non interactive tab, not the interactive one.
How the exam asks about this
- "Where do you find a mobile client's background token refresh?" The non interactive user sign ins tab.
- "Who changed an app's credentials?" The audit logs.
- "Keep logs for a year and query them." A diagnostic setting to a Log Analytics workspace.
- "Review the effect of Conditional Access policies over time." The Conditional Access insights and reporting workbook.
Common mistakes
Searching interactive sign ins for background activity. Use the non interactive tab.
Relying on the portal for long retention. Export the logs.
Mixing up audit and sign in logs. One records changes, the other authentications.
Using a powerful role to read logs. Reports Reader or Global Reader is enough.
Check yourself
What are the four tabs of the sign in logs?
Interactive user, non interactive user, service principal and managed identity sign ins.
Where can diagnostic settings send logs?
To a Log Analytics workspace, a storage account, Azure Event Hubs or a partner solution.
What does Identity Secure Score provide?
A percentage of how well the tenant follows identity security practices, with improvement actions.
Topic 4 of 4 in Plan and Automate Identity Governance
Test yourself on Plan and Automate Identity Governance
The full Microsoft SC-300 question bank has 650 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.