Azure B2C - Custom Policies - Sign In journey - pass user data to REST APIs

Bogomil Andreev 1 Reputation point
2022-06-03T13:26:31+00:00

Hello Microsoft Community,

Currently, we have implemented TechnicalProfile of REST API which passes user attributes to an external endpoint in the Sign Up phase. But now we want to have the same in Sign In phase. I tried to copy/paste the TechnicalProfile with the new entries. But what should be the next steps? I'm stuck with this configuration and I can't find much information on the web on how to proceed further. I will appreciate your help!

Best Regards,
Bogomil

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,454 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Bogomil Andreev 1 Reputation point
    2022-06-07T06:22:34.05+00:00

    Hello JamesHamil-MSFT, thank you for reaching out. I was following these tutorials/docs:

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/restful-technical-profile
    https://learn.microsoft.com/en-us/azure/active-directory-b2c/api-connectors-overview?pivots=b2c-custom-policy
    https://learn.microsoft.com/en-us/azure/active-directory-b2c/add-api-connector-token-enrichment?pivots=b2c-custom-policy

    I will share more context about my issue. We have a CRM integrator/endpoint hosted on function app. After a new user's "SignUp" in Azure B2C we make an HTTP POST request to that endpoint, and CRM receives user data. This solution works.

    We want to make an HTTP GET request after the user's "SignIn". I tried to edit B2C_1A_TRUSTFRAMEWORKEXTENSIONS.xml policy following the tutorials but without success.

    I'm getting this error after user SignIn - The claims exchange 'REST-CRMGetUserInfo' specified in step '7' returned HTTP error response with Code 'BadGateway' and Reason 'Bad Gateway'.

    0 comments No comments

  2. Bogomil Andreev 1 Reputation point
    2022-06-08T15:02:06.323+00:00

    Hello, @James Hamil ,

    you can close the question/issue. We found a way to pass parameters to an external REST API following the documentation and testing after each step.

    Best Regards

    0 comments No comments

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.