Azure AD B2C: Custom Policies

User Flows are easy but limited. Custom Policies (Identity Experience Framework) are XML-based beasts that unlock full control.

REST API Integration

We use a Custom Policy to call a REST API during sign-up to validate a loyalty number.

<TechnicalProfile Id="REST-ValidateLoyaltyNumber">
  <DisplayName>Check Loyalty DB</DisplayName>
  <Protocol Name="Proprietary" Handler="Web.TpeHandler.dll" />
  <Metadata>
    <Item Key="ServiceUrl">https://api.myapp.com/validate</Item>
    <Item Key="AuthenticationType">ApiKeyHeader</Item>
  </Metadata>
</TechnicalProfile>

This runs before the user accounts is created in the directory.


Discover more from C4: Container, Code, Cloud & Context

Subscribe to get the latest posts sent to your email.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.