A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
Hello Kris Larsen,
Greetings! I see you're encountering a "Device TPM problem" for a single user on an Azure Virtual Desktop environment when they try to log into Microsoft 365 applications. This is a known issue and the error code 2146893802 (which translates to NTE_BAD_KEYSET) often points to a corrupted user profile or issues with how the device is registered with Azure Active Directory (AAD).
Since this is happening for only one user, the problem is likely tied to that user's specific profile on the session host, rather than a broader AVD or TPM configuration issue. Here are some steps you can take to resolve this, starting with the least intrusive:
Solution 1: Disconnect and Reconnect the Work or School Account
This is often the quickest fix. It forces a re-authentication and re-registration of the device with Azure AD for that user account.
- In the AVD session, go to Windows Settings > Accounts > Access Work or school.
Select the user's work or school account and click Disconnect.
After it's disconnected, click Connect and have the user sign in again.
Solution 2: Clear the TPM and Re-register
If the above doesn't work, clearing the user's TPM-related keys and re-registering the device can resolve corruption issues.
Clear the TPM: From the Start menu, open the TPM management console by typing tpm.msc. In the Actions pane, click "Clear TPM..." to reset it.
Disconnect from Azure AD: You can do this from the "Access work or school" settings as mentioned above, or by using the command line: dsregcmd /leave.
Re-join Azure AD: Have the user sign back into an Office application. This should prompt them to re-register their device with Azure AD.
Solution 3: Rename the AAD BrokerPlugin Folder
This folder caches authentication tokens. Renaming it forces the system to create a new, clean one.
Close all Microsoft 365 applications.
Open File Explorer and navigate to %localappdata%\\Packages\\.
Find the folder named Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy and rename it to Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy.old.
Have the user sign into an Office application again.
Additional Considerations
Virtual TPM (vTPM): Azure VMs, including those used for AVD, can have a virtual TPM (vTPM) which is a virtualized version of a hardware TPM. Issues can sometimes arise with the vTPM state.
Sysprep: The error NTE_BAD_KEYSET (0x80090016) has been linked to issues with sysprepped images where the machine was joined to Azure AD before creating the image. If you're using a custom image, ensure it's generalized correctly.
For a single user, it's very likely that one of the first two solutions will resolve the problem without needing to modify the virtual machine's configuration. I would recommend trying them in order.
I hope this helps you resolve the issue for your client.
Best regards,
Jerald Felix