Suppose there are many employees in the company. Some are permanent employees, and some are temporary employees. Only permanent employees have employee ID, and temporary employees do not have employee ID.
We want to backup only the users who are permanent employees and have employee IDs.
Create a Security Group in Azure with Membership Type of "Dynamic User".
Add below dynamic query to the membership rules and click Save.
“user.employeeId -ne $null”
The Azure AD group will be created and all the users who have an employee ID will be added to the group automatically.