FacebookTwitterLinkedIn

4 Ways to Fix Error Code CAA50021, Number of Retry Attempts Exceeds Expectation

How to Fix Error Code CAA50021, Number of Retry Attempts Exceeds Expectation

Many Microsoft Office 365 users report experiencing error code CAA50021 when logging into Office apps such as Outlook and Teams. If you’re also getting this error, the troubleshooting steps in this article will help you fix it.

Error Code CAA50021

Error code: CAA50021
Server message: Number of retry attempts exceeds expectation.

What Causes Error Code CAA50021?

Error code CAA50021 can occur after multiple unsuccessful login attempts. It can occur for multiple reasons, but it most often occurs due to issues with Azure AD. Furthermore, this error may occur if your computer has been unlinked from your work/school account. Moreover, this can happen if the computer’s anti-virus program prevents an app from logging in.

Before trying our fixes, here are some tips:

Temporarily disable your anti-virus program. A third-party anti-virus program can prevent you from logging into your Office 365 apps by blocking the connection, temporarily disabling it, and try logging in.

Contact your organization’s IT admin. Contact your IT administrator for technical support if the issue is not on your end. This error can occur if the administrator has enabled multi-factor authentication when logging into apps such as OneDrive. Your administrator will register your device and help solve your account-related issues.

Video Tutorial on How to Fix Error Code CAA50021

Table of Contents:

Method 1. Link Your Device to the Work/School Account

If your device is not connected to your work/school account, you may get error code CAA50021 when logging into MS Office apps. The instructions below will show you how to connect to your work/school account, which should fix the error.

Right-click the Start button and click Settings

1. Right-click the Windows Start button and click Settings.

Select Accounts and select Access work or school

2. Select the Accounts panel.

3. Scroll down and select Access work or school.

Click Connect

4. Click Connect next to Add a work or school account.

Enter your email address provided by your organization and click Next

5. Enter your email address provided by your organization and click Next.

6. Follow the remaining on-screen instructions to link your device with Azure.

[Back to Table of Contents]

Method 2. Re-register Your Device with Azure

You can get error code CAA50021 if your device registration with Azure expires. In such an event you may fix the error by re-registering your device with Azure. The guide below will demonstrate how you can do it.

1. Hold down Windows+R keys to open Run.

Type CMD in Run and hold down Ctrl+Shift+Enter keys to open Command Prompt as an administrator

2. Type CMD in Run and hold down Ctrl+Shift+Enter keys to open Command Prompt as an administrator.

Run the dsregcmd /leave command

3. In the Command Prompt, type in:

dsregcmd /leave

4. Press the Enter key.

5. Then, hold down Windows+R keys to open Run.

Type certmgr.msc in Run and click OK

6. Type certmgr.msc in Run and click OK.

Navigate to Current User, Personal, Certificates

7. Navigate to Current User > Personal > Certificates.

8. In the right pane, locate the MS-Organization-Access and MS-Organization-P2P-Access entries and delete them.

Run the dsregcmd /status command and check if AzureAdJoined is set to NO

9. Go back to Command Prompt and type in:

dsregcmd /status

10. Press Enter.

11. Check if the AzureAdJoined status is set to NO. Then, close the Command Prompt.

12. Hold down Windows+R keys to open Run.

Type taskschd.msc in Run and click OK

13. Type taskschd.msc in Run and click OK.

Right-click Automatic-Device-Join and click Enable

14. In Task Scheduler, navigate to Task Scheduler Library > Microsoft > Windows > Workplace Join.

15. Right-click Automatic-Device-Join in the middle section and click Enable.

16. Close the Task Scheduler.

[Back to Table of Contents]

Method 3. Update Microsoft Office 365

If your MS Office apps are outdated, you may start getting the CAA50021 error when logging in. The solution to this issue is to update your Office suite.

1. Open a Microsoft Office app, such as Outlook.

Click File at the top-left of the menu bar

2. Click File at the top-left of the menu bar.

Select Office Account

3. Select Office Account.

Open the Update Options drop-down menu and select Enable updates

4. Open the Update Options drop-down menu and select Enable updates if they’re disabled.

Open the Update Options menu again and select Update Now

5. Open the Update Options menu again and select Update Now.

Click Continue if prompted

6. Click Continue if prompted.

7. Once Office is updated, restart your PC.

[Back to Table of Contents]

Method 4. Repair/Reset Microsoft Teams

If you get error code CAA50021 when logging into your Microsoft Teams app, try repairing it. If that doesn’t work, try resetting it.

Right-click Start and click Installed apps

1. Right-click Start and click Installed apps.

Click the three-dot button next to Microsoft Teams and select Advanced options

2. Click the three-dot button next to Microsoft Teams and select Advanced options.

Click Repair

3. In the Reset section, click Repair.

Click Reset

4. If the repair doesn’t fix the error, click Reset.

Click Reset when prompted

5. Click Reset in the dialog window to confirm the action.

[Back to Top]

▼ Show Discussion

About the author:

Rimvydas Iliavicius

Rimvydas is a researcher with over four years of experience in the cybersecurity industry. He attended Kaunas University of Technology and graduated with a Master's degree in Translation and Localization of Technical texts. His interests in computers and technology led him to become a versatile author in the IT industry. At PCrisk, he's responsible for writing in-depth how-to articles for Microsoft Windows. Contact Rimvydas Iliavicius.

Our guides are free. However, if you want to support us you can send us a donation.

About PCrisk

PCrisk is a cyber security portal, informing Internet users about the latest digital threats. Our content is provided by security experts and professional malware researchers. Read more about us.

Malware activity

Global malware activity level today:

Medium threat activity

Increased attack rate of infections detected within the last 24 hours.