I am using exchange hybrid environment, i have custom attributes in AD for all users which are synced to Azure AD. For example I have manager Tim, Time reports to Roger and Roger Reports to John, i want to create dynamic unified group for Johns Organization,please help me with the syntax. i have permanent employees who employee ids stats with 5000, for example 5000,5001 and temporary employee whose employee ids starts with T1000, T1001
for example user todd has this AD attribute in extensionAttribute05---|John|Roger|<Tim>|
How do i use the below information and create a query to build unified group.
John Temporary-----(user.extensionAttribute05 -like '*John* ') and (user.employeeId -like 'T*')
John Permanent-----(user.extensionAttribute05 -like ' * John* ') and (user.employeeId -notlike 'T*')