0
votes

I would like to add authentication to a web application running ​on Azure Web Apps using Azure AD B2C.

To do so, I followed the following steps:

  1. Create an tenant on Azure AD B2C
  2. Add app registration and client key
  3. Add user flow
  4. From "Authentication" (on the left side panel) on Azure Web Apps, I chose Microsoft as identity provider and supplied configurations based on the values obtained in the previous steps.

But when I accessed the Azure Web Apps url, I was not redirected to the login page, but got the following message.

{"code":401,"message":"An error of type 'unauthorized_client' occurred during the login process: 'AADB2C90057: The provided application is not configured to allow the 'OAuth' Implicit flow.\r\nCorrelation ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\nTimestamp: 2021-04-09 10:06:00Z\r\n'"}

Also, in the edit page of identify provider, it says Application with ID xxxxxxxxxxxxxxxx not found in the current tenant. Tenant ID: yyyyyyyyyyyyyyyyy.

This obviously means that the application I registered on the Azure B2C tenant is not on the same tenant as one the Azure Web Apps is linked.

My question is "how to add authentication on Azure Web App using its "Authentication" feature via Azure AD B2C?". Does Microsoft identity provider of The "Authentication" feature only support clients on the same tenant as Azure Web Apps?

1

1 Answers

3
votes

how to add authentication on Azure Web App using its "Authentication" feature via Azure AD B2C?

According to your error, it should be caused by your application not enabling implicit flow. So, you need to enable it in Azure B2C.

  1. Go to Azure B2C portal>App registrations>your app>Authentication.

enter image description here

2.Go to Azure B2C portal>Applications (Legacy)>your app.

enter image description here

Does Microsoft identity provider of The "Authentication" feature only support clients on the same tenant as Azure Web Apps?

Yes.