<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content

"UNEXPECTED_ERROR" Seen when Trying to Enable Okta MFA from Azure AD

Single Sign-On
Okta Classic Engine
Okta Identity Engine

Overview

Sometimes, when trying to enable Okta Multi-Factor Authentication (MFA) from Microsoft Azure AD, the below error might be seen:

Please review the form to correct the following error(s):

 

UNEXPECTED_ERROR

 

UNEXPECTED_ERROR

 

Additionally, the System Logs will show the following error:

 

Could not validate your Office 365 credentials, received error: 400 AADSTS50126

 

Applies To

  • Microsoft Entra ID (formerly Microsoft Azure AD)
  • Microsoft 365 (M365)
  • Multi-Factor Authentication (MFA)

Cause

The Advanced API Access is not enabled.

Solution

To resolve the issue:

  1. Navigate to the Sign On tab of the Okta Office 365 app.
  2. Under Settings > API CREDENTIALS > Advanced API Access, select the checkbox for Allow administrator to consent for advanced API access.

Advanced API Access

Loading
Okta Support - "UNEXPECTED_ERROR" Seen when Trying to Enable Okta MFA from Azure AD