Get group
Namespace: microsoft.graph
Get the properties and relationships of a group object.
This operation returns by default only a subset of all the available properties, as noted in the Properties section. To get properties that are not returned by default, specify them in a $select
OData query option. The hasMembersWithLicenseErrors and isArchived properties are an exception and are not returned in the $select
query.
Note: This request might have replication delays for groups that were recently created, updated, or deleted.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | GroupMember.Read.All, Group.Read.All, Directory.Read.All, Group.ReadWrite.All, Directory.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | GroupMember.Read.All, Group.Read.All, Directory.Read.All, Group.ReadWrite.All, Directory.ReadWrite.All |
Note: Depending on the group features you're trying to access, permissions might be limited. For more information, see the Groups section in Known issues with Microsoft Graph.
HTTP request
GET /groups/{id}
Optional query parameters
You can use $select
to get specific group properties, including those that are not returned by default. Extension properties also support query parameters as follows:
Extension type | Comments |
---|---|
Schema extensions | Returned only with $select . |
Open extensions | Returned through the Get open extension operation. |
Directory extensions | Returned by default. |
For more information on OData query options, see OData Query Parameters.
Request headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer {token}. Required. |
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and group object in the response body. It returns the default properties unless you use $select
to specify specific properties.
Example
Example 1: Return all default properties
Return all default properties.
Request
The following is an example of a GET request.
GET https://graph.microsoft.com/v1.0/groups/02bd9fd6-8f93-4758-87c3-1fb73740a315
Response
The following is an example of the response. It includes only the default properties.
Note: The response object shown here might be shortened for readability. All the default properties are returned in an actual call.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups/$entity",
"id": "02bd9fd6-8f93-4758-87c3-1fb73740a315",
"deletedDateTime": null,
"classification": null,
"createdDateTime": "2017-07-31T18:56:16Z",
"description": "Welcome to the HR Taskforce team.",
"displayName": "HR Taskforce",
"expirationDateTime": null,
"groupTypes": [
"Unified"
],
"isAssignableToRole": null,
"mail": "HRTaskforce@M365x214355.onmicrosoft.com",
"mailEnabled": true,
"mailNickname": "HRTaskforce",
"membershipRule": null,
"membershipRuleProcessingState": null,
"onPremisesDomainName": null,
"onPremisesLastSyncDateTime": null,
"onPremisesNetBiosName": null,
"onPremisesSamAccountName": null,
"onPremisesSecurityIdentifier": null,
"onPremisesSyncEnabled": null,
"preferredDataLocation": null,
"preferredLanguage": null,
"proxyAddresses": [
"SMTP:HRTaskforce@M365x214355.onmicrosoft.com",
"SPO:SPO_896cf652-b200-4b74-8111-c013f64406cf@SPO_dcd219dd-bc68-4b9b-bf0b-4a33a796be35"
],
"renewedDateTime": "2020-01-24T19:01:14Z",
"resourceBehaviorOptions": [],
"resourceProvisioningOptions": [
"Team"
],
"securityEnabled": false,
"securityIdentifier": "S-1-12-1-45981654-1196986259-3072312199-363020343",
"theme": null,
"visibility": "Private",
"onPremisesProvisioningErrors": []
}
Example 2: Return additional properties by using $select
Return additional properties by using $select
.
Request
The following is an example of a GET request.
GET https://graph.microsoft.com/v1.0/groups/02bd9fd6-8f93-4758-87c3-1fb73740a315?$select=allowExternalSenders,autoSubscribeNewMembers,isSubscribedByMail,unseenCount
Response
The following is an example of the response which includes the requested non-default properties.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups(allowExternalSenders,autoSubscribeNewMembers,isSubscribedByMail,unseenCount)/$entity",
"id": "02bd9fd6-8f93-4758-87c3-1fb73740a315",
"allowExternalSenders": false,
"autoSubscribeNewMembers": false,
"isSubscribedByMail": false,
"unseenCount": 3
}
Feedback
Submit and view feedback for