Azure AD B2C - Error "Missing required element [Password]" (UserMessageIfMissingRequiredElement) when input is only whitespace.

Viktor Lindstedt 20 Reputation points
2024-01-24T13:06:10.2766667+00:00

Hi! I am getting the error "Missing required element [Password]" (UserMessageIfMissingRequiredElement) in our custom policy for SignIn when user input is only whitespace and I do not understand why. The element in question does in fact have an input (even though it's only whitespaces) so it should not be missing? Shouldn't this result in some invalid error like UserMessageIfInvalidPassword or atleast DefaultMessage instead? See images below for reference. User's image

User's image

Thanks, Viktor.

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,954 questions
0 comments No comments
{count} votes

Accepted answer
  1. James Hamil 26,116 Reputation points Microsoft Employee
    2024-01-25T23:15:39.2066667+00:00

    Hi @Viktor Lindstedt , this is expected behavior. The error is thrown because the input contains no valid elements. UserMessageIfInvalidPassword is if the password is incorrect. The linked page details more examples. 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


7 additional answers

Sort by: Most helpful
  1. Majano Morales,Hedar 0 Reputation points
    2024-10-29T16:57:00.4966667+00:00
    {"status":"400","message":"Missing required element [Verification Code]"}<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><title>Logging in...</title><meta name='CACHE-CONTROL' content='NO-CACHE'/><meta name='PRAGMA' content='NO-CACHE'/><meta name='EXPIRES' content='-1'/></head><body><form id='auto' method='post' action='https://bcps.schoology.com/login/saml/receive'><div><input type='hidden' name='SAMLResponse' id='SAMLResponse' value='PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAw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RjRERFbC9wQThvNWlHS0RweFBOajl4UTNudkhyZ21tSlVhTXFoeEgrMHQ1WmNCZmZvbXlrYTdBUzF4RkgwRWtVN1loTTdHN3dnVGdReEl6Z1FQNmpLUmdnblBKZzVWSGxvQ1dCOS9JMGJveXYyazlrekp1NjBxZGREMHExL1pDeG0yRGNackNGWlVrVUVETnZDOU4yeHkwRmIySWtyKzcrSytHNGg0cFAxcjFXR1NxVWozRm96ZWVxN0doL01DYnZjazhaUmF1NXl0elVlYzVtRWVqWDc3aVR0UlI1bmVsMmFxN0dyMWtlT0dNeVFjR3A1S3psVjBqempTZzJReGkxemc4Y2dpSm1YdkU0PTwvWDUwOUNlcnRpZmljYXRlPjwvWDUwOURhdGE+PC9LZXlJbmZvPjwvU2lnbmF0dXJlPjxzYW1scDpTdGF0dXM+PHNhbWxwOlN0YXR1c0NvZGUgVmFsdWU9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpzdGF0dXM6UmVzcG9uZGVyIiAvPjxzYW1scDpTdGF0dXNNZXNzYWdlPklkOjc5ZmQ3NGMzLTM4ZTctNDJmOS1iMDgxLWFiYWEwMjAzYzA4NSA7IE1lc3NhZ2U6IEVycm9yVGV4dEtleTogVXNlck1lc3NhZ2VJZk1pc3NpbmdSZXF1aXJlZEVsZW1lbnQ8L3NhbWxwOlN0YXR1c01lc3NhZ2U+PHNhbWxwOlN0YXR1c0RldGFpbD48SXNQb2xpY3lTcGVjaWZpY0Vycm9yPmZhbHNlPC9Jc1BvbGljeVNwZWNpZmljRXJyb3I+PC9zYW1scDpTdGF0dXNEZXRhaWw+PC9zYW1scDpTdGF0dXM+PC9zYW1scDpSZXNwb25zZT4='/><input type='hidden' name='RelayState' id='RelayState' value='https://bcps.schoology.com/login/saml'/></div><div id='noJavascript' style='visibility: visible; font-family: Verdana'><p>Although we have detected that you have Javascript disabled, you will be able to use the site as normal.</p><p>As part of the authentication process this page may be displayed several times. Please use the continue button below.</p><input type='submit' value='Continue' /></div><script type='text/javascript'>
                        <!-- 
                            document.getElementById('noJavascript').innerHTML = ''; document.getElementById('auto').submit(); 
                        //--></script></form></body></html>
    
    
    0 comments No comments

  2. Majano Morales,Hedar 0 Reputation points
    2024-10-29T16:57:11.61+00:00
    {"status":"400","message":"Missing required element [Verification Code]"}<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><title>Logging in...</title><meta name='CACHE-CONTROL' content='NO-CACHE'/><meta name='PRAGMA' content='NO-CACHE'/><meta name='EXPIRES' content='-1'/></head><body><form id='auto' method='post' action='https://bcps.schoology.com/login/saml/receive'><div><input type='hidden' name='SAMLResponse' id='SAMLResponse' value='PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIElEPSJfM2IzY2RkNWMtNmJhOC00ZWViLTlkMjEtYWJiZTA5ODgyNmI1IiBJblJlc3BvbnNlVG89Ik9ORUxPR0lOXzIyYWU3NWVjOTI3ZjFiYTdiNDI0YThlYjk4Y2I1YTBjOTgxNTlmMWIiIFZlcnNpb249IjIuMCIgSXNzdWVJbnN0YW50PSIyMDI0LTEwLTI5VDE2OjU1OjEzLjI5NTg3MzJaIiBEZXN0aW5hdGlvbj0iaHR0cHM6Ly9iY3BzLnNjaG9vbG9neS5jb20vbG9naW4vc2FtbC9yZWNlaXZlIiB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIj48c2FtbDpJc3N1ZXIgRm9ybWF0PSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6bmFtZWlkLWZvcm1hdDplbnRpdHkiPmh0dHBzOi8vbXliY3B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zcG9uZGVyIiAvPjxzYW1scDpTdGF0dXNNZXNzYWdlPklkOjc5ZmQ3NGMzLTM4ZTctNDJmOS1iMDgxLWFiYWEwMjAzYzA4NSA7IE1lc3NhZ2U6IEVycm9yVGV4dEtleTogVXNlck1lc3NhZ2VJZk1pc3NpbmdSZXF1aXJlZEVsZW1lbnQ8L3NhbWxwOlN0YXR1c01lc3NhZ2U+PHNhbWxwOlN0YXR1c0RldGFpbD48SXNQb2xpY3lTcGVjaWZpY0Vycm9yPmZhbHNlPC9Jc1BvbGljeVNwZWNpZmljRXJyb3I+PC9zYW1scDpTdGF0dXNEZXRhaWw+PC9zYW1scDpTdGF0dXM+PC9zYW1scDpSZXNwb25zZT4='/><input type='hidden' name='RelayState' id='RelayState' value='https://bcps.schoology.com/login/saml'/></div><div id='noJavascript' style='visibility: visible; font-family: Verdana'><p>Although we have detected that you have Javascript disabled, you will be able to use the site as normal.</p><p>As part of the authentication process this page may be displayed several times. Please use the continue button below.</p><input type='submit' value='Continue' /></div><script type='text/javascript'>
                        <!-- 
                            document.getElementById('noJavascript').innerHTML = ''; document.getElementById('auto').submit(); 
                        //--></script></form></body></html>
    
    0 comments No comments

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Majano Morales,Hedar 0 Reputation points
    2024-10-29T16:58:29.8466667+00:00

    Write me a story

    0 comments No comments

Your answer

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