This is a scenario page for the caa50021 error code. For the full diagnostic, start at the code hub.
CAA50021 in Microsoft Teams: Why It Happens and How to Fix It
Quick answer
CAA50021 in Microsoft Teams is a Windows Web Account Manager state issue, not a Teams bug. The high-yield fix is the same as for Outlook and OneDrive: clear stale WAM accounts with dsregcmd /cleanupaccounts from an elevated prompt, fully quit Teams from the taskbar, clear the Teams cache, and sign in again. The cache location is different in new Teams versus Classic Teams — getting that step right matters.
If you’re new to this error, read the Microsoft 365 CAA50021 hub first. This page covers Teams-specific paths.
Before you start
- Confirm which Teams you have. New Teams launched as default in 2024 and replaced the older “Classic” Teams Win32 app. Cache locations and process behavior differ. Check Settings → Apps → Installed apps: new Teams is
Microsoft Teams (work or school); Classic isMicrosoft Teams Classic. - This is the work or school account error. Personal Microsoft accounts (
@outlook.com,@live.com) don’t produce CAA50021 in Teams. - Quit Teams properly before clearing cache. Closing the window is not the same as quitting. Right-click the Teams icon in the taskbar tray and choose Quit. If you don’t, cache deletion will silently fail because the running process holds the files open.
- Don’t uninstall Teams as a first step. Reinstalling does not clear WAM. We have watched this fix consume hours and resolve nothing.
What CAA50021 in Teams actually means
The full error reads:
Something went wrong. We couldn’t sign you in. If this error persists, contact your system administrator and provide error code CAA50021.
In Teams specifically, the error appears in three flavors:
- Immediate failure on launch. You open Teams, the splash screen appears for two seconds, the error dialog replaces it.
- Hangs on “We’re getting things ready” before failing. Teams loads, sits at the welcome screen for 20–60 seconds, then drops into a CAA50021 dialog. See Teams stuck on loading if the failure mode is hang-without-error rather than CAA50021.
- “Number of retry attempts exceeds expectations.” This is the same error with Microsoft’s internal phrasing surfaced. Same fix path.
The underlying cause is identical across all three: WAM tried to broker a token for your work account, the request failed several times, and Teams gave up.
Where in Teams this appears
CAA50021 in Teams typically hits during one of these moments:
- First launch of new Teams after the upgrade from Classic. The migration carries WAM state forward, and any existing inconsistency surfaces as CAA50021 the first time the new app authenticates.
- After a password change. WAM keeps stale token state for the old credentials.
- After enabling MFA for the first time, or after an MFA reset.
- After a Windows quality update — several Patch Tuesday cumulatives have triggered WAM-state issues that surface in Teams.
- After signing out and back in following a tenant migration or organizational rename.
- When multiple Microsoft accounts are added to the device — particularly when a personal account and a work account are both signed in. WAM cross-talk between them is a recurring root cause.
Common causes (Teams-specific)
These overlap with the hub article causes, with extras specific to Teams.
1. WAM holds a stale or conflicting work-account entry. Same dominant cause as the hub. In Teams, a stale entry from another tenant — or a personal account that’s drifted into the WAM list — is particularly likely to cause CAA50021.
2. Teams cache holds bad token data. Both Classic and new Teams cache authentication artifacts locally. After WAM has been cleaned, leftover cached tokens in the Teams cache can re-introduce the bad state. Clearing WAM without clearing the Teams cache is a partial fix.
3. Teams process is still running in the background. Teams runs even when the window is closed. Cache deletion silently fails because the process holds the files open. This is the most common reason a “clear cache” fix appears to do nothing.
4. WebView2 runtime is broken or out of date. New Teams runs inside Microsoft Edge WebView2, not its own renderer. A WebView2 install that’s broken or far behind current can break the auth flow even when WAM is healthy.
5. Conditional access requires a compliant device. Same as everywhere else — but Teams is often where conditional-access blocks first show up because Teams sign-in is more frequent than Outlook profile creation. CAA50021 is the symptom; the actual block is admin-side.
Fixes to try first
Do these in order. Don’t skip ahead — the cache deletion in step 3 is rendered useless if you haven’t fully quit Teams in step 2.
1. Restart cleanly
Hold Shift while clicking Restart from the Start menu. This forces a kernel reload rather than the fast-startup hibernation Windows uses by default. Some WAM state issues clear with a real restart.
2. Fully quit Teams from the taskbar
This is mandatory before anything below works.
- Right-click the Teams icon in the taskbar tray (the small icons next to the clock, sometimes hidden under the up-arrow).
- Choose Quit. The icon should disappear.
- To confirm, open Task Manager (Ctrl + Shift + Esc) and check Processes. If you see
Microsoft Teamsorms-teams.exelisted, right-click and choose End task.
If you skip this step, the cache deletion below will silently fail.
3. Clear the Teams cache
The cache location depends on which Teams you have.
For new Teams (the one most users are on now):
- Open Run (Windows key + R).
- Paste:
and press Enter.%localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache - Inside that folder, open Microsoft\MSTeams and delete everything inside. (Don’t delete the
MSTeamsfolder itself — just its contents.)
For Classic Teams:
- Open Run (Windows key + R).
- Paste:
and press Enter.%appdata%\Microsoft\Teams - Delete everything inside the folder. (You can keep the folder itself.)
Restart Teams after the cache is clear.
4. Run dsregcmd /cleanupaccounts
If a clean cache and restart didn’t fix it, the issue is in WAM, not in Teams.
- Press Windows key, type
cmd, right-click Command Prompt, and choose Run as administrator. - Type:
and press Enter. The command returns silently — no progress bar, no confirmation. That is correct.dsregcmd /cleanupaccounts - Restart Teams and sign in again.
If the failing account was your default Windows work account, you may also need to re-add it under Settings → Accounts → Access work or school before opening Teams.
5. Disconnect and reconnect your work or school account
If the account itself is in a poor state at the device level:
- Open Settings → Accounts → Access work or school.
- Select the affected account and click Disconnect.
- Restart the device.
- Return to the same screen, click Connect, and sign back in.
You’ll be prompted for MFA. Other apps that authenticate through this primary account will need to re-authenticate the next time they open. Bookmark this page so you don’t panic when Outlook asks for a password an hour later.
Advanced fixes
Move into these only if you’ve worked through the steps above and CAA50021 still appears.
Repair WebView2
New Teams runs inside Microsoft Edge WebView2. A broken WebView2 install will break Teams auth even when WAM is clean.
- Open Settings → Apps → Installed apps.
- Search for
Microsoft Edge WebView2 Runtime. - Click the three dots, choose Modify, then Repair.
- Restart Teams.
If the runtime is missing entirely, download a fresh installer from Microsoft (search “Microsoft Edge WebView2 download” — install the Evergreen Bootstrapper).
Reset Teams from Settings
This wipes the entire Teams app state, not just the cache.
- Open Settings → Apps → Installed apps.
- Find Microsoft Teams (work or school).
- Click the three dots, choose Advanced options, then Reset.
- Restart Teams.
This is reversible — Teams will re-download settings on next sign-in.
Remove problem credentials in Credential Manager
- Press Windows key, type
Credential Manager, and open it. - Click Windows Credentials.
- Under Generic Credentials, look for entries containing
msteams,MicrosoftTeams, ormsteams_adalsso. - Expand each and click Remove.
- Restart Teams.
Uninstall and reinstall Teams (last resort)
Only do this after the steps above have failed.
- Open Settings → Apps → Installed apps.
- Find Microsoft Teams (work or school) and click Uninstall.
- Restart the device.
- Reinstall from the Microsoft Store, or from the link IT support provided.
This rarely fixes CAA50021 on its own — it works in combination with the WAM cleanup, not as a substitute.
If you are on a work or school device
On a managed device (Intune-enrolled, BitLocker on, hybrid-joined, “Company Portal” installed), do steps 1–4 from Fixes to try first and stop. Specifically:
- Do not run
dsregcmd /leaveon a hybrid-joined device. You can break the domain trust. - Do not delete certificates from your personal certificate store.
- Do not unenroll from Intune.
If those steps don’t resolve it, the issue is upstream — a conditional-access policy, an Intune compliance failure, or a stale device record in Entra ID. None of these are end-user fixable. The admin-side checklist is the right escalation document. Send it to your IT team along with a screenshot of the error and the time it started.
When to stop
Stop and escalate if:
- You’ve worked through the fixes above and CAA50021 persists, and the device is corporately managed.
- You see CAA50021 alongside or after error 80090016 in Teams. That points at TPM and Trusted Computing Group health, which is a separate root cause and may require admin-level intervention.
- The failure mode is closer to Teams stuck on loading without an explicit CAA50021 error. The diagnostic path is different.
- Multiple users on the same network or tenant report the issue at the same time. That is a tenant-side problem.
- The failure started immediately after a colleague reported a tenant migration, an MFA rollout, or a conditional-access policy change. The fix is upstream.
Related errors
- Microsoft 365 error CAA50021 (hub)
- CAA50021 in Outlook
- CAA50021 in OneDrive
- Teams stuck on loading
- Teams error 80090016 (TPM)
Official references
- Microsoft 365 Apps activation error 0xCAA50021 — Microsoft Learn
- Clear the Teams client cache — Microsoft Learn
- Microsoft Edge WebView2 documentation — Microsoft Learn
FAQ
Why does Teams keep showing CAA50021 right after I clear the cache?
Almost always because Teams was still running when you cleared the cache, and the running process re-wrote the bad state on close. Right-click the Teams icon in the taskbar tray, choose Quit, then verify in Task Manager that no ms-teams.exe process is running before you delete cache files.
Does new Teams have a different cause for CAA50021 than Classic Teams? The root cause is the same — WAM authentication state — but the diagnostic surface differs. New Teams runs inside WebView2, so a broken WebView2 runtime can produce CAA50021 even when WAM is healthy. Classic Teams uses its own Electron-based renderer and isn’t affected by WebView2 issues.
My Teams works on the web at teams.microsoft.com but not in the desktop app. Is that different? That pattern confirms the problem is local to your device, not in Microsoft’s cloud or in your account. The web client authenticates through your browser, which uses a separate credential cache from WAM. If web works and desktop doesn’t, the fix is in the steps above, specifically the WAM cleanup and cache clear.
Will signing out of Teams on my phone fix CAA50021 on my desktop?
No. CAA50021 on the desktop is a desktop-side WAM issue. Phone sign-ins use a different token path entirely. Signing out of Teams elsewhere is sometimes recommended in older guides as a “revoke all sessions” step, which is a different action — that one happens at myaccount.microsoft.com, not in the Teams mobile app.
I see CAA50021 every morning when I open Teams, but it goes away after a restart. Should I worry? That pattern usually points at a Windows fast-startup interaction with WAM token refresh. Disable fast startup in Control Panel → Power Options → Choose what the power buttons do → Change settings that are currently unavailable, uncheck Turn on fast startup, and click Save. The issue should clear within a day or two.