Microsoft 365 sign-in (Entra ID)

AADSTS50158: external security challenge not satisfied

AADSTS50158 means the user was sent to an external challenge, such as terms of use or third-party MFA. A short summary of what it means, with the full guide.

By EpiFive Editorial TeamSources checked How we check our guides

What the error means

AADSTS50158 means the user had to satisfy an additional requirement outside the normal Microsoft Entra sign-in, and was redirected to another page or authentication provider, such as a terms of use page or a third-party MFA provider. Microsoft's reference stresses that this code alone does not indicate a failure on the user's part; the sign-in logs may show whether the challenge was passed or failed.

Common causes

  • A Conditional Access policy requires terms of use or an external MFA provider.
  • In Power Apps SharePoint integration, Microsoft says the warning can be related to either multifactor authentication or Conditional Access policy.

How to fix it

1. Complete the external challenge

Users complete the page or provider they are sent to, such as accepting terms of use or approving the third-party MFA prompt, then continue.

2. Admins: check what happened next

Look up the later events for the same sign-in in the sign-in logs before changing anything. For Power Apps document integration, Microsoft says to check that multifactor authentication is turned on in Dataverse, and if it is on in both Dataverse and SharePoint, to review the SharePoint Conditional Access policy. The full guide covers terms of use, custom controls and external MFA providers: fix AADSTS50076, 50079 and 50158.

If nothing works

Give your administrator the correlation ID and time so they can find the event and the ones after it.

What we checked

Two Microsoft Learn pages were read on 2026-11-21. The Microsoft Entra error code reference describes AADSTS50158 as an external security challenge and says it alone is not a failure. The Power Apps Conditional Access article explains the AADSTS50158 warning in SharePoint integration and its MFA and policy checks. The error was not reproduced for this page.

Last checked: 2026-11-21.

Official sources

Questions people ask

What does AADSTS50158 mean?

The user was redirected to another page or provider, such as terms of use or a third-party MFA provider, to satisfy an extra requirement. Microsoft says the code alone does not mean the sign-in failed.

How do I know if an AADSTS50158 sign-in actually failed?

Microsoft says the sign-in logs may show whether the challenge was passed or failed. Check the events that follow it for the same sign-in.

Not your code?

Search the error code library, or report a code we don't cover. Spotted something out of date on this page? Report a correction.