with b2c custom policy, capture checkbox state during profile editing

Steve Bi 0 Reputation points

We have b2c custom policy, we have checkbox to give user options on "Agree to receive email..." checkbox implemented with CheckboxMultiSelect as the only option, it capture value for the first time. But when user later on uncheck the checkbox, the value can not updated anymore.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,703 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 22,886 Reputation points Microsoft Employee

    Hi @Steve Bi , you'll have to use a Persisted Claim element in your custom policy. This element allows you to store the value of the checkbox in the user's profile, so that it can be retrieved and updated later. For example from the document:

      <PersistedClaim ClaimTypeReferenceId="email" PartnerClaimType="signInNames.emailAddress" />
      <PersistedClaim ClaimTypeReferenceId="newPassword" PartnerClaimType="password"/>
      <PersistedClaim ClaimTypeReferenceId="displayName" DefaultValue="unknown" />
      <PersistedClaim ClaimTypeReferenceId="passwordPolicies" DefaultValue="DisablePasswordExpiration" />
      <PersistedClaim ClaimTypeReferenceId="givenName" />
      <PersistedClaim ClaimTypeReferenceId="surname" />

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,