1

I have SPA made by react. And user authentication is done with Azure AD B2C. Right now, we are trying to figure out a mechanism to get an access token to access the backend after a user logs in. The backend is Azure functions. I think it is set up through "Application Registration" in Azure AD B2C, but I don't know the details. I see that there is an azure functions URL

http://[yourapp].azurewebsites.net/api/[funcname]?code=[functionkey]

but where should I set it?

Please tell me...

juckier
  • 63
  • 1
  • 6

1 Answers1

1

No, functionkey is an authorization at the function level, it has no relationship with Azure AD B2C. You need to add some code to send the received bearer token against Azure AD to validate it.

There's a full sample about how to do it in here: https://medium.com/cheranga/azure-functions-validate-azure-active-directory-tokens-using-your-own-custom-binding-4b4ff648d8ac

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90