<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
System Status
Announcements
Announcements
Search
Search
Select Language

AADB2C Receiving 404 Response From Okta's OpenID Connect Well-Known Metadata Endpoint

Okta Classic Engine
Okta Identity Engine
API Access Management

Overview

Integrating Azure Active Directory B2C (AADB2C) with Okta via OpenID Connect can result in a 404 error when AADB2C makes a request to the OpenID Connect metadata endpoints. This occurs if DiscoverMetadataByTokenIssuer is set to true.

 

To resolve this error, set DiscoverMetadataByTokenIssuer to false.

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic
  • API Access Management
  • OAuth 2.0/OpenID Connect application
  • Azure Active Directory B2C (AADB2C)

Cause

In Azure Active Directory B2C, if the DiscoverMetadataByTokenIssuer set to true, AADB2C will automatically construct the OpenID Connect well-known metadata endpoint URL by adding /.WELL-KNOWN/OPENID-CONFIGURATION to the Issuer URL.

 

When making a request to this endpoint (for example,  https://example.com/oauth2/default/.WELL-KNOWN/OPENID-CONFIGURATION), a 404 error response will be returned, as Okta only supports an all-lowercase version of this URL (for example, https://example.com/oauth2/default/.well-known/openid-configuration).

Solution

How is the integration configured to prevent the 404 error?

Set the DiscoverMetadataByTokenIssuer to false in Azure Active Directory B2C so that Azure AD B2C will read the value for the METADATA key. This will prevent AADB2C from automatically constructing the well-known path in all uppercase letters and encountering the 404 error response from Okta

 

Related References

Loading
AADB2C Receiving 404 Response From Okta's OpenID Connect Well-Known Metadata Endpoint | Okta Support