Skip to content

Troubleshoot Microsoft UnauthorizedError

Sometimes, your end users might receive a UnauthorizedError(u'Wrong username or password for https://outlook.office365.com/) error message when they try to re-authenticate with Microsoft 365.

If this issue doesn’t resolve itself, updating your organization’s security defaults might allow them to finish the authentication process:

  1. Log in to the Microsoft Azure Portal.
  2. Select Microsoft Entra ID.
  3. Click Properties in the left navigation.
  4. Under Access management for Azure resources, select Manage security defaults.
  5. Toggle Enable security defaults to No. The Azure Active Directory Admin Center showing the "Application properties" page. The "Enable Security defaults" pane is open, and the "Enable Security defaults" toggle is set to "No".
  6. Save your changes.