Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 0xCAA50021

Office 0xCAA50021: Microsoft 365 cannot sign you in on this computer

11 min read Updated October 5, 2026 Office & Microsoft 365 Licensing

Fix it now

Microsoft publishes a page for 0xCAA50021 but no meaning for it – only an ordered list of things to fix. Work that list rather than guessing: reset the activation state, clear the Office credentials, check nothing is blocking the identity broker, confirm the licence is assigned, and confirm the device is registered in Entra ID.

Run this in a Command Prompt and read the output before making changes

dsregcmd /status
  1. Confirm the shape of the problem. Sign in to the same account in a browser on this machine, and in Office on a different machine. If both work, the fault is this computer’s identity stack.
  2. Remove the Office credentials: Credential Manager, Windows Credentials, remove anything named MicrosoftOffice16. Then Settings, Accounts, Access work or school – disconnect the Office account if it is not the account you sign in to Windows with. Restart.
  3. Check that antivirus, a proxy, a firewall or a VPN is not blocking Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy. Microsoft names this process specifically. Disable each temporarily, in turn, to test.
  4. If nothing is blocking it, clear the broker’s cached accounts: delete the contents of %LOCALAPPDATA%\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts and of the matching Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy folder, then restart.
  5. Confirm in the Microsoft 365 admin centre that the user has a licence assigned, and that user device registration is enabled in Microsoft Entra ID.

Run Microsoft’s Microsoft 365 sign-in troubleshooter from the Get Help app after clearing the broker data. It performs the rest of the reset without you hunting for paths.

If sign-in holds through a restart you can stop. If it does not, the next section covers the three components that have to agree and what to do when one of them will not.

Why it happens

Signing in to Microsoft 365 Apps involves more moving parts than the password prompt suggests. The Web Account Manager brokers the request on the application’s behalf. The device’s registration with the tenant supplies the credential that proves which machine is asking. And where the machine has a Trusted Platform Module, the private keys behind that credential live in a protected container rather than in a file. A fault in any one of the three presents as a failure in all three, which is why the order you work in matters more than the code you started from.

Microsoft’s published guidance for 0xCAA50021 reflects that. It gives a sequence rather than a cause: reset the activation state, remove Office credentials, check whether the BrokerPlugin process is being blocked, confirm the user has a licence, confirm device registration is enabled in Entra ID, and only then leave and rejoin with dsregcmd. Nothing on that page names the Trusted Platform Module, Windows Hello, or the Web Account Manager service, which is worth knowing before you start clearing hardware state on somebody’s laptop.

The companion code changes the picture when it appears. 0x8009000F is NTE_EXISTS: the key container already exists but you are attempting to create it, and if an earlier attempt to open the key failed, that implies access to the container is denied. The second clause matters – a container you cannot use is as likely to be a permissions problem as a corrupted one, which argues for looking at what has rights to it before you destroy it.

Something is blocking the identity broker

You have this one if Browser sign-in works, Office does not, and the machine runs third-party security software, an inspecting proxy, or a VPN.

  1. Temporarily disable the antivirus product and retry.
  2. Ask whoever runs the network whether a proxy or firewall is intercepting the broker process, and have it exempted rather than left to be discovered again next month.
  3. Disconnect the VPN and retry, if the machine uses one.
  4. If the process is not blocked and sign-in still fails, clear the broker’s cached accounts as in the fix above.

Microsoft names the process by its full package identity, Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy. That is the string to give the security team, because a rule written against a friendly name will not match.

Office identity state on this profile is corrupt

You have this one if One user fails, a newly created profile on the same machine signs in without trouble.

  1. Sign out of Office, close every Office application, and remove the MicrosoftOffice16 entries from Credential Manager.
  2. Run Microsoft’s OLicenseCleanup.vbs elevated to remove Office licence state, and signoutofwamaccounts.ps1 to clear cached Web Account Manager accounts.
  3. Restart and sign back in from inside an Office application.
  4. If it still fails, test with a fresh local profile before doing anything to the original.

The device is not registered, or the registration is inconsistent

You have this one if Every user on the machine fails the same way, and dsregcmd /status reports a state that does not hang together.

  1. Confirm in Microsoft Entra ID that user device registration is enabled for this user. Microsoft lists that check explicitly for this error.
  2. Read dsregcmd /status in full and note the device state and token sections.
  3. For a registered device, disconnect the work account under Settings, Accounts, Access work or school, restart, and reconnect.
  4. As Microsoft’s last documented step, leave and rejoin: dsregcmd /leave, restart, then dsregcmd /join. On a device joined to the tenant, involve whoever manages it first.

The user has no licence assigned

You have this one if Sign-in completes but activation does not, and the account behaves the same way on a clean machine.

  1. In the Microsoft 365 admin centre, open Users, Active users, the user, then Licenses and Apps, and confirm a licence is assigned.
  2. Under Billing, then Licenses, confirm the desktop applications are selected within it.

The key container cannot be created or opened

You have this one if 0x8009000F appears alongside the failure, and PIN sign-in on the machine is also misbehaving.

  1. Treat it as a Windows Hello problem first, not an Office one. Go to Settings, Accounts, Sign-in options, PIN, and use the option to reset a forgotten PIN. That is non-destructive and fixes most of these.
  2. If the machine has just had firmware work or a motherboard change, apply any pending firmware update from the hardware vendor before considering anything more drastic.
  3. Read NTE_EXISTS as Microsoft defines it: the container exists and you cannot create it, and a failed open beforehand implies access is denied. Check what has rights to it before assuming it is corrupt.

Do not clear the Trusted Platform Module to chase an Office sign-in error. It invalidates everything else protected by that module, BitLocker included, and no Microsoft page for this code asks you to do it.

Full reference

The published method list, in Microsoft’s order

  1. Reset the Microsoft 365 activation state.
  2. Remove Office credentials from Credential Manager, and disconnect a mismatched work or school account.
  3. Perform a manual recovery.
  4. Check whether Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy is being blocked, and clear its cached accounts if it is not.
  5. Confirm user licences are assigned.
  6. Confirm user device registration is enabled in Microsoft Entra ID.
  7. Leave and rejoin Microsoft Entra ID using dsregcmd /status, dsregcmd /leave and dsregcmd /join.

Working in that order matters because each step is cheaper to undo than the one after it. Clearing credentials costs a sign-in. Clearing broker data costs a sign-in and a restart. Leaving and rejoining Entra ID affects single sign-on to everything else on the device, and on a joined machine it is not a decision for whoever happens to be sitting in front of it.

Paths and processes worth having to hand

Item What it is
Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy The identity broker process Microsoft names as commonly blocked by antivirus, proxies and firewalls
%LOCALAPPDATA%\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts Cached broker accounts, cleared as part of the documented fix
%LOCALAPPDATA%\Packages\Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy\AC\TokenBroker\Accounts The second broker account cache Microsoft tells you to clear alongside it
%localappdata%\Microsoft\Office\Licenses Where the subscription licence lands once sign-in succeeds. The ID begins EWW
dsregcmd /status Reports device join state, the device certificate and token status

Telling the layers apart before you touch anything

Test What the result tells you
Browser sign-in works on this machine The account, the password and the tenant are fine. The broker or the device state is not
Every user on this machine fails Device registration or the broker, not one profile
A new local profile signs in successfully The original profile’s cached identity
The same account fails on a second machine too The account or a policy that targets it, and this is the wrong article
0x8009000F appears alongside The cryptographic key container. Read the Windows Hello branch below before anything else

If you get as far as leaving and rejoining

  • Confirm first that the device is registered rather than joined, if you can. A registered device can be disconnected from Settings with far less collateral effect.
  • Have BitLocker recovery keys to hand for any machine you are about to change at this level, as a matter of routine rather than because this fix requires it.
  • Restart between dsregcmd /leave and dsregcmd /join, and again afterwards, so the broker picks up the new credential.
  • Expect other single sign-on to prompt again once. If it does not settle after a restart, the rejoin did not complete and the output of dsregcmd /status will say so.

What this error is not

It is not a subscription problem in the ordinary case, and it is not a reason to buy anything. Microsoft’s list does include confirming that a licence is assigned, so check it, but a missing entitlement usually announces itself with a licensing message rather than a sign-in failure. It is also not a reason to rebuild a machine as a first move, though on a single laptop with several other identity symptoms, a rebuild sometimes is genuinely faster than working the list – weigh that against what else lives on the machine.

Every code this article covers

Code What it points at Source
0xCAA50021 Microsoft publishes a dedicated activation page for this code but states no meaning; it gives an ordered remediation list instead Microsoft Learn
0xCAA70004 Microsoft lists it with 0xCAA70007 and points at connection problems during sign-in rather than at a broker handoff Microsoft Learn
0x8009000F NTE_EXISTS: the key container already exists but you are attempting to create it. A preceding failure to open the key implies access to the container is denied Microsoft Learn

Confirm the fix worked

  1. Open Word, go to File then Account, and confirm the work account appears as signed in.
  2. Run dsregcmd /status and confirm the device state and token sections are consistent.
  3. Restart and confirm sign-in survives without prompting again.
  4. Confirm a licence file has appeared under %localappdata%\Microsoft\Office\Licenses.
  5. Confirm any antivirus, proxy or VPN you disabled to test has been turned back on, and that sign-in still works with it on.

Questions people ask about this

What does 0xCAA50021 mean?

Microsoft publishes a page for it under Microsoft 365 Apps activation but does not state a cause. What it publishes is a remediation sequence, which is why this article follows that sequence rather than offering a definition somebody made up.

Why does the same account work on another machine?

Because the fault is in this machine’s broker, device registration or credential cache rather than in the account. Running that test first rules out the subscription, the licence and the tenant in one step.

Should I clear the TPM?

No, not for this. No Microsoft page for this error asks you to, and clearing it invalidates everything else that module protects – BitLocker will demand its recovery key at the next boot. If PIN sign-in is also broken, reset the PIN from Settings, Accounts, Sign-in options instead.

Is deleting the broker’s account cache safe?

It is a documented step, and it costs the user a fresh sign-in on that device. It does not touch documents, mail data or application settings. Do it after you have confirmed nothing is blocking the broker process, because otherwise it will fill up with the same broken state again.

Does this cost anything to fix?

No. Every documented step is configuration or a repair. Microsoft’s list does include confirming that the user has a licence assigned, so check that – but reassigning a seat you already own costs nothing.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error Office for Mac 0x8A010101: the account signed in holds no Office licence Free Fix Office 0x80070490: the licensing token vanishes on non-persistent VDI License Error 0xC004F050 in Office: the product key is invalid or for the wrong edition Free Fix Office 0x80070426: the Software Protection Platform service is not running
โ† Back to Knowledge Base