Skip to content

Latest commit

 

History

History
138 lines (101 loc) · 4.5 KB

File metadata and controls

138 lines (101 loc) · 4.5 KB
title Create groupLifecyclePolicy
description Creates a new groupLifecyclePolicy.
author yuhko-msft
ms.reviewer mbhargav, khotzteam, aadgroupssg
ms.localizationpriority medium
ms.subservice entra-groups
doc_type apiPageType
ms.date 04/05/2024

Create groupLifecyclePolicy

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Creates a new groupLifecyclePolicy. Only one policy exists in the tenant.

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


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"
}