Is there string length limitation in Custom policy value?

Gyucheon Heo 1 Reputation point
2022-05-23T18:41:54.57+00:00

Hi everyone,

I am working on Custom policy regular expression for ClaimType.

I use a list of values to be whitelisted as the value of RegularExpression as described below.

<Restriction>
<Pattern RegularExpression={RegularExpression} HelpText="Sign up email" />
</Restriction>

As the size of this list grows such as a 5000~6000 email list, I am concerned about whether it would throw any errors at some points, and want to avoid that situation.

Any insights into what the exact string length limit is? Or are there better solutions to whitelist this type of Claim?

Best,
Gyucheon Heo

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

1 answer

Sort by: Most helpful
  1. 2022-05-24T06:02:39.34+00:00

    Hello @Gyucheon Heo , there is not documented limit. RegularExpression values with over 10,000 characters work however you might consider moving the whitelisting to a REST API Validation Technical Profile for added maintainability and flexibility.

    Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it so that others in the community with similar questions can more easily find a solution.

    1 person found this answer helpful.