Commands › Microsoft Teams

Invoke-ClearDirectToGroupAssignmentMigration

Microsoft Teams MicrosoftTeams Invoke-*

As an admin, you can trigger a new direct assignments to group policy assignments cleanup.

Quick start script

# Invoke-ClearDirectToGroupAssignmentMigration — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Run and inspect
Invoke-ClearDirectToGroupAssignmentMigration -Authority <String> -GroupId <Guid> -PolicyName <String> | Format-List

# 3. Export for evidence / drift tracking
Invoke-ClearDirectToGroupAssignmentMigration | Export-Clixml .\ClearDirectToGroupAssignmentMigration-$(Get-Date -Format yyyyMMdd).xml

Syntax

Invoke-ClearDirectToGroupAssignmentMigration -Authority <String> -PolicyType <String> -PolicyName <String>
 -GroupId <Guid> [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Authority String yes The authority (issuer) of the policy.
-GroupId Guid yes The target group ID.
-PolicyName String yes The name of the policy.
-PolicyType String yes The type of the policy.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.