1
votes

I have an API which is set up with "Azure AD B2C" authentication. I want to access my API from an Azure function. However, Azure Ad B2C has few limitations. I think I cannot get "Azure AD B2C" token without user interaction. My Azure function is running in a scheduled mode and will not have any user interaction. B2C documentation says "Daemons/server-side apps" are not supported with Azure AD B2C. Can someone help me how do I resolve this?

One of my colleagues was thinking that we should also let the API accept "Azure AD" token. Since "Azure AD" offers client credential flow. But I am not sure if we can make the API accept both "Azure AD B2C" and "Azure AD" authentication at a time. Also, I am not sure if this is even a good idea

1
once you have function auth code you should be able to call it from anywhere, what authentication have you set on function?harishr

1 Answers

0
votes

You are correct, B2C requires user interaction to receive a token*.

But I am not sure if we can make the API accept both "Azure AD B2C" and "Azure AD" authentication at a time.

Yes, you can do this (I will find a sample or create one).

Also, I am not sure if this is even a good idea

I don’t see why not. You are saying you have multiple STS’s you trust, nothing wrong with that.

*The ROPC flow is in private preview but from what I’ve read I wouldn’t use it.