azureblog.co.uk
Event ID · Primary Refresh Token

Event ID 1022URL being accessed

Analytic event that records the URL CloudAP is calling. The first 1022 before a 1081 or 1088 shows which endpoint failed.

LogMicrosoft-Windows-AAD/Analytic
SourceMicrosoft-Windows-AAD
AreaPrimary Refresh Token

What to check

Use it to identify which endpoint (Entra ID, MEX or WS-Trust) returned the error or unexpected response.

Find it with PowerShell

Run on the machine that logs it. Analytic and Debug logs are hidden and turned off by default: in Event Viewer choose View › Show Analytic and Debug Logs, then enable the log.

powershell2 lineshover a line number for notes
Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-AAD/Analytic'; Id = 1022 } -Oldest -MaxEvents 50 |
    Format-List TimeCreated, Id, Message
What each line does
  1. Line 1: Reads win event details.
  2. Line 2: Shows every property of each result as a list.

Hunt for it in Sentinel or Log Analytics

This works once a data collection rule sends the Microsoft-Windows-AAD/Analytic log to your workspace, where it lands in the Event table.

kql5 lines
Event
| where TimeGenerated > ago(7d)
| where EventLog == "Microsoft-Windows-AAD/Analytic" and EventID == 1022
| project TimeGenerated, Computer, Source, RenderedDescription
| order by TimeGenerated desc

Related Primary Refresh Token events

Search all 123 event IDs →

Spotted something out of date or wrong? Tell us and we'll fix it.