Public/Graph/New-KriticalUtcmMgBetaRoleManagementDirectoryRoleAssignment.ps1
|
<# .SYNOPSIS Kritical.UTCM wrapper over Microsoft365DSC helper New-MgBetaRoleManagementDirectoryRoleAssignment (category: Graph, module: M365DSCGraphShim). .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: Graph Module: M365DSCGraphShim Params: 22 #> function New-KriticalUtcmMgBetaRoleManagementDirectoryRoleAssignment { [CmdletBinding()] param( [Object] $BodyParameter, [String] $ResponseHeadersVariable, [Hashtable] $AdditionalProperties, [Object] $AppScope, [String] $AppScopeId, [String] $Condition, [Object] $DirectoryScope, [String] $DirectoryScopeId, [String] $Id, [Object] $Principal, [String] $PrincipalId, [String] $PrincipalOrganizationId, [String] $ResourceScope, [Object] $RoleDefinition, [String] $RoleDefinitionId, [SwitchParameter] $Break, [IDictionary] $Headers, [Object[]] $HttpPipelineAppend, [Object[]] $HttpPipelinePrepend, [Uri] $Proxy, [PSCredential] $ProxyCredential, [SwitchParameter] $ProxyUseDefaultCredentials ) if (-not (Get-Command -Name 'New-MgBetaRoleManagementDirectoryRoleAssignment' -ErrorAction SilentlyContinue)) { throw '[KriticalUtcm] New-MgBetaRoleManagementDirectoryRoleAssignment not available — Install-Module Microsoft365DSC -Scope CurrentUser then re-run' } try { & 'New-MgBetaRoleManagementDirectoryRoleAssignment' @PSBoundParameters } catch { Write-Error ('[KriticalUtcm/New-KriticalUtcmMgBetaRoleManagementDirectoryRoleAssignment] ' + 'New-MgBetaRoleManagementDirectoryRoleAssignment' + ' failed: ' + $_.Exception.Message) throw } } |