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

Accepted answer
  1. James Hamil 23,216 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


0 additional answers

Sort by: Most helpful