1
votes

Is it possible to use MSAL to allow a windows service to access a web api protected by Azure AD B2C? If not, what is the best way to allow a autonomous service to access an API protected by B2C.

1

1 Answers

1
votes

This scenario should be addressed with the Client Credentials OAuth flow. This is possible in Azure AD B2C, however, the experience isn't ideal.

To do achieve this, use "App Registration" blade in the Azure Portal to register a apps that define application permissions and then register apps that use client credentials to request these. You would effectively be using the same mechanism that you use in regular Azure AD, see Azure AD's "Daemon or Server Application to Web API" documentation

Important note: Make sure you are not using the Azure AD B2C blades for this.

You can support the ask for a first class experience by voting for this entry in the Azure AD B2C feedback forum: Support OAuth 2.0 Client Credential Flow