modules/Azure/Checks/Test-EntraUsersCannotCreateMicrosoft365Groups.ps1

function Test-EntraUsersCannotCreateMicrosoft365Groups {
    <#
    .SYNOPSIS
        Microsoft 365 group creation by users is disabled

    .DESCRIPTION
        **Microsoft Entra** directory setting **Group.Unified** governs who can create **Microsoft 365 Groups**. The evaluation inspects `EnableGroupCreation` and, when present, `GroupCreationAllowedGroupId` to determine if group creation is broadly allowed or restricted to a designated group.

    .PARAMETER Check
        CIEMCheck object containing check metadata.
    #>

    [CmdletBinding()]
    [OutputType([PSCustomObject[]])]
    param(
        [Parameter(Mandatory)]
        $Check
    )

    $ErrorActionPreference = 'Stop'

    # TODO: Implement check logic based on Prowler check: entra_users_cannot_create_microsoft_365_groups

    [CIEMScanResult]::Create($Check, 'MANUAL', 'This check requires manual implementation. See Prowler check entra_users_cannot_create_microsoft_365_groups for reference.', 'N/A', 'entra Resources')
}