Dynamic UG

Roger Roger 6,406 Reputation points
2020-09-21T14:15:43.877+00:00

Hi All

I am using exchange hybrid environment, department and country are synchronize to azure AD from onprem, i want to create office 365 dynamic unified group for Dept01 and Dep02 for the countries Country01, Country02 will the below query work for me.

(user.accountEnabled -eq true) -and ((user.department -eq "Dept01") or (user.department -eq "Dept02")) -and ((user.country -eq "country01") or (user.country -eq "country02"))

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
649 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,836 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,584 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lydia Zhou - MSFT 2,376 Reputation points Microsoft Employee
    2020-09-22T03:53:04.533+00:00

    @Roger Roger

    I test in my environment, your dynamic membership rule works well on my side. Here is my test result.

    1) Set department "Dept01" and country "Australia" for user01. Set department "Dept02" and country "China" for user02.
    2) Create the dynamic group and add the dynamic membership rule. Then validate rules, user01 and user02 are validated successfully:
    26305-564.png

    3) Wait for a while, we can check the M365 dynamic group members:
    26200-565.png

    4) Send test messages to the dynamic group, user01 and user02 can receive them successfully:
    26307-566.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

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.