Share via

with b2c custom policy, capture checkbox state during profile editing

Steve Bi 0 Reputation points
2024-05-20T16:04:16.6066667+00:00

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 Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-05-20T21:32:02.9766667+00:00

    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:

    <PersistedClaims>
      <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" />
    </PersistedClaims>
    
    
    

    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,

    James

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.