Public/generated/Get-KriticalUtcmAADGroupLifecyclePolicy.ps1
|
# Kritical.PS.UTCM | Microsoft Graph UTCM REST API toolkit # (c) 2026 Kritical Pty Ltd | https://kritical.net # Kritical brand banner is rendered at module load via Write-KriticalUtcmBanner. function Get-KriticalUtcmAADGroupLifecyclePolicy { <# .SYNOPSIS Kritical.UTCM shim for M365DSC resource AADGroupLifecyclePolicy. .DESCRIPTION Search-replace safe: callers that today invoke Get-M365DSCAADGroupLifecyclePolicy -Credential $cred -TenantId $tid can rename to Get-KriticalUtcmAADGroupLifecyclePolicy -Credential $cred -TenantId $tid with ZERO other edits. Parameter shape matches the M365DSC .schema.mof exactly. By default -PreferM365DscBehavior is true. Actual Graph dispatch is delegated to Invoke-KriticalUtcmM365DscSchemaBridge. Bridge maps resource → Graph endpoint per per-resource wave; where mapping is not yet shipped, bridge returns an object with Verdict='UNMAPPED'. .NOTES Workload: Entra Param count: 12 #> [CmdletBinding()] param( # Only valid value is 'Yes'. [Parameter(Mandatory)] [ValidateSet('Yes')] [string]$IsSingleInstance, # The number of days a group can exist before it needs to be renewed. [Parameter(Mandatory)] [int]$GroupLifetimeInDays, # This parameter allows the admin to select which office 365 groups the policy will apply to. 'None' will create the policy in a disabled state. 'All' will apply the policy to every Office 365 group in the tenant. 'Selected' will allow the admin to choose specific Office 365 groups that the policy will apply to. [Parameter(Mandatory)] [ValidateSet('All','None','Selected')] [string]$ManagedGroupTypes, # Specify if the Azure AD Groups Lifecycle Policy should exist or not. [ValidateSet('Present','Absent')] [string]$Ensure, # Credentials for the Microsoft Graph delegated permissions. [string]$Credential, # Id of the Azure Active Directory application to authenticate with. [string]$ApplicationId, # Id of the Azure Active Directory tenant used for authentication. [string]$TenantId, # Secret of the Azure Active Directory application to authenticate with. [string]$ApplicationSecret, # Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. [string]$CertificateThumbprint, # Username can be made up to anything but password will be used for CertificatePassword [string]$CertificatePassword, # Path to certificate used in service principal usually a PFX file. [string]$CertificatePath, # Managed ID being used for authentication. [bool]$ManagedIdentity ) Invoke-KriticalUtcmM365DscSchemaBridge -ResourceName 'AADGroupLifecyclePolicy' -Workload 'Entra' -Verb 'Get' -CallerParams $PSBoundParameters } |