How do I resolve a 404 error when using Azure AD B2C custom OpenID Connect provider with Azure Static Web Apps?

Kevin Petteys 111 Reputation points
2025-04-25T03:23:21.6233333+00:00

I'm trying to integrate Azure AD B2C as a custom OpenID Connect provider with Azure Static Web Apps (SWA). My app is a static HTML and JavaScript site (no frontend framework), and I'm using staticwebapp.config.json to configure authentication.

The deployment succeeds, and the config file is being picked up (confirmed via deployment logs). Here's my custom provider config:


"customOpenIdConnectProviders": {

  "aadb2c": {

    "registration": {

      "clientIdSettingName": "B2C_CLIENT_ID",

      "openIdConnectConfiguration": {

        "wellKnownOpenIdConfiguration": "https://
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,655 questions
0 comments No comments
{count} votes

Accepted answer
  1. Kancharla Saiteja 4,520 Reputation points Microsoft External Staff Moderator
    2025-04-25T22:55:55.1233333+00:00

    Hi @Kevin Petteys,

    Based on your query, here is my understanding: You would like to add Azure AD B2C as Open ID connect provider using static web app.

    Here is the official documentation on how to configure custom identity provider: Configure a custom identity provider.

    In order to perform this operation, you need to have at least Standard plan for Azure static web apps: Azure Static Web Apps hosting plans. This comes under Authentication provider integration of custom registrations.

    I hope this information is helpful. Please feel free to reach out if you have any further questions.

    If the answer is helpful, please click "Accept Answer" and kindly "upvote it". If you have extra questions about this answer, please click "Comment"

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.