what is the actual regex pattern used in validation of Identifier (Entity ID) field in Basic SAML Configuration section in Microsoft azure ?

Venkatesh Naik 40 Reputation points
2024-11-21T08:12:55.41+00:00

User's image

requirement : I have to write a code for validation of Entity ID through regex.
problem : Cant able to identify how the textbox validation is handled because the textbox excepts "a" and also it accepts "//hello/world?" but not this "hello/world?".

I may have to find all the possible inputs and test this textbox to find out the ideal regex
which is too much time consuming.
So, is it possible that i get the regex for it ?

Microsoft Teams Development
Microsoft Security Microsoft Authenticator
Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Nivedipa-MSFT 3,646 Reputation points Microsoft External Staff Moderator
    2024-11-22T07:27:12.35+00:00

    Venkatesh Naik -
    You can try with below regex pattern that might work for your requirements:
    ^(a|//[^/]+/[^/]+?)$

    Thanks, 

    Nivedipa

    ************************************************************************* 

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here )to escalate. 

    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.