Reputation: 35
I have problem with getting authorization for external services using Azure B2C.
I have a web API in ASP.NET Core and React app on front. Thing is, I also need some external services (automated) accessing this API. And while I can have 'normal' flow on front end (where user types in username and password) this won't work for those services, as they are not users (can't type in password, not even mentioning they won't open a web page).
I've tried using app secrets for getting authorization tokens, but this way I can't really tell which service is connecting, as they have the same claims, no matter which secret is used for token generation. Am I missing something and there IS a way to tell which one is authorized, or do I need completely different approach?
Upvotes: 0
Views: 251
Reputation: 58733
The way we have usually achieved this is to:
This approach was necessary at the time at least since B2C did not support client credentials flow in itself (and I think still doesn't).
We usually didn't care which client app was connecting, since we can see what app permissions have been granted to it from the roles
claim in the token.
But you can identify the calling app from the appid
claim if you need that info for authorization.
Upvotes: 0