Microsoft has hidden the 'contains' and 'notContains' operators from the Entra ID graphical interface - but they still work! You just need to know how to use them in the rule syntax text box. This guide shows you exactly how.
Related Terms
Also known as: Azure AD Dynamic Groups Contains Operator, Entra ID Rule Syntax
Affected Systems
- Entra ID (formerly Azure AD)
- Dynamic Group Rules
- Microsoft 365 Admin Center
Important Note
While 'contains' and 'notContains' are no longer visible in the graphical rule builder, they are fully functional when manually typed in the rule syntax text box. Here's what it looks like:
The full interface where you'll find this:
Resolution Steps
- Navigate to the Entra ID admin center and access Groups All groups New group
- Set Group Type to "Security" and Membership type to "Dynamic Device"
- Click "Add dynamic query"
- Critical step: Click "Edit" next to "Rule syntax" to access the text editor
- Type your rule using -contains, for example:
device.displayName -contains "Minyama"
Additional Notes
Key Points About Contains Operators
- ONLY available through the rule syntax text box
- NOT visible in the graphical rule builder
- Must include the hyphen prefix (-contains)
- Still fully supported by Microsoft
- Existing rules using these operators continue to work
Available Operators
Common operators you can use in the text box:
-contains
: Contains the specified value-notContains
: Does not contain the specified value-eq
: Equals-ne
: Not equals-startsWith
: Starts with specified value-notStartsWith
: Does not start with specified value-match
: Matches pattern-notMatch
: Does not match pattern-in
: Matches any in list-notIn
: Does not match any in list
Best Practices
- Use straight quotes, not curly quotes
- Ensure parentheses are properly paired
- Test your query in the "Validate Rules" tab
The text editor is required for:
- Rules using -contains or -notContains
- Rules with more than 5 expressions
- Direct reports rules
- Setting operator precedence
Your Feedback
If you've encountered this issue and followed the steps outlined in this article, we'd love to hear from you. Please leave a comment below to share whether this solution helped resolve the problem. Additionally, if you found a different method that worked, we encourage you to share that as well. Your feedback is invaluable in helping us and others who may face similar issues.
Need Further Help?
If you're still facing issues or would like personalized guidance, we're here to help. Check out our dedicated support plans at IT Solver Support Plans for expert assistance tailored to your needs.
Comments
0 comments
Please sign in to leave a comment.