Hi @Glenn Maxwell ,
To create a dynamic unified group in Office 365 based on the criteria you described, you can use the query below.
This query will pull all users who are enabled, have an employee ID starting with "F" or "T", and are located in the USA.
The notStartsWith operator is not supported in the query syntax for dynamic groups in Azure AD. Instead, you can use the like operator with a wildcard (*) to match users with an employee ID starting with either "F" or "T".
(user.accountEnabled -eq true) -and ((user.employeeId -like "F*") -or (user.employeeId -like "T*")) -and (user.country -eq "USA")
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.
Hi @Glenn Maxwell ,
Just checking in to see if the below answer helped. If this answers your query, please don’t forget to click "Accept Answer" which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.