The idea is to add an extra option to the aad group list command.
| Option |
Description |
--type [type] |
Filter the results to only groups of a given type: microsoft365, security, distribution, mailEnabledSecurity. By default, all groups are listed. |
API filters
We can use the filters below:
Microsoft 365 groups
$filter=groupTypes/any(c:c+eq+'Unified')
Security
$filter=securityEnabled eq true and mailEnabled eq false
Mail enabled security
$filter=mailEnabled eq true and securityEnabled eq true
Distribution (maybe some improvement possible bere)
$filter=securityEnabled eq false and mailEnabled eq true and not(groupTypes/any(t:t eq 'Unified'))&$count=true
The idea is to add an extra option to the
aad group listcommand.--type [type]microsoft365,security,distribution,mailEnabledSecurity. By default, all groups are listed.API filters
We can use the filters below:
Microsoft 365 groups
$filter=groupTypes/any(c:c+eq+'Unified')Security
$filter=securityEnabled eq true and mailEnabled eq falseMail enabled security
$filter=mailEnabled eq true and securityEnabled eq trueDistribution (maybe some improvement possible bere)
$filter=securityEnabled eq false and mailEnabled eq true and not(groupTypes/any(t:t eq 'Unified'))&$count=true