Skip to main content

entra group list

Lists Entra groups

Usage

m365 entra group list [options]

Options

--type [type]

Filter the results to only groups of a given type. Allowed values: microsoft365, security, distribution, mailEnabledSecurity. By default, all groups are listed.

-p, --properties [properties]

Comma-separated list of properties to retrieve.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

Using the --properties option, you can specify a comma-separated list of group properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will output the default properties returned by Graph.

Examples

Lists all groups defined in Entra ID.

m365 entra group list

List all security groups defined in Entra ID with specified properties.

m365 entra group list --type security --properties "mail,displayName"

Response

[
{
"id": "04e9637c-79d4-4c45-80fb-56fe35f84cf2",
"deletedDateTime": null,
"classification": null,
"createdDateTime": "2019-04-22T09:24:11Z",
"creationOptions": [
"HubSiteId:00000000-0000-0000-0000-000000000000",
"ProvisionGroupHomepage"
],
"description": null,
"displayName": "Human Resources",
"expirationDateTime": null,
"groupTypes": [
"Unified"
],
"isAssignableToRole": null,
"mail": "PNP-Contosohr@contoso.onmicrosoft.com",
"mailEnabled": true,
"mailNickname": "PNP-Contosohr",
"membershipRule": null,
"membershipRuleProcessingState": null,
"onPremisesDomainName": null,
"onPremisesLastSyncDateTime": null,
"onPremisesNetBiosName": null,
"onPremisesSamAccountName": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"preferredDataLocation": null,
"preferredLanguage": null,
"proxyAddresses": [
"SMTP:PNP-Contosohr@contoso.onmicrosoft.com",
"SPO:SPO_c9c080ff-bc85-4f49-9ec2-0a683b15bd19@SPO_1e852b49-bf4b-4ba5-bcd4-a8c4706c8ed4"
],
"renewedDateTime": "2019-04-22T09:24:11Z",
"resourceBehaviorOptions": [],
"resourceProvisioningOptions": [],
"securityEnabled": false,
"securityIdentifier": "S-1-12-1-82404220-1279621588-4267113344-4065130549",
"theme": null,
"visibility": "Private",
"onPremisesProvisioningErrors": []
}
]
CTRL + M