DSCResources/cEXOManagementRoleEntry/cEXOManagementRoleEntry.schema.psm1

configuration cEXOManagementRoleEntry {
    param (
        [Parameter()]
        [hashtable[]]
        $Items
)

<#
EXOManagementRoleEntry [String] #ResourceName
{
    Identity = [string]
    [AccessTokens = [string[]]]
    [ApplicationId = [string]]
    [CertificatePassword = [PSCredential]]
    [CertificatePath = [string]]
    [CertificateThumbprint = [string]]
    [Credential = [PSCredential]]
    [DependsOn = [string[]]]
    [ManagedIdentity = [bool]]
    [Parameters = [string[]]]
    [PsDscRunAsCredential = [PSCredential]]
    [TenantId = [string]]
    [Type = [string]{ ApplicationPermission | Cmdlet | Script | WebService }]
}
 
#>



    Import-DscResource -ModuleName PSDesiredStateConfiguration
    Import-DscResource -ModuleName Microsoft365DSC

    $dscResourceName = 'EXOManagementRoleEntry'

    $param = $PSBoundParameters
    $param.Remove("InstanceName")

    $dscParameterKeys = 'Identity' -split ', '

        foreach ($item in $Items)
        {
            $keyValues = foreach ($key in $dscParameterKeys)
        {
            $item.$key
        }
        $executionName = $keyValues -join '_'
        $executionName = $executionName -replace "[\s()\\:*-+/{}```"']", '_'
        (Get-DscSplattedResource -ResourceName $dscResourceName -ExecutionName $executionName -Properties $item -NoInvoke).Invoke($item)
    }
}