Aug 11 2023 02:19 AM - edited Aug 11 2023 02:22 AM
Hi
I'm trying to build a few Dynamic Distribution Lists in Exchange Online and want to only include Active Users (i.e., users that are marked "Active" in Azure AD). I've tried using the UserAccountControl attribute (-eq 514 or -ne 514 - both are returning the same results, which is strange), but it still includes user accounts that are disabled. This is how my recipient filter looks like:
RecipientType -eq 'UserMailbox' -and UserAccountControl -ne 514
What's the best way to achieve this in Exchange Online?
Thanks
Taranjeet Singh
Aug 11 2023 09:58 AM