Azure AD B2C Custom Policy: Potential bug when handling the send verification code response

Pierre-Olivier Veilleux 6 Reputation points

I have a custom policy that allows me to create users in my Azure B2C directory. In this policy I have modified the display control to send emails following this article:

From time to time, I get this JavaScript error when clicking on the Send code button:

ReferenceError: isMessageSafe is not defined  
    at Object.changeVerificationControlState  

Looking at the JavaScript code in my browser (using the prettified version provided by Chrome), I see this code, but the isMessageSafe variable does not seem to be sent anywhere, which would explain the JavaScript error

changeVerificationControlState: function(n, t, u, f) {  
  // ...  
  switch (t) {  
      // ...  
      case r.FAILED_TO_SEND:  
          u && ($(e).attr("aria-label", u),  
          isMessageSafe ? $(e).html(u) : $(e).text(u));  
          i.showElementsAndEnableControls(s, [o, y, e], h, l);  
      // ...  

Here is the content definition for the api.localaccountsignup I use for account sign up

<ContentDefinition Id="api.localaccountsignup">  
    <Item Key="DisplayName">Local account sign up page</Item>  

Thank you!

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,752 questions
{count} vote

1 answer

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

    Hi @Pierre-Olivier Veilleux , can you try updating the selfasserted version to 2.1.1 or 2.1.0 in the <DataUri> element and check if that works or not?


    Please let me know if this works. If so, please mark this answer as "Verified" so other users may reference it.


    0 comments No comments