Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Security
Unanswered

Azure AD B2C with Power Pages – Getting HTTP 401 Error After Clicking Sign-In

(1) ShareShare
ReportReport
Posted on by 2

Hi Power Platform Community,

I'm working on integrating Azure AD B2C as the default identity provider for my Power Pages site (using the default domain). I’ve set up a new environment with a blank Power Page to avoid caching issues from earlier attempts, but I’m running into a 401 Unauthorized error when clicking the Sign in button.

Here's what I’ve done so far:
  1. Created an Azure AD B2C tenant
  2. Configured a sign-up/sign-in user flow.
  3. In Power Pages identity provider configs, begin configuring Azure AD B2C identity provider, copied the Redirect URI.
  4. Over in the Azure AD B2C tenant, registered an app and pasted the Redirect URI that I copied (in step above).
  5. Copied the Application (client) ID from the B2C app registration into the Power Pages identity provider config window into the Client ID field
  6. Copied the Issuer URL from the "run flow" openid-configuration into the Power Pages identity provider config window in the Authority field.
  7. Specified the Default Policy ID (the name of the user flow)
  8. In Valid Issuers: Only the issuer URL above for now
  9. Set Azure AD B2C as the default provider
  10. Published the site
The result is "This page isn’t working. If the problem continues, contact the site owner. HTTP ERROR 401."

This is my 3rd time trying to get Azure B2C to work as an identity provider for Power Page and starting over since it wouldn't work. I'm at my wits end. I believe I have followed the documentation here exactly: https://learn.microsoft.com/en-us/power-pages/security/authentication/azure-ad-b2c-provider?WT.mc_id=academic-76751-japhletnwamu and I've also reviewed https://techcommunity.microsoft.com/blog/educatordeveloperblog/using-azure-ad-b2c-as-an-identity-provider-in-power-pages/3574354. Perhaps this just doesn't work? I have a M365 Business Plan (the trial) as well as a free tier azure and I'm using a power page developer environment. I'm trying to build a proof of concept application, and this is my current blocker. 
Categories:
  • Ajlan Profile Picture
    127 on at
    Azure AD B2C with Power Pages – Getting HTTP 401 Error After Clicking Sign-In
    Hello
    The problem is within your sign-up/sign-in user flow. Can you share the screen clip of your flow properties.
     
    Thank you
  • CD-26090929-0 Profile Picture
    2 on at
    Azure AD B2C with Power Pages – Getting HTTP 401 Error After Clicking Sign-In

    Hi KevSynapthrive,

     

    I’m seeing the same issue when integrating itsme as a custom IDP in Power Pages – it simply won’t work. Given that itsme is used successfully by millions of Belgians, this integration unquestionably has to function correctly.

    A few details on my end:

    • I suspect the root cause lies within Power Pages itself.

    • I raised an initial support request with Microsoft in November 2024, but their subcontractor couldn’t resolve the problem.

    • I’ve just submitted a fresh service request today, though I’m doubtful we’ll progress if it remains with the same team.



    •  

    Has anyone managed to get itsme up and running in Power Pages, or know how to escalate this to a specialised Power Pages identity team?

    Any pointers would be greatly appreciated.

  • KevSynapthrive Profile Picture
    2 on at
    Azure AD B2C with Power Pages – Getting HTTP 401 Error After Clicking Sign-In
    I decided to open a case with Microsoft Support. At this point I think it might be something that just can't work with a free tier of Azure/Azure B2C, a developer power platform environment/Power Apps for Developer, a "private" power page, and/or Microsoft 365 Business Basic. 
     

    🔄 Update: Troubleshooting Steps Completed So Far

    I'm now encountering an immediate 502 - Web server received an invalid response error when clicking "Sign In" on my Power Pages site configured to use Azure AD B2C as the external identity provider. The Azure AD B2C login screen never appears.

    Here’s a full breakdown of what I’ve tried:

    🔧 Azure AD B2C Setup

    • Created a new app registration directly within the Azure AD B2C tenant, not the default Azure AD directory.
    • Added the correct redirect URI (/signin-oidc) to the app registration. I have also tried with the default redirect URI. Neither works.
    • Set "accessTokenAcceptedVersion": 2 in the app’s manifest.
    • Confirmed the user flow is active and correctly configured.
    • Manually tested the full B2C /authorize URL with all required parameters (client_id, p, redirect_uri, etc.) — it loads the B2C screen when run directly, but that also shows an error too "AADB2C90068: The provided application with ID '<removed>' is not valid against this service. Please use an application created via the B2C portal and try again."

    🔧 Power Pages Identity Provider Configuration

    • Configured a new identity provider with:

      • Correct authority (using domain-based format, not tenant ID)

      • Correct client ID from the B2C tenant

      • Proper redirect URI

      • Correct Default Policy ID

      • Valid issuer set to match B2C

      • Login and registration claim mappings using standard OIDC claim URIs

    • Re-published the Power Pages site multiple times

    • Verified the LoginButtonAuthenticationType site setting matches the authority

    • Set the UsePortalErrorPage setting to true (still no descriptive error shown)

    • Deleted and fully recreated the identity provider and all related site settings to eliminate caching issues

    🧪 Additional Diagnostic Steps

    • Confirmed all claim mappings and site settings match expected formats

    • Validated no trailing slashes or case mismatches in site settings

    • Completely deleted power page and tried again

    • Created a totally different developer environment and started over

    ⚠️ Current Environment Context

    • Power Pages site is in a developer environment and currently set to private (requires login)

    • Using Azure AD B2C free tier

    • M365 tenant is on Business Basic plan

    🙏 Looking for insight into:

    • Whether private Power Pages sites in developer environments have known limitations with external identity providers

    • Whether there's any backend service sync, feature flag, or portal limitation that could explain why the OIDC flow is not initializing properly

    • Any additional diagnostic tools or telemetry that can be enabled for deeper visibility

  • ronaldwalcott Profile Picture
    3,497 on at
    Azure AD B2C with Power Pages – Getting HTTP 401 Error After Clicking Sign-In
    Try to get some more details on the 401 error by using the browser developer tools and post them here.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,631 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,964 Most Valuable Professional

Leaderboard

Featured topics