No 'Match' Operator in Dynamic Membership Rules

Singleton, Heather 20 Reputation points
2025-04-11T18:07:21.7666667+00:00

Hello, I'm needing to add syntax to a dynamic group to pull in any UPN starting with a certain # followed by 4 additional #'s. I've found the syntax that will fit what I need; however, it includes a 'match' operator and I'm not seeing 'match' as an operator choice despite MS docs I've looked at saying it's an option. If that is no longer an option, what of the available operator choices would mimic a 'match'? I've tried several to no avail.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,271 questions
{count} votes

Accepted answer
  1. Vasil Michev 117K Reputation points MVP
    2025-04-12T14:33:36.4533333+00:00

    The match operator is supported, as mentioned in the official documentation: https://learn.microsoft.com/en-us/entra/identity/users/groups-dynamic-membership#supported-expression-operators

    While the Expression builder UI does not expose the match operator (this is Microsoft's way of discouraging people from using it), you can still paste a rule containing it (use the Edit button on the far right), and save the changes. Alternatively, you can configure the rule via Graph API or PowerShell.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Jyotishree Moharana 480 Reputation points Microsoft External Staff
    2025-04-14T16:17:00.22+00:00

    Hello @Singleton, Heather,

    The match is supported in dynamic group membership rules but has limitations from UI front.

    Unfortunately, dynamic rules can’t evaluate patterns or use regex hence -match operator may not work in the current scenario when you want to match for 5 certain characters.

    You can try using -startsWith operator if the pattern you want to match for is consistent.

    If you want to use -match operator, try utilizing PowerShell or Graph API to update the group membership based on regex, you will need to schedule the script for regular update to the group.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


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.