Public/Other/Invoke-KriticalUtcmLicensingWebRequest.ps1

<#
.SYNOPSIS
    Kritical.UTCM wrapper over Microsoft365DSC helper Invoke-M365DSCLicensingWebRequest
    (category: Other, module: M365DSCLicensingHelper).

.DESCRIPTION
    Thin delegating passthrough — logic stays in Microsoft365DSC upstream;
    Kritical.UTCM provides the friendly namespace + citation registration.

    Install-Module Microsoft365DSC -Scope CurrentUser BEFORE calling.

.NOTES
    Category: Other
    Module: M365DSCLicensingHelper
    Params: 3
#>

function Invoke-KriticalUtcmLicensingWebRequest {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)] [String] $Uri,
        [String] $Method,
        [Hashtable] $Body
    )

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