Azure Dynamic Group Rule - List of Multiple Display Names

Joseph Kray 20 Reputation points
2023-01-30T20:15:23.9833333+00:00

Hello,

We are trying to create Microsoft Dynamic rules and add specific users that should over oversite of correspondence flowing through these groups. The rule we are trying to use is below. and we are using this MS write-up for a reference https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-rule-more-efficient

(user.jobTitle -eq "employeetitle1") or (user.displayName -eq ["userdisplayname1", "userdisplayname1", "userdisplayname3"]

When using this rule we get an error that invalid characters are used.

Any insight is appreciated, thank you.

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2023-01-30T20:35:30.2566667+00:00

    When comparing against a collection (the list of displayNames enclosed in []), you cannot use the -eq operator. Instead, use -in:

    (user.jobTitle -eq "employeetitle1") or (user.displayName -in ["userdisplayname1", "userdisplayname1", "userdisplayname3"])


0 additional answers

Sort by: Most helpful

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.