I am trying to hide/remove "Continue" button from email verification step in user sign in journey using custom policy

Deepika Mahant 36 Reputation points
2024-05-09T09:06:39.8866667+00:00

I am trying to hide/remove "Continue" button from the email verification step in user sign-in journey using a custom policy. I have tried doing it via custom policy but it didn't work and then I found we can do it via enabling custom javascript so tried that as well but it is not working. I am not able to see my custom page in the network tab. I have updated the custom policy to reference my HTML page. Though I can load html page fine when opening in browser






// And then in signupsign in user journey


My custom page is deployed in my code repo

Please help and let me know if I missed any thing


Microsoft Entra
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 28,201 Reputation points Microsoft Employee
    2024-05-13T11:13:49.4066667+00:00

    Hi @Deepika Mahant ,

    Thanks for reaching out.

    You need to use a custom HTML page for your signup/sign-in with JavaScript/CSS for this purpose.

    You may consider using JavaScript MutationObserver to detect that the Continue button has been enabled, then automate the clicks with javascript.

    $("#continue").hide();
    var observer = new MutationObserver(function (mutations) {
        mutations.forEach(function (mutationRecord) {
            $("#continue").show();
        });
    });
    var target = document.getElementById('email_success');
    observer.observe(target, { attributes: true, attributeFilter: ['style'] });
    
    
    
    

    Reference - https://learn.microsoft.com/en-us/azure/active-directory-b2c/customize-ui-with-html?pivots=b2c-custom-policy

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/javascript-and-page-layout?pivots=b2c-custom-policy

    There seems to be some configuration issue while customize the page due to which page is not able to load with JavaScript.

    Hope this will help.

    Thanks,

    Shweta

    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments