Skip to main content

entra m365group list

Lists Microsoft 365 Groups in the current tenant

Usage

m365 entra m365group list [options]

Alias

m365 aad m365group list [options]

Options

-d, --displayName [displayName]

Retrieve only groups with displayName starting with the specified value

-m, --mailNickname [displayName]

Retrieve only groups with mailNickname starting with the specified value

--includeSiteUrl

Set to retrieve the site URL for each group

--orphaned

Set to only retrieve groups without owners

-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 --includeSiteUrl option, you can retrieve the URL of the site associated with the particular Microsoft 365 Group. If you however retrieve too many groups and will try to get their site URLs, you will most likely get an error as the command will get throttled, issuing too many requests, too frequently. If you get an error, consider narrowing down the result set using the --displayName and --mailNickname filters.

Using the --orphaned option, you can retrieve Microsoft 365 Groups without owners.

Examples

List all Microsoft 365 Groups in the tenant

m365 entra m365group list

List Microsoft 365 Groups with display name starting with Project

m365 entra m365group list --displayName Project

List Microsoft 365 Groups mail nick name starting with team

m365 entra m365group list --mailNickname team

List Microsoft 365 Groups with display name starting with Project including the URL of the corresponding SharePoint site

m365 entra m365group list --displayName Project --includeSiteUrl

List Microsoft 365 Groups without owners

m365 entra m365group list --orphaned

Response

[
{
"id": "0bc3d172-dfab-463f-b79a-ed8ec5d3d455",
"deletedDateTime": null,
"classification": null,
"createdDateTime": "2022-12-12T12:51:12Z",
"creationOptions": [
"YammerProvisioning"
],
"description": "Share what's on your mind and get important announcements from Patti and the rest of the Leadership Team.",
"displayName": "Leadership",
"expirationDateTime": null,
"groupTypes": [
"Unified"
],
"isAssignableToRole": null,
"mail": "leadership@contoso.onmicrosoft.com",
"mailEnabled": true,
"mailNickname": "leadership",
"membershipRule": null,
"membershipRuleProcessingState": null,
"onPremisesDomainName": null,
"onPremisesLastSyncDateTime": null,
"onPremisesNetBiosName": null,
"onPremisesSamAccountName": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"preferredDataLocation": null,
"preferredLanguage": null,
"proxyAddresses": [
"SMTP:leadership@contoso.onmicrosoft.com"
],
"renewedDateTime": "2022-12-12T12:51:12Z",
"resourceBehaviorOptions": [
"CalendarMemberReadOnly"
],
"resourceProvisioningOptions": [],
"securityEnabled": false,
"securityIdentifier": "S-1-12-1-197382514-1178591147-2397936311-1440011205",
"theme": null,
"visibility": "Public",
"onPremisesProvisioningErrors": []
}
]
CTRL + M