Skip to main content

Security

Password patterns

Define the rule a password must follow, and know what the five patterns that come with a tenant really accept.

A password pattern is the rule that a new password must follow, for example a minimum length. You manage the patterns of a tenant in Studio under Security → Passwords.

A new tenant enforces no rule. It comes with five patterns, but none of them is activated. Until you activate one, users can choose any password.

How a pattern works

FieldMeaning
NameThe name in the list. It is also the text the user sees when a password is rejected, so write the rule into the name. Up to 128 characters, unique.
PatternA regular expression. A password is accepted if the expression matches it.
ActivatedMakes this pattern the rule of the tenant.

Only one pattern is active at a time. When you activate a pattern, the pattern that was active before is deactivated without a message. If you deactivate or delete the active pattern, no rule applies any more.

A change takes effect at once, for the next password that is set.

When the rule is checked

  • When a new user activates the account and sets the first password.
  • When a user resets a forgotten password.
  • When a user changes the password in the user menu.

Existing passwords are not checked. A user who never changes the password is not affected by a new pattern.

Users who sign in through Active Directory, Entra ID or OpenID Connect have no password in M.App Enterprise. The pattern does not apply to them.

What the user sees

On the page where a new password is set, a rejected password shows the message Entered value is not valid. followed by the name of the pattern. In the dialog for changing the password the user only sees Provided password is not valid. Please try again., without the name.

The names of the patterns are not translated. If your users work in another language, write the name in that language.

The five patterns that come with a tenant

The names of these patterns promise less than the expressions enforce. Check them before you activate one.

NameWhat it really accepts
Minimum 8 characters at least 1 Alphabet and 1 NumberAt least 8 characters, letters and digits only. A password with a special character is rejected.
Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special CharacterAt least 8 characters. The special character must be one of $ @ ! % * # ? &. Any other character, such as -, _ or ., makes the password invalid.
Minimum 8 characters at least 1 Uppercase, 1 Lowercase and 1 NumberAt least 8 characters, letters and digits only. A password with a special character is rejected.
Minimum 8 characters at least 1 Uppercase, 1 Lowercase, 1 Number and 1 Special CharacterThe first 8 characters must be letters, digits or one of $ @ ! % * ? &. # is not among them.
Minimum 8 and Maximum 10 characters at least 1 Uppercase, 1 Lowercase, 1 Number and 1 Special CharacterLike the pattern above. The maximum of 10 characters is not enforced: longer passwords are accepted.

Users with a password manager often get passwords with characters like - or _. With the first three patterns such passwords are rejected. If you want to allow any character, use a pattern of your own.

A pattern of your own

Click New, enter a name that states the rule, enter the expression and tick Activated.

Two examples:

RulePattern
At least 12 characters, any characters^.{12,}$
At least 10 characters with an upper-case letter, a lower-case letter and a digit, any other characters allowed^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{10,}$

Notes:

  • Start the expression with ^ and end it with $. Without $ only the beginning of the password is checked.
  • The form only checks that the expression can be read. It does not tell you whether it does what you want. Test it: set a password for a test user and try one password that should pass and one that should fail.
  • A long minimum length protects better than a long list of required characters.

See also Lesson 7: Creating Users and Claims and How to setup "Two factor authentication".

Updated on Dec 1, 2026