How to Fix Microsoft 365 Sign-In Error 0xCAA50021 on Remote Desktop
Question details
The user is unable to complete the Microsoft 365 sign-in and device registration process on a virtual machine, encountering error code 0xCAA50021.

- Product
- Microsoft 365
- Device & OS
- Virtual Machine / Remote Desktop
- Scenario
- Attempting to sign in and activate Microsoft 365 applications on a virtual machine using Duo verification.
- Observed behavior
- The applications successfully accept the password and Duo multi-factor authentication, but fail during the device registration phase, displaying activation error 0xCAA50021.
Ensure that you have administrative access to the affected virtual machine and verify your network connection to Microsoft's activation servers.
Follow Microsoft's Official Device Registration Troubleshooting
Microsoft provides specific command-line procedures to resolve the device registration failure causing error 0xCAA50021.
This error is directly tied to the Azure Active Directory (Azure AD) device registration process failing on the virtual machine.
Open the Command Prompt as an administrator and type the command 'dsregcmd /status' to check if the virtual machine is properly joined to Azure AD.
If the device state indicates an anomaly or is stuck, run 'dsregcmd /leave' to unregister the virtual machine from Azure AD.
Restart the virtual machine, launch a Microsoft 365 application, and attempt the sign-in process again to trigger a fresh device registration.

Clear Stored Office Credentials and Tokens
Corrupted cached credentials from previous sign-in attempts can interfere with the device registration process on remote desktops.
Try WPS Office for a Hassle-Free Experience on Remote Desktops
If complex Azure AD registration requirements and Microsoft 365 activation errors are disrupting your remote workflow, consider switching to WPS Office. It provides a highly compatible and lightweight alternative that bypasses complicated enterprise activation protocols.
- 1. Download the installer: Visit the official WPS Office website and click the free download button.
- 2. Install on your virtual machine: Run the downloaded executable file and follow the straightforward on-screen instructions.
- 3. Open existing files instantly: Launch WPS Office and directly open your Microsoft Office documents without any format conversion.

Frequently Asked Questions
Why does Microsoft 365 error 0xCAA50021 happen specifically on a virtual machine?
This error typically occurs when the virtual machine's profile fails to register the device with Azure Active Directory during sign-in. It is often caused by cloned VM images, restricted network access to Microsoft endpoints, or conflicting device identity states.
Does Duo multi-factor authentication cause activation error 0xCAA50021?
Generally, no. The error triggers after the application successfully accepts your password and passes Duo verification. The failure point specifically lies in the subsequent device registration phase, not the authentication phase itself.
Can I bypass device registration to use Microsoft 365 without triggering this error?
In some organizational setups, you can select 'No, sign in to this app only' when a prompt asks to 'Allow my organization to manage my device'. This may bypass the Azure AD registration step and allow you to use the app without the error.




