Public/Permissions/Update-KritTcmAllowedGraphScopes.ps1

<#
.SYNOPSIS
    Krit.TCM wrapper over Microsoft365DSC helper Update-M365DSCAllowedGraphScopes
    (category: Permissions, module: M365DSCPermissions).

.DESCRIPTION
    Auto-scaffolded wave .1514 by New-KritTcmFromM365DscHelpers.ps1.
    Thin delegating passthrough — logic stays in Microsoft365DSC upstream;
    Krit.TCM provides the friendly namespace + citation registration
    for HARD RULE 20 discipline.

    Install-Module Microsoft365DSC -Scope CurrentUser BEFORE calling.

.NOTES
    Wave .1514. Underlying cmdlet: Update-M365DSCAllowedGraphScopes
    Category: Permissions
    Module: M365DSCPermissions
    Params: 4
#>

function Update-KritTcmAllowedGraphScopes {
    [CmdletBinding()]
    param(
        [String[]] $ResourceNameList,
        [SwitchParameter] $All,
        [Parameter(Mandatory)] [String] $Type,
        [String] $Environment
    )

    if (-not (Get-Command -Name 'Update-M365DSCAllowedGraphScopes' -ErrorAction SilentlyContinue)) {
        throw '[KritTcm] Update-M365DSCAllowedGraphScopes not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run'
    }
    try {
        & 'Update-M365DSCAllowedGraphScopes' @PSBoundParameters
    } catch {
        Write-Error ('[KritTcm/Update-KritTcmAllowedGraphScopes] ' + 'Update-M365DSCAllowedGraphScopes' + ' failed: ' + $_.Exception.Message)
        throw
    }
}