AVD Host Pool Change Audit Logs
By Jay H.Published Updated 6 min read
Jay H. · Founder, Sessionright
Founder of Sessionright. Twenty years running Citrix, NetScaler, Citrix Cloud, NetScaler Console, Azure and Azure Virtual Desktop estates; writes the guides and reviews the platform's rules.
Stuck on this right now? Talk it through with a Sessionright engineer: 15 minutes, free.
Open the AVD host pool's Activity log in the Azure portal to review its Azure management operations. Use Azure Resource Graph Change Analysis for recorded before-and-after property values, and WVDManagement in Log Analytics for AVD management requests collected through diagnostic settings. (Microsoft Activity log, resource changes, AVD diagnostics, WVDManagement)
Where do you find host pool management events?
Open Activity log from the host pool's resource menu for the individual resource view. For a wider search, Azure also lets you view events at the resource group or subscription scope. (Microsoft Activity log)
- For the subscription view, open Monitor > Activity log, or open Subscriptions, select the subscription and open Activity Log. Both entries start with the subscription as the only default filter. (Microsoft Activity log)
- Specify the time interval for the events you want to retrieve, within the Activity log's 90-day retention window. Microsoft says entries are usually available for analysis and alerting within 3 to 20 minutes of the event. (Microsoft Activity log)
If you already query Activity log records in Log Analytics, the host pool table reference lists AzureActivity. In that table, ActivityStatusValue gives the operation status, with common values including Started, In Progress, Succeeded and Failed. Read the status alongside the operation so the audit records whether the operation started or succeeded. (Microsoft host pool tables, AzureActivity)
For programmatic retrieval, Microsoft's Azure CLI examples use az monitor activity-log list and the subscription selected in the current context. Its Azure PowerShell examples use Get-AzActivityLog. In the Activity Log REST API, include $filter with at least an eventTimestamp start value. Microsoft's REST examples also show how to filter by resourceUri for a specific resource or by correlationId. (Microsoft Activity log)
How do you see who changed a host pool property and what the old value was?
Azure Resource Graph's resourcechanges records can show the actor in changedBy and the old and new values in the property change details. Use the target resource ID to identify the host pool in the results. (Microsoft resource changes)
| Field | What to read in the change record |
|---|---|
changeAttributes.changedBy |
Who initiated the change, such as an application ID or an authorised person's email address. |
changeAttributes.clientType |
The client name when known, or the client application ID if the supplied client is unknown. |
changeType |
Whether the record captures a create, update or delete. Microsoft recommends this field for the change type because operation represents the authorisation action used. |
changes |
The recorded properties and their previousValue and newValue, as shown in Microsoft's update example. |
In the Azure portal, open All services, search for Resource Graph Explorer, and paste the query below into Query 1. Replace <host-pool-resource-id> with the full Azure resource ID of the host pool. This adaptation of Microsoft's resourcechanges example filters to that exact resource ID, sorts newest first and includes the actor and property changes. (Microsoft resource changes)
resourcechanges
| where tostring(properties.targetResourceId) =~ '<host-pool-resource-id>'
| project changeTime = todatetime(properties.changeAttributes.timestamp),
targetResourceId = tostring(properties.targetResourceId),
changeType = tostring(properties.changeType),
changedBy = tostring(properties.changeAttributes.changedBy),
clientType = tostring(properties.changeAttributes.clientType),
changes = properties.changes
| order by changeTime desc
Select Run query and read the Results tab. On an update row, read changedBy for the initiating identity and expand the relevant property under changes to compare previousValue with newValue. (Microsoft resource changes)
A delete record has a changesCount of zero, and deleted resources have no supported snapshots. Create records also show a zero count because all resource properties are set during creation. Newly introduced properties, such as properties added by an API version, are excluded from recorded changes. (Microsoft resource changes)
Change Analysis covers changes through the Azure Resource Manager control plane. For example, Resource Graph does not observe writes through a resource's data plane API. Microsoft says change records should be available in less than five minutes, with some change details potentially appearing before others. (Microsoft Change Analysis, resource changes)
For the settings themselves, see the AVD host pool configuration guide.
How do you enable and read AVD management diagnostics?
On the host pool, add a diagnostic setting that sends Management logs to a Log Analytics workspace. Microsoft describes Management Activities as recording whether attempts to change AVD objects through APIs or PowerShell succeed. (Microsoft AVD diagnostics)
- In the Azure portal, go to Azure Virtual Desktop, open the host pool and select Diagnostic settings > Add diagnostic setting. (Microsoft AVD diagnostics)
- Enter a name without spaces that follows Azure naming conventions, choose Send to Log Analytics, and select the Management category. Select the destination Log Analytics workspace, then select Save. The available categories vary by object type. (Microsoft AVD diagnostics)
- Open Log Analytics workspaces, select the workspace configured for the host pool, and open Logs. You can also open Monitor > Logs and set the query scope there. (Microsoft AVD diagnostics)
For a request in WVDManagement, read the UTC event time in TimeGenerated and the associated resource in _ResourceId alongside UserName and Route. The object counters show how many objects were created, deleted, fetched or updated. For a provisioning operation, Microsoft maps WVDManagement.ProvisioningCorrelationId to WVDSessionHostManagement.CorrelationId. (Microsoft WVDManagement)
Which logs show what happened during a session host update?
For native session host update, Azure Virtual Desktop stores update data in WVDSessionHostManagement and WVDCheckpoints. Microsoft's example queries require a host pool with a session host configuration, the required diagnostic categories enabled, and a previously scheduled update that has run. (Microsoft session host update diagnostics)
If a host pool already has a diagnostic setting, enable Session Host Management Activity Logs on that setting for the host pool that uses session host update. Azure Virtual Desktop creates the WVDSessionHostManagement table after the category is enabled and session host update runs. (Microsoft session host update diagnostics)
| Question | Microsoft diagnostic query |
|---|---|
| How long did a successful image update take? | Join WVDSessionHostManagement to WVDCheckpoints on CorrelationId. Microsoft's example reports pool update duration, the number of hosts updated and the median time to update a single host in minutes. |
| What errors occurred during an update? | Use Microsoft's example that correlates WVDSessionHostManagement with WVDErrors and selects update statuses Failed, Error and Canceled. |
(Microsoft session host update diagnostics)
For an unavailable host, see the session host unavailable troubleshooting guide. For a scripted restart, see the AVD session host restart guide.
FAQ
Does Azure Activity log show denied requests?
Requests that Azure Resource Manager rejects during authentication or authorisation before an operation starts generate no Activity log entry. Those requests also trigger no Activity log alert and are absent from destinations configured through diagnostic settings. (Microsoft Activity log)
How do you keep Azure Activity log events longer?
Create a diagnostic setting to collect Activity log entries in another location for longer retention. Microsoft gives preservation of resource creator information as a reason to extend retention, since that information is only available in the Activity log. (Microsoft Activity log)
Can you export Azure Resource Graph change history?
Microsoft describes integrating a Resource Graph query with Azure Logic Apps and manually exporting the results for longer retention. Log Analytics is one example of a destination. (Microsoft Change Analysis)
Where do you check why AVD Autoscale started a VM?
WVDAutoscaleEvaluationPooled records the scaling plan evaluation, including actions such as starting or deallocating hosts and why Autoscale took them. If ResultType is Failed, Microsoft directs you to join to WVDErrors on CorrelationId for details. (Microsoft host pool tables)
Want a read-only view of your AVD estate?
The free AVD assessment from Sessionright runs one read-only command in Azure Cloud Shell and produces a local HTML report in about five minutes for a typical estate. The platform is read-only by default, and every change it runs is approved by a named person and logged. The annual Operator licence for approved AVD changes is priced by estate size. You can also book a 15-minute call to discuss your host pools.
Sources
- Microsoft Learn: Activity log in Azure Monitor
- Microsoft Learn: Send diagnostic data to Log Analytics for Azure Virtual Desktop
- Microsoft Learn: Log Analytics tables for host pools
- Microsoft Learn: AzureActivity
- Microsoft Learn: WVDManagement
- Microsoft Learn: Get resource changes
- Microsoft Learn: Analyze changes to your Azure resources
- Microsoft Learn: Example diagnostic queries for session host update
Want this watched for you, with the fix drafted before you ask?
Sessionright is an AI operator for Azure Virtual Desktop: it checks session hosts, scaling plans, FSLogix and cost continuously, attaches the evidence, and proposes fixes for a named approver to sign. It has run against simulated estates and Sessionright's own Azure lab tenant so far. To see what it finds on your own estate, run the free assessment: one command in Azure Cloud Shell reads your estate, never changes it, and writes an HTML report in about five minutes for a typical estate. Your estate data stays with you unless you choose to email yourself the HTML report through Sessionright. Design partner program: 90-day free Operator pilot, then 50% off year 1; list price at signing held to month 24. Engineer-led assessments are 50% off for design partners. Outside the program the onboarding assessment is $2,500, up to 500 users, one tenant.
Not ready for that? Talk to a Sessionright engineer: 15 minutes, free, and you leave with a next step.
Or get the next guide by email. One email per new guide, no marketing list.
Related guides
- AVD Host Pool Configuration: Azure Portal Settings
Configure an AVD host pool in the Azure portal. Choose pooled or personal desktops, set session routing, and review validation, RDP and VM startup settings.
- How to Add an Existing VM to an AVD Host Pool
Add an existing VM to a standard Azure Virtual Desktop host pool. Generate a registration key, register the VM and verify the new session host is available.
- AVD Golden Image Management: Build, Version and Roll Out Safely
How to build an AVD golden image, version it in Azure Compute Gallery, roll it out in batches, test it and roll back, with what native tooling covers.
- AVD Session Host Unavailable or Needs Assistance: How to Fix
Fix an AVD session host stuck in Unavailable, Needs Assistance or Upgrade Failed: read the health checks, re-register the agent and test required URLs.
- AVD No Available Resources Error: Causes and Fixes
Fix the AVD No resources available error: check desktop assignment, drained or stopped hosts, scaling plan exclusions, session limits and Start VM on Connect.
Citrix and NetScaler are trademarks of Citrix Systems, Inc. and/or its affiliates. Azure is a trademark of the Microsoft group of companies. Sessionright is not affiliated with or endorsed by Cloud Software Group, Citrix or Microsoft.