How to Fix Microsoft Teams Error CAA50021 (Device Not Registered)

Signing in to Microsoft Teams for work or school frequently presents an abrupt authentication halt: We’ve run into an issue. Error code: CAA50021. The device is not registered with Azure AD or Number of retries exceeded. Even after re-entering your correct corporate email and password, the login screen loops back to the CAA50021 failure banner.

This error code is generated by Microsoft Entra ID (formerly Azure Active Directory) and Microsoft Intune. It indicates that your organization enforces Conditional Access policies requiring all corporate accounts to operate exclusively on trusted, registered hardware. When your computer’s local Workplace join token expires, becomes disabled in the Azure portal, or the Web Account Manager (WAM) broker cache corrupts, Teams blocks authentication. Below are the steps to re-register your device and resolve error CAA50021.

Re-Register Your Device in Microsoft Entra ID via dsregcmd

Windows includes a dedicated command-line diagnostic utility for managing Active Directory device registration. Forcing a re-registration handshakes with Azure servers:

  1. Press the Windows Key, type cmd, right-click Command Prompt, and select Run as administrator.
  2. Check your current device join state by executing:
    dsregcmd /status
  3. Look under the “Device State” section. If AzureAdJoined or WorkplaceJoined indicates NO or reports expired certificates, force a re-registration:
    dsregcmd /forcerecovery
  4. If the recovery flag completes, restart your PC to refresh the hardware token.

Disconnect and Reconnect Your Work or School Account

Re-establishing the Workplace account connection in Windows Settings refreshes device certificates cleanly:

  1. Press Windows + I to open Settings.
  2. Navigate to Accounts > Access work or school.
  3. Click on your corporate or school account tile to expand options.
  4. Click Disconnect and confirm when prompted. (Note: This severs local enterprise policy sync but does not delete cloud data).
  5. Restart your computer.
  6. Return to Settings > Accounts > Access work or school and click Connect.
  7. Enter your organizational credentials and ensure the box stating “Allow my organization to manage my device” is ticked before clicking OK.

Flush Microsoft Teams and Identity Broker Caches

Cached authentication tokens in the Windows Identity Broker can hold on to obsolete device IDs:

  1. Ensure Microsoft Teams is completely closed.
  2. Press Windows + R, type the following path, and press Enter:
    %localappdata%\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts
  3. Select all files in the Accounts folder and delete them.
  4. Next, clear the main Teams cache by deleting all files inside:
    %appdata%\Microsoft\Teams
    (or for modern Teams):
    %localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Roaming\Microsoft\Teams
  5. Relaunch Microsoft Teams and sign in.

Have Your IT Administrator Verify Device State in Azure Portal

If you recently reformatted your PC or changed hardware components, your device ID may have been marked as “Disabled” by security administrators. Contact your IT helpdesk to have them inspect the Microsoft Entra admin center > Devices > All devices, locate your device name, and ensure its state is toggled to Enabled.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.