Skip to content

Latest commit

 

History

History
105 lines (73 loc) · 3.33 KB

grouplifecyclepolicy-addgroup.md

File metadata and controls

105 lines (73 loc) · 3.33 KB
title description author ms.reviewer ms.localizationpriority ms.subservice doc_type
groupLifecyclePolicy: addGroup
Adds a group to a lifecycle policy.
yuhko-msft
mbhargav, khotzteam, aadgroupssg
medium
entra-groups
apiPageType

groupLifecyclePolicy: addGroup

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Adds specific groups to a lifecycle policy. This action limits the group lifecycle policy to a set of groups only if the managedGroupTypes property of groupLifecyclePolicy is set to Selected.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

POST /groupLifecyclePolicies/{id}/addGroup

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json

Request body

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

Parameter Type Description
groupId String The identifier of the group to add to the policy.

When the managedGroupTypes property of groupLifecyclePolicy is set to Selected, you can add up to 500 groups to the list. If you need to add more than 500 groups, the managedGroupTypes property of groupLifecyclePolicy must be set to All.

Only one group can be added per request.

Response

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

Example

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/groupLifecyclePolicies/{id}/addGroup
Content-type: application/json

{
  "groupId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
}

Response

The following example shows the response.

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

{
  "value": true
}