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,permissions,response,full. Default isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns 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.
Permissions
- Delegated
- Application
| Resource | Permissions |
|---|---|
| Microsoft Graph | Group.Read.All |
| Resource | Permissions |
|---|---|
| Microsoft Graph | Group.Read.All |
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
- JSON
- Text
- CSV
- Markdown
[
{
"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": []
}
]
id displayName groupType
------------------------------------ ------------------------------ ---------------------
04e9637c-79d4-4c45-80fb-56fe35f84cf2 Human Resources Microsoft 365
id,createdDateTime,displayName,mail,mailEnabled,mailNickname,renewedDateTime,securityEnabled,securityIdentifier,visibility
04e9637c-79d4-4c45-80fb-56fe35f84cf2,2019-04-22T09:24:11Z,Human Resources,PNP-Contosohr@contoso.onmicrosoft.com,1,PNP-Contosohr,2019-04-22T09:24:11Z,,S-1-12-1-82404220-1279621588-4267113344-4065130549,Private
# entra group list
Date: 2023-06-01
## Human Resources (04e9637c-79d4-4c45-80fb-56fe35f84cf2)
Property | Value
---------|-------
id | 04e9637c-79d4-4c45-80fb-56fe35f84cf2
createdDateTime | 2019-04-22T09:24:11Z
displayName | Human Resources
mail | PNP-Contosohr@contoso.onmicrosoft.com
mailEnabled | true
mailNickname | PNP-Contosohr
renewedDateTime | 2019-04-22T09:24:11Z
securityEnabled | false
securityIdentifier | S-1-12-1-82404220-1279621588-4267113344-4065130549
visibility | Private