Hi @RT,
Based on your query, here is my understanding: I see you would like to authenticate Function app
using Azure AD B2C.
I believe the configuration was successful if you are receiving the token from Azure AD B2C, but I would like to check few more points to make sure you call the correct redirect_URI
in order to invoke the function app using the access token.
Please cross check the below steps and perform the necessary actions to achieve the end goal:
- While configuring an application in App registration, configure application as
Web app
. please make sure you add your function app complete URL (retrieve it from the overview of function app) and extend this as follows:{YOUR-FUNCTION-APP-URL}/.auth/login/aad/callback.
Here kindly chooseImplicit flow
for authentication. - While adding Azure AD B2C, you need to choose
Entra ID
(Formerly Azure Active directory) as authentication and go toadvanced settings
. Here it will ask you to provideIssuer URI
andClient ID
. Here the Client ID should be the one you are using to retrieve the token and the Issuer URI should be thesign up and sign in URL
.
Here are the additional documents:
Configure authentication in a sample single-page application by using Azure AD B2C
Create a REST API for a token issuance start event in Azure Functions
Authentication and authorization in Azure App Service and Azure Functions
If the answer is helpful, please click "Accept Answer" and kindly "upvote it". If you have extra questions about this answer, please click "Comment".