import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# entra m365group get

Gets information about the specified Microsoft 365 Group or Microsoft Teams team

## Usage

```sh
m365 entra m365group get [options]
```

## Options

```md definition-list
`-i, --id [id]`
: The ID of the Microsoft 365 Group or Microsoft Teams team to retrieve information for. Specify either `id` or `displayName`, but not both.

`-n, --displayName [displayName]`
: Display name of the Microsoft 365 Group or Microsoft Teams team to retrieve information for. Specify either `id` or `displayName`, but not both.

`--withSiteUrl`
: Set to retrieve the site URL for the group.
```

<Global />

## Permissions

<Tabs>
  <TabItem value="Delegated">

  | Resource        | Permissions    |
  |-----------------|----------------|
  | Microsoft Graph | Group.Read.All |

  </TabItem>
  <TabItem value="Application">

  | Resource        | Permissions    |
  |-----------------|----------------|
  | Microsoft Graph | Group.Read.All |

  </TabItem>
</Tabs>

## Examples

Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_.

```sh
m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844
```

Get information about the Microsoft 365 Group with displayName _Finance_.

```sh
m365 entra m365group get --displayName Finance
```

Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_ and also retrieve the URL of the corresponding SharePoint site.

```sh
m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --withSiteUrl
```

## Response

<Tabs>
  <TabItem value="JSON">

  ```json
  {
    "id": "ff99b38f-0a4b-4fbb-a034-b86988061e6d",
    "deletedDateTime": null,
    "classification": null,
    "createdDateTime": "2023-06-01T20:18:30Z",
    "creationOptions": [],
    "description": "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.",
    "displayName": "Finance",
    "expirationDateTime": null,
    "groupTypes": [
      "Unified"
    ],
    "isAssignableToRole": null,
    "mail": "finance@contoso.onmicrosoft.com",
    "mailEnabled": true,
    "mailNickname": "finance",
    "membershipRule": null,
    "membershipRuleProcessingState": null,
    "onPremisesDomainName": null,
    "onPremisesLastSyncDateTime": null,
    "onPremisesNetBiosName": null,
    "onPremisesSamAccountName": null,
    "onPremisesSecurityIdentifier": null,
    "onPremisesSyncEnabled": null,
    "preferredDataLocation": null,
    "preferredLanguage": null,
    "proxyAddresses": [
      "SMTP:finance@contoso.onmicrosoft.com"
    ],
    "renewedDateTime": "2023-06-01T20:18:30Z",
    "resourceBehaviorOptions": [],
    "resourceProvisioningOptions": [],
    "securityEnabled": false,
    "securityIdentifier": "S-1-12-1-4288263055-1337657931-1773679776-1830684296",
    "theme": null,
    "visibility": "Public",
    "onPremisesProvisioningErrors": [],
    "allowExternalSenders": false,
    "autoSubscribeNewMembers": false,
    "isSubscribedByMail": false,
    "hideFromOutlookClients": false,
    "hideFromAddressLists": false
  }
  ```

  </TabItem>
  <TabItem value="Text">

  ```text
  allowExternalSenders         : false
  autoSubscribeNewMembers      : false
  classification               : null
  createdDateTime              : 2023-06-01T20:18:30Z
  creationOptions              : []
  deletedDateTime              : null
  description                  : This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.
  displayName                  : Finance
  expirationDateTime           : null
  groupTypes                   : ["Unified"]
  hideFromAddressLists         : false
  hideFromOutlookClients       : false
  id                           : ff99b38f-0a4b-4fbb-a034-b86988061e6d
  isAssignableToRole           : null
  isSubscribedByMail           : false
  mail                         : finance@contoso.onmicrosoft.com
  mailEnabled                  : true
  mailNickname                 : finance
  membershipRule               : null
  membershipRuleProcessingState: null
  onPremisesDomainName         : null
  onPremisesLastSyncDateTime   : null
  onPremisesNetBiosName        : null
  onPremisesProvisioningErrors : []
  onPremisesSamAccountName     : null
  onPremisesSecurityIdentifier : null
  onPremisesSyncEnabled        : null
  preferredDataLocation        : null
  preferredLanguage            : null
  proxyAddresses               : ["SMTP:finance@contoso.onmicrosoft.com"]
  renewedDateTime              : 2023-06-01T20:18:30Z
  resourceBehaviorOptions      : []
  resourceProvisioningOptions  : []
  securityEnabled              : false
  securityIdentifier           : S-1-12-1-4288263055-1337657931-1773679776-1830684296
  theme                        : null
  visibility                   : Public
  ```

  </TabItem>
  <TabItem value="CSV">

  ```csv
  id,createdDateTime,description,displayName,mail,mailEnabled,mailNickname,renewedDateTime,securityEnabled,securityIdentifier,visibility,allowExternalSenders,autoSubscribeNewMembers,isSubscribedByMail,hideFromOutlookClients,hideFromAddressLists
  ff99b38f-0a4b-4fbb-a034-b86988061e6d,2023-06-01T20:18:30Z,"This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.",Finance,finance@contoso.onmicrosoft.com,1,finance,2023-06-01T20:18:30Z,,S-1-12-1-4288263055-1337657931-1773679776-1830684296,Public,false,false,false,false,false
  ```

  </TabItem>
  <TabItem value="Markdown">

  ```md
  # entra m365group get --id "ff99b38f-0a4b-4fbb-a034-b86988061e6d"

  Date: 2023-06-01

  ## Finance (ff99b38f-0a4b-4fbb-a034-b86988061e6d)

  Property | Value
  ---------|-------
  id | ff99b38f-0a4b-4fbb-a034-b86988061e6d
  createdDateTime | 2023-06-01T20:18:30Z
  description | This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.
  displayName | Finance
  mail | finance@contoso.onmicrosoft.com
  mailEnabled | true
  mailNickname | finance
  renewedDateTime | 2023-06-01T20:18:30Z
  securityEnabled | false
  securityIdentifier | S-1-12-1-4288263055-1337657931-1773679776-1830684296
  visibility | Public
  allowExternalSenders | false
  autoSubscribeNewMembers | false
  isSubscribedByMail | false
  hideFromOutlookClients | false
  hideFromAddressLists | false
  ```

  </TabItem>
</Tabs>
