what do I have to add/modify to AD B2C settings or web app service for an authenticated web app to work?

Chug 20 Reputation points
2024-08-07T20:25:54.0933333+00:00

I have a fully functioning web app with B2C authentication. I added a custom domain to the web app however when I use the custom domain to access the app it appears to fail on the B2C login. I feel like I need to add something to the AzureAdB2C settings in my appsettings.json file or something in the Azure portal for the authentication to give the custom domain permission.

Any help is greatly appreciated.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
939 questions
{count} votes

Accepted answer
  1. Michael Taylor 54,401 Reputation points
    2024-08-07T20:55:05.2733333+00:00

    Not really sure what you changed or what you're seeing now but if you changed your app to be on a different domain (e.g. https://mydomain.com to https://yourdomain.com) then you would also need to update B2C to indicate that it can redirect back. After B2C authenticates the user it needs to redirect them back to your site and that redirect URL is a whitelist. They won't redirect to just any URL.

    1. Go to your B2C tenant in Azure Portal
    2. Go to the App Registrations and find your application
    3. Go to Authentication under the settings.
    4. Ensure the URL(s) that you support redirecting to include the new domain you're using.
    2 people 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.