Skip to content

Enhancement: Add type option for aad group list #5424

@milanholemans

Description

@milanholemans

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions