Tuesday, January 19, 2021

Azure AD Powershell command to query group with DirSyncEnabled attribute

There are times you want to know synched or cloud only groups.

Command to search synched groups - 

Get-AzureADGroup -All $true | where-Object {$_.DirSyncEnabled -eq $TRUE}

Command to search cloud only groups - 

Get-AzureADGroup -All $true | where-Object {$_.DirSyncEnabled -eq $NULL}

Funny enough that DirSyncEnabled attribute contains "TRUE" (if it's synched group) "NULL" (if cloud only)

Thanks

Siva Pokuri.

No comments:

Post a Comment