I've set up a custom sign up and a profile edit policy with Azure AD B2C. I created a custom attribute that a user can fill out. It's optional. However, I ran into a problem that if a user sets a value for this attribute during sign up they cannot remove that value and replace it with an empty string. B2C will dismiss this empty value and leave the original value untouched. Only if a user sets a different non-empty value that value gets persisted.
Yes. Azure Active Directory (AD) Connect and components of V1. 0 are to be deprecated and retired on and prior to August 30, 2022.
On the Portal settings | Directories + subscriptions page, find your Azure AD B2C directory in the Directory name list, and then select Switch. In the Azure portal, search for and select Azure AD B2C. On the overview page, under Policies, select Identity Experience Framework. Select Policy Keys and then select Add.
For your custom policies, you need to add a metadata item in to the technical profiles you want to receive null values from claims. In the scenario you outline, if you update the SelfAsserted-ProfileUpdate
technical profile (assuming this is the technical profile your EditProfile user flow references) with this metadata item, you should be able to update an attribute and receive a null claim back, meaning the attribute gets cleared in AAD. Here is the metadata item to add:
<Item Key="AllowGenerationOfClaimsWithNullValues">true</Item>
Give this a shot and let me know if it resolves your issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With