juckier
juckier

Reputation: 83

azure functions and AD B2C integration

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...

Upvotes: 2

Views: 1326

Answers (1)

Thiago Custodio
Thiago Custodio

Reputation: 18387

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

Upvotes: 1

Related Questions