How to use Add-AzureADMSLifecyclePolicyGroup in Azure Active Directory

Administrators can set an expiration date for Azure Active Directory (Azure AD) groups by using a group lifecycle policy. If a group expires, its owners must renew it within a time frame set by the administrator. The group expires and is soft deleted if it is not renewed within the time period. The cmdlet Add-AzureADMSLifecyclePolicyGroup allows us to add an existing Azure AD group to an existing lifecycle policy.

Azure PowerShell syntax

 Copied
Add-AzureADMSLifecyclePolicyGroup
-Id <String>
-GroupId <String>
[<CommonParameters>]
Click to copy entire script

Example:

The following is an example script to add an existing Azure AD group to an existing lifecycle policy:

 Copied
Add-AzureADMSLifecyclePolicyGroup -Id "<lifecyclepolicyid>" -groupId "<GroupID>"
Click to copy entire script

where <lifecyclepolicyid> refers to the ObjectId of the groupLifecyclePolicies object and <GroupID> denotes the ObjectID of the group for which the application roles are to be retrieved.

About ManageEngine ADManager Plus

ManageEngine ADManager Plus is a unified Active Directory (AD), Microsoft 365, Exchange, and Google Workspace management and reporting solution. With ADManager Plus, you can use the following features to improve your organizational workflow:

  • 360 degree user provisioning for Azure AD and other directory services like Active Directory and Google Workspace.
  • Pre-packaged reports with built-in management actions for increased productivity of administrators.
  • Automate routine tasks like stale group cleanup, bulk user provisioning, and more.
  • Reset passwords, unlock user accounts, and create custom reports in bulk swiftly without PowerShell scripts.
  • Approval-based workflow for Azure AD management.

Simplify Azure AD management and reporting with ADManager Plus

  Get 30-day free trial.

Embark on your script-free AD management, reporting, and automation journey with ADManager Plus.

  •  
     
  • By submitting you agree to processing of personal data according to the Privacy Policy.

Thanks

Your download should begin automatically in 15 seconds. If not, click here to download manually.

Related Powershell How-to Guides:

The one-stop solution toActive Directory Management and Reporting

Email Download Link Email the ADManager Plus download link