B2C WebApi chain

bdiddy 171 Reputation points
2020-08-11T03:09:31.947+00:00

Hi,

I have a webapp SPA written in Angular, that communicate with WebAPI_A written in .net core 3.1

WebAPI_A also communicates with WebAPI_Z also written in .net core 3.1

All 3 are secured with B2C.

The SPA can talk to WebAPI_A but when WebAPI_A tries to talk to WebAPI_Z on behalf of the user that logged in the SPA it just doesn't work saying "The supplied grant_type [urn:ietf:params:oauth:grant-type:jwt-bearer] is not supported"

Then I read that B2C doesn't support client credential and on-behalf-of flow ....

Any way to make this work ? Does anybody know if it will be supported?

Thank you

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} vote

Accepted answer
  1. AmanpreetSingh-MSFT 56,876 Reputation points Moderator
    2020-08-11T08:49:59.65+00:00

    Hi @bdiddy

    Client credential and on-behalf-of flow is not supported with b2clogin.com endpoint and here is an active feedback link for this feature: https://feedback.azure.com/forums/169401-azure-active-directory/suggestions/34950694-add-support-to-azure-ad-b2c-for-the-on-behalf-of-f

    Although, these flows are planned to be added to B2C but there is no ETA as of now.

    However, client credential and on-behalf-of flow are supported with login.microsoftonline.com endpoint of Azure AD B2C tenant. Which means, you can't use these flows with B2C user flows but you can use it with standard Azure AD functionality of your B2C tenant. Please refer to below screenshot where I have used OBO flow to get a token from my B2C tenant:

    16949-image.png

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.