Skip to content

Latest commit

 

History

History
141 lines (103 loc) · 4.65 KB

grouplifecyclepolicy-post-grouplifecyclepolicies.md

File metadata and controls

141 lines (103 loc) · 4.65 KB
title description author ms.reviewer ms.localizationpriority ms.subservice doc_type
Create groupLifecyclePolicy
Creates a new groupLifecyclePolicy.
yuhko-msft
mbhargav, khotzteam, aadgroupssg
medium
entra-groups
apiPageType

Create groupLifecyclePolicy

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Creates a new groupLifecyclePolicy.

[!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

Request headers

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

Request body

In the request body, supply a JSON representation of groupLifecyclePolicy object.

Response

If successful, this method returns 201 Created response code and groupLifecyclePolicy object in the response body.

Example

Request

POST https://graph.microsoft.com/beta/groupLifecyclePolicies
Content-type: application/json

{
  "groupLifetimeInDays": 100,
  "managedGroupTypes": "Selected",
  "alternateNotificationEmails": "admin@contoso.com"
}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-type: application/json

{
  "id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
  "groupLifetimeInDays": 100,
  "managedGroupTypes": "Selected",
  "alternateNotificationEmails": "admin@contoso.com"
}