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 Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,526 Reputation points Moderator
    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.

Your answer

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