How to configure my Azure Function API with OAuth2 to work with B2C SignIn

kdeman 11 Reputation points
2021-10-27T20:25:07.77+00:00

I have followed instructions on how to secure my API to be called from B2C Signup using OAuth2 bearer authentication. However, these instructions only outline the configuration in the custom b2c policy, but not how to configure my API itself to accept calls from B2C.

If I don't enable authentication on my API, the calls happen fine and the SignIn works perfectly. However when I enable Authentication, I get an error whilst executing the SignIn.

The error is AADB2C90027: Basic credentials specified for 'REST-GetProfile' are invalid. Check that the. Credentials are correct and that access has been granted by the resource'

Are there instructions to configure the API Authentication for this scenario?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,264 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,640 questions
{count} votes