groupLifecyclePolicy: removeGroup

Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. Use of these APIs in production applications is not supported.

Removes a group from a lifecycle policy.

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) Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported
Application Directory.ReadWrite.All

HTTP request

POST /groupLifecyclePolicies/{id}/removeGroup

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json

Request body

In the request body, provide a JSON object with the following parameters.

Parameter Type Description
groupId Guid The id of the group to remove from the policy.

Response

If successful, this method returns 200 OK response code. If the group is removed from the policy, a true value is returned in the response body. Otherwise, a false value is returned in the reponse body.

Example

Request
POST https://graph.microsoft.com/beta/groupLifecyclePolicies/{id}/removeGroup
Content-type: application/json
Content-length: 57

{
  "groupId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
}
Response
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 21

{
  "value": true
}