Trying to add an additional claim to our custom Sign In page on Azure ADB2C (using custom policies) to hold a captcha response token. But the custom policy won't render the element on the page.
I've tried the sample here: https://github.com/jasjeetsuri/B2C-IEF-Custom-Policies/tree/master/LocalAccounts%20-%20Captcha%20Integration
But the additional field doesn't get rendered on the UI. Everything else is working, the captcha appears on the UI and when I log in I can see my validation API being called with the default value 0. I just can't get a DOM element to be rendered by the policy so I can set the response token.
I've tried:
- Adding a custom User Attribute (e.g. captcha) and referring to it as extension_captcha
- Updating the ContentDefinition to the latest
- Using with the Required attribute set to True, this actually gave me an error message to say the value was missing however the field was never rendered on the page
- Changing the CombinedSignInAndSignUp to ClaimsExchange but this reverted the custom Sign In UI back to the Microsoft default layout
I've gone through documentation here: https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-user-input?pivots=b2c-custom-policy
But no luck.
Does anyone know what the minimum config is to get this working?
I made the sample this way because it doesn’t work for combined sign in and sign up page. You would need two seperate policies and deep link between them.