| 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 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Creates a new groupLifecyclePolicy. Only one policy exists in the tenant.
[!INCLUDE national-cloud-support]
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]
POST /groupLifecyclePolicies| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json |
In the request body, supply a JSON representation of groupLifecyclePolicy object.
If successful, this method returns 201 Created response code and groupLifecyclePolicy object in the response body.
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]
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"
}