0
votes
  1. I have set up sign-in for multi-tenant Azure Active Directory using custom policies in Azure Active Directory B2C using the guide provided in Microsoft's documentation.
  2. I have added Azure Active Directory B2C as an identity provider for Azure API Management

When I want to sign in to the portal, I am presented with the AADB2C login screen correctly. I can select the AAD provider and I'm then taken through the signin process as I would expect. Authentication happens correctly.

However, when I am redirected back to the API Management developer portal, I am instantly presented with the AADB2C login screen again.

I am quite stuck at the moment as I am unsure how to debug this issue or what to look for next.

Has anyone been able to get this working properly, and if so, could you provide some guidance?

1
Do you mind sharing APIM service name? Not sure if you want to expose it. If not I'd recommend opening support ticket about this. - Vitaliy Kurokhtin
I think I've seen your support ticket. Seems like the error is coming from AAD side. You can capture Auth trace with Fidder, see data that gets returned from POST request to login.microsoftonline.com/te/XXXXXX/oauth2/authresp. I has a form that is send to APIM portal, and form has following data: error=server_error, error_description=AADB2C: An exception has occurred. And a correlation id is there. - Vitaliy Kurokhtin
Hi @Jacques Can you paste your custom policy in the above question? Have you attempted to debug the custom policy with the user journey recorder? - Chris Padgett

1 Answers

0
votes

It turns out that the value of the policy key I created was incorrect. After updating the policy key with the correct Application key (Not Application ID), everything worked.