Update group

Update the properties of a group object.

Prerequisites

The following scope is required to execute this API: Group.ReadWrite.All

HTTP request

PATCH /groups/{id}

Request headers

Name Type Description
Authorization string Bearer . Required.

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.

Property Type Description
autoSubscribeNewMembers Boolean Default is false. Indicates if new members added to the group will be auto-subscribed to receive email notifications.
description String An optional description for the group.
displayName String The display name for the group. This property is required when a group is created and it cannot be cleared during updates. Supports $filter and $orderby.
groupTypes String collection Specifies the type of group to create. Possible values are Unified to create an Office 365 group, or DynamicMembership for dynamic groups. For all other group types, like security-enabled groups and email-enabled security groups, do not set this property.
mailEnabled Boolean Specifies whether the group is mail-enabled. If the securityEnabled property is also true, the group is a mail-enabled security group; otherwise, the group is a Microsoft Exchange distribution group.
mailNickname String The mail alias for the group. This property must be specified when a group is created. Supports $filter.
securityEnabled Boolean Specifies whether the group is a security group. If the mailEnabled property is also true, the group is a mail-enabled security group; otherwise it is a security group. Must be false for Office 365 groups. Supports $filter..
visibility Boolean Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or empty (which is interpreted as Public).

Note

  • You can update autoSubscribeNewMembers by specifying it in its own PATCH request, without including the other properties in the table above.
  • Only a subset of the group API pertaining to core group administration and management support application and delegated permissions. All other members of the group API, including updating autoSubscribeNewMembers, support only delegated permissions. See known issues for examples.

Response

If successful, this method returns a 200 OK response code and updated group object in the response body.

Example

Request

Here is an example of the request.

PATCH https://graph.microsoft.com/beta/groups/{id}
Content-type: application/json
Content-length: 211

{
  "description": "description-value",
  "displayName": "displayName-value",
  "groupTypes": [
    "groupTypes-value"
  ],
  "mail": "mail-value",
  "mailEnabled": true,
  "mailNickname": "mailNickname-value"
}
Response

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 211

{
  "description": "description-value",
  "displayName": "displayName-value",
  "groupTypes": [
    "groupTypes-value"
  ],
  "mail": "mail-value",
  "mailEnabled": true,
  "mailNickname": "mailNickname-value"
}