Skip to content
Back to Docs
Host Pool Management
6 min

Session Acceptance Test: Check Every New Host Before Users Sign In

A session host can register with Azure Virtual Desktop and look healthy while the first person to sign in gets a temporary profile, a failed logon script or no Teams media optimization. Finding that out usually means someone signing in by hand after every build or image change. The session acceptance test does that sign-in for you. After Atlas finishes building a host, and while the host is still in drain mode, a dedicated test account signs in to it, Atlas checks what a user would hit, signs the account out and only then lets users on. Each step appears on the provisioning job as it finishes. The test is off by default.

Prerequisites

  • A dedicated Microsoft Entra account for the test, with no admin roles
  • Key Vault configured for your Atlas AVD deployment (it holds the test account's password)
  • The Microsoft Graph permission User.ReadWrite.All on the Atlas app registration, so Atlas can set and change the test account's password. Without it you can enter the password yourself
  • Session hosts in Azure. On-premises hosts can't run the test, because it uses Azure Run Command
  • An administrator who can change settings in the Configuration Matrix and manage host pools

What the test checks

  • Test account signs in: the account signs in to the host, and Atlas records how long the sign-in and the profile load took
  • FSLogix profile container attaches: the container is mounted for the account and the profile is not a temporary one. Skipped when FSLogix profile containers are not turned on for the host
  • Group Policy and logon scripts: Group Policy for the user applies without errors, and every logon script Group Policy assigns returns exit code 0
  • Teams and AVD media optimization components: Teams, the Remote Desktop WebRTC Redirector Service and the Azure Virtual Desktop Teams setting are in place
  • Audio: the Windows Audio services are running
  • Your test script, if you choose one: a PowerShell script from the Scripts library runs as the test account. Exit code 0 passes
  • Sign-out and profile detach: the account signs out and its profile and profile container unload cleanly

What happens to the host

  • A host that passes is taken out of drain mode, as it would have been without the test
  • A host that fails stays in drain mode and the Session Acceptance Test Failed alert is raised, naming the checks that failed. You can choose Alert only instead, which releases the host and still raises the alert
  • When the test can't run at all, for example because no test account is set up, the host is treated as failed
  • Every run is kept with the host pool, with each step's result, what was found and how long it took. Atlas Advisor can answer questions such as "did the acceptance test pass on the new hosts?"

The test signs in on the host itself. It does not go through the Azure Virtual Desktop gateway, and it can't confirm that Teams shows "AVD Media Optimized", which needs a real Remote Desktop client. Microphone and speaker redirection also need a real client.

Set up the test account

  1. 1Create a Microsoft Entra user just for this test, for example acceptance@contoso.com. Don't give it any admin role.
  2. 2Add it to the same groups as your users, so it can use the host pool's desktop and gets the same FSLogix and Group Policy settings.
  3. 3Open the host pool, go to Settings → Compute & Deployment → Session Acceptance Test, and enter the account's user principal name under Test account.
  4. 4Save. Atlas sets a new password for the account, keeps it only in Key Vault and changes it again after every run, so nobody knows it.

If Atlas can't change the account's password, tick Enter the password myself and type it. Atlas then uses that password and never changes it, so change it yourself from time to time.

Conditional Access

The test account must be able to sign in to your session hosts without being asked for MFA. If one of your Conditional Access policies would prompt it, make the smallest exception that works:

  • Exclude only the test account, never a group of users
  • Limit the exclusion to your session hosts' network, with a named location for their outbound IP addresses
  • Never turn MFA off more widely to make the test pass
  • Review the exclusion when you review your other Conditional Access policies

Turn it on

  1. 1Open Settings → Matrix and search for session acceptance.
  2. 2Turn Session Acceptance Test on at Global for every host pool, for one tenant, or for a single host pool.
  3. 3Optionally choose When the Session Acceptance Test Fails, and under Session Acceptance Checks That Must Pass, remove checks a pool doesn't need, for example teams for a pool without Teams. Checks you remove still run and show their result.
  4. 4To run your own check, add a PowerShell script to the Scripts library and set Session Acceptance Test Script to it.

To try the test before relying on it, run it on an existing host from the host pool's Session Acceptance Test section with Run test. It doesn't change the host's drain mode unless you ask it to.

Image rollouts

An image rollout ring can require a passing session acceptance test before it promotes. The ring then waits until a host in its pools has passed the test since the ring started, and a failure halts the rollout and rolls the ring's pools back to the previous image version. This stops a ring with no users, such as an idle canary, from promoting a broken image on bake time alone. Turn the test on for every pool in a ring that requires it.

Session acceptance test: Atlas AVD signs a test account in to every new session host and checks profiles, Group Policy and Teams before users arrive.

Before you begin

Next steps