Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Teams sign-in error 0xCAA20004, 0xCAA70004 or 0xCAA82EE7: what the code means and what to check

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

The code on the Teams sign-in screen tells you where to look. Microsoft's page names five: 0xCAA82EE7 and 0xCAA82EE2 point to network access, 0xCAA20004 to Conditional Access, and 0xCAA70004 and 0xCAA70007 to a Microsoft page on sign-in connection issues in Office. For 0xCAA70007 that page names the processes and the address to check, covered below. Start with the Teams Sign-in diagnostic in the Microsoft 365 admin center, check that the client is up to date, work through the code, and reinstall only when nothing else has fixed it.

Write the code down exactly as it appears. A support request needs it, and the fix depends on it.

What the error means

Microsoft's page says to troubleshoot Teams sign-in errors by running the Teams Sign-in diagnostic or the Microsoft Remote Connectivity Analyzer test, and then gives guidance for these codes only:

Code What Microsoft's page says
0xCAA82EE7 or 0xCAA82EE2 Make sure the user has Internet access, then use the Network assessment tool to verify that the network and network elements between the user's location and the Microsoft network are configured correctly. This enables communication to the IP addresses and ports Teams calls need
0xCAA20004 "This error occurs if an issue affects conditional access"
0xCAA70004 or 0xCAA70007 Also applies "if the sign-in issue also occurs in other Office applications"; the page's instruction is to see "Connection issues in sign-in after update to Office 2016 build 16.0.7967", covered below

The page gives no mechanism for 0xCAA20004 beyond the sentence above. For 0xCAA70004 and 0xCAA70007 it hands over to the Office page, "Connection issues when signing in after updating to Office 2016 build 16.0.7967 on Windows 10". That page applies to Microsoft 365 Apps for enterprise and Office 2016 and does not mention Teams, so treat it as the Microsoft source for the code, not as a Teams procedure. It names 0xCAA70007 in the message "We couldn't connect to one of the services we needed to sign you in. Please check your connection and try again." and says to look in Event Viewer under Applications and Services Logs > Microsoft > Windows > AAD > Operational for entries that mention XMLHTTPWebRequest with error codes matching the pattern 0x?AA7????. It does not name 0xCAA70004 itself, which fits that pattern. If the code on your screen is not in the table, the page refers you to Microsoft's support article on trouble signing in to Teams.

A Conditional Access block on Teams can come from a resource the user never named. Microsoft's Conditional Access troubleshooting page explains that when a user signs in to Teams they request access to several resources, such as Teams chat, Outlook calendar and Excel documents, so a policy that restricts SharePoint applies even when the user believes they are only signing in to Teams. The Audience entry in the sign-in log lists the resources requested. This matters for 0xCAA20004 because the policy that applied may not mention Teams at all.

If the sign-in error occurs only in the Teams web client, the page says to look at a separate Microsoft page for a login loop, which gives resolutions specific to the user's preferred browser.

Likely causes

Cause What you see How to confirm
Network path to Microsoft is blocked or misconfigured 0xCAA82EE7 or 0xCAA82EE2 The Network assessment tool; Microsoft 365 URLs and IP ranges reachable from the user's location
A Conditional Access policy affects the sign-in 0xCAA20004 The failed event in the Entra sign-in log, Conditional Access tab
Token-acquisition processes or the sign-in address blocked 0xCAA70007 and "We couldn't connect to one of the services we needed to sign you in" AAD Operational log entries matching 0x?AA7????; Edge to https://login.microsoftonline.com fails; firewall, antivirus or Windows Defender rules for the two processes the Office page names
Office sign-in fails in other apps 0xCAA70004 or 0xCAA70007, and Outlook or Word also fail Whether other Office apps fail to sign in
Browser blocks sites or cookies Teams needs (web client) Teams does not load in Edge, Chrome, Firefox or Safari The browser's cookie and Trusted Sites settings against Microsoft's list
Client out of date Features missing; sign-in error persists Settings and more > Check for updates

Prove the cause before changing anything

  1. Note the exact code, the user and the time. Ask whether the same code appears for the same user on another device, and for other users at the same site. This is a way to narrow the search, not a finding from Microsoft's pages: a code that follows the user suggests the account or a policy, and a code that stays with one device suggests that device or its network.
  2. Run the Teams Sign-in diagnostic. It needs a Microsoft 365 administrator account and, per Microsoft's note, is not available for Microsoft 365 Government, Microsoft 365 operated by 21Vianet or Microsoft 365 Germany. In the admin center the diagnostic's field reads "Provide the username or email of the user reporting this issue"; enter the affected user's address and select Run Tests.
  3. Run the Microsoft Remote Connectivity Analyzer's Teams Sign in test. Sign in with the credentials of the user, enter the verification code and select Verify. Microsoft notes the tool does not support Microsoft 365 Government environments (GCC or GCC High).
  4. If the diagnostic finds nothing, check the client version. In the Teams window, select the Settings and more menu next to the profile picture, then Check for updates. Microsoft's auto-update page adds that Teams updates only when idle, that users must be signed in for updates to download, and that a client installed to Program Files by a script will not update itself.
  5. For 0xCAA20004, open the Microsoft Entra admin center and go to Entra ID > Monitoring & health > Sign-in logs, find the user's failed event and select the Conditional Access tab to see which policy applied.
  6. For 0xCAA70004 or 0xCAA70007, try another Office app on the same device. If it fails too, the problem is not specific to Teams.
  7. For 0xCAA70007, apply the Office page's read-only checks. Open Event Viewer, go to Applications and Services Logs > Microsoft > Windows > AAD > Operational, and look for entries that mention XMLHTTPWebRequest with error codes matching the pattern 0x?AA7????, 0x?AA8????, 0x?AA3????, 0x102 or 0x80070102. Make sure the time of those errors matches a time you were actually connected, and that it is not an intermittent loss of Wi-Fi or a wake from hibernation. Then open Edge (not Internet Explorer) and go to https://login.microsoftonline.com; you should reach https://www.office.com or your company's default landing page. Repeat in InPrivate mode. The page says that if navigation fails, the network environment, local firewall or antivirus software is the cause.
  8. The Office page lists other event-log patterns, which it ties to repeated credential prompts rather than to 0xCAA70007: 0x?028????, 0x?029???? and 0x?009???? point it to a malfunctioning Trusted Platform Module (TPM), and the messages "AADSTS135011: Device used during the authentication is disabled" and "AADSTS50155: Device is not authenticated" to a device that was disabled or deleted. Its recovery steps for them are on that page.

Example (illustrative): at Contoso (contoso.com.au), several staff in a branch on 10.0.20.0/24 see 0xCAA82EE2 after a firewall change on Friday. The Teams Sign-in diagnostic reports nothing for the user's account. The Network assessment tool from a branch laptop shows the network path to Microsoft is not configured correctly. Contoso restores the rule that had been removed, and staff sign in on the next attempt. A single user elsewhere seeing 0xCAA20004 would instead go to the Conditional Access tab.

Fix

  • 0xCAA82EE7 or 0xCAA82EE2: Save first: export the current rules. Risk: a firewall or proxy change affects every user behind it. Correct the network path the assessment tool identifies. To undo it: re-import them.
  • 0xCAA20004: find the policy and decide with its owner whether the block is intended. Disruptive step: editing a Conditional Access policy changes who can reach your data. Save first: write down the policy's state, users, resources, conditions and controls. Back-out: put those values back and save.
  • 0xCAA70007 with the proofs above: Save first: export the current rules and exclusions. Risk: changing firewall, antivirus or Defender rules changes protection on that device or every device behind the rule. Make sure your local firewall, antivirus software and Windows Defender do not block C:\Windows\SystemApps\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\Microsoft.AAD.BrokerPlugin.exe and C:\Windows\System32\backgroundTaskHost.exe, which the page says engage in token acquisition, and that your network does not block https://login.microsoftonline.com. The page notes that this address covers many IP addresses and services, so some may be blocked for no apparent reason, giving intermittent faults on some devices only. To undo it: restore the exported rules. The page also advises updating to the latest build for your Office channel and running Windows 10, version 22H2.
  • 0xCAA70004: the Office page does not name this code. If other Office apps also fail to sign in, follow the Office page and use its 0x?AA7???? pattern to decide whether your log entries match.
  • Web client only: Save first: note the browser's current cookie and site settings, and the CookiesAllowedForUrls value if a policy sets one. Risk: turning third-party cookies on is a browser-wide change that affects every site the user visits, and cookie exceptions widen what the listed sites may store. Allow Teams' sites in the browser. The Teams doesn't load page lists [*.]microsoft.com, [*.]cloud.microsoft, [*.]microsoftonline.com, [*.]teams.skype.com, [*.]teams.microsoft.com, [*.]sfbassets.com and [*.]skypeforbusiness.com. The page's Note says Microsoft recommends blocking third-party cookies and explicitly allowing specific cookies from domains you trust. Its Edge steps lead with turning on "Allow sites to save and read cookie data (recommended)" and making sure Block third-party cookies is turned off. If third-party cookies must stay blocked, the page's alternative is to add the listed sites under Allow in the same Edge window, or to add them to the CookiesAllowedForUrls setting through a mandatory or recommended policy; that setting is a separate Group Policy route. To undo it: restore the noted settings and remove the exceptions.

If the error persists, the last step on Microsoft's page is to reinstall Teams. Read the next paragraph and complete its save-first step before you start.

Disruptive step: deleting the Teams folder and reinstalling. The page does not say which Teams client it applies to. Microsoft's clear-cache page gives %appdata%\Microsoft\Teams for classic Teams and, for new Teams, %userprofile%\appdata\local\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams. That page also warns that clearing the cache deletes diagnostic logs, which matter if you are heading for a support request. Save first: write down the error code, copy the folder to another location, and collect debug logs if you intend to contact Microsoft. Back-out: with Teams closed, copy the saved folder back. If you opt for the new Teams reset instead (Settings > Apps > Installed apps > Advanced options > Reset), the page says app data, including personalisation settings, is deleted, with no restore.

Once the save-first step is done, Microsoft's page gives these steps: uninstall Teams, browse to the %appdata%\Microsoft folder, delete the Teams folder, download and install Teams, and if possible install as an administrator by right-clicking the installer and selecting Run as administrator.

If none of this resolves the problem, create a support request and give Microsoft the debug logs and the error code displayed on the sign-in screen.

Confirm the fix

  1. Ask the user to sign out of Teams fully, close it and start it again.
  2. Sign in. Confirm Teams opens to chats and meetings, not only the sign-in page.
  3. Rerun the Teams Sign-in diagnostic for the same user and read the result.
  4. For a network fix, test a second user at the same site.

What to watch afterwards

  • Other users at the same site or on the same policy. One code can be the first report of many.
  • Firewall and proxy changes. Keep the Microsoft 365 URLs and IP ranges page, which Microsoft updates, in your change checks.
  • Clients that are not updating. Microsoft says Teams updates only when idle and signed in.

Risks and limits

  • No commands are given. The portal and file-system steps have not been run or lab-tested.
  • The Teams sign-in page gives no cause for 0xCAA20004 beyond one sentence. The Office page it points to is written for Office apps and does not mention Teams or 0xCAA70004, so its checks for 0xCAA70007 are a route to a cause, not a confirmed Teams procedure.
  • Teams client folders and policy details change between Teams versions; check the current Microsoft pages.
  • Deleting local Teams data cannot be reversed unless you saved a copy first.

Sources