RequiresAdminAttention: Investigating failed Teams Private Channel migrations

As posted a few weeks ago, Microsoft completed the Private Channel migration at the end of April.

Read:  Teams admins should check their private channel migration status

Microsoft has now updated the migration state. Compared to April, a new state may appear if the migration had issues: RequiresAdminAttention. You need the Teams Administrator role to run the cmdlet.

New migration state

If such a state appears, Microsoft has added new details about the failed migration. Currently, a list of ownerless channels, which cannot be migrated in this state. The information includes the team/group ID and channel ID.

Review the ownerless channel details
Review the ownerless channel details

I have prepared a PowerShell sample to enrich information for ownerless channels, including team names, team owners, and channel names, making it easier to handle them internally.

PowerShell
# This PowerShell sample retrieves the list of ownerless private channels in a tenant, and prepares a report with the team and channel details to support follow-up actions.

Import-Module MicrosoftTeams
Connect-MicrosoftTeams

$TeamStatus = Get-TenantPrivateChannelMigrationStatus
$TeamStatusJSON = $TeamStatus.Details | ConvertFrom-Json
$TeamStatusJSON.ownerlessChannelsDetails

$TeamDetails = @()
$Count = 1
foreach ($channel in $TeamStatusJSON.ownerlessChannelsDetails) {
    
    # Prepare variables for team and channel names, in cases where the teams or channels have been deleted already
    $Teamname = "Team unavailable"
    $Channelname = "Channel unavailable"

    try {
        # Get the team details. If the team has been deleted, this will throw an error which we catch to avoid breaking the script, and to log for follow-up
        $team = Get-Team -GroupId $channel.teamId 
        $Teamname = $team.DisplayName

        # Include team owners in the report, to make it easier to identify the right internal people to contact
        $TeamOwners = (Get-TeamUser -GroupId $channel.teamId -Role Owner).User -join ", "
        Write-Host "$Count of $($TeamStatusJSON.ownerlessChannelsDetails.count) - Team: $($team.DisplayName)"

        try {
            # Get the channel details. If the channel has been deleted, this will throw an error which we catch to avoid breaking the script, and to log for follow-up
            $channelDetails = Get-TeamChannel -GroupId $channel.teamId -MembershipType Private  | Where-Object { $_.ID -eq $channel.channelThreadId }
            $Channelname = $channelDetails.DisplayName
        }
        catch {
            Write-Host "Private channel unavailable for Team '$($team.DisplayName)': $($channel.channelThreadId)" -ForegroundColor Yellow
        }
    }
    catch {
        Write-Host "Team / M365 Group is unavailable: $($channel.teamId)" -ForegroundColor Red
        $TeamOwners = $null
    }

    # Add the details to the report object
    $TeamDetails += [PSCustomObject]@{
        TeamName    = $Teamname
        TeamId      = $channel.teamId
        TeamOwners  = $TeamOwners
        ChannelName = $Channelname
        ChannelId   = $channel.channelThreadId
    }

    $Count++
}

$TeamDetails | Sort-Object TeamName 
Share
Avatar photo

Tobias Asböck

Tobias is a Senior System Engineer with more than 10 years of professional experience with Microsoft 365 products such as SharePoint Online, SharePoint Premium, OneDrive for Business, Teams Collaboration, Entra ID, Information Protection, Universal Print, and Microsoft 365 Licensing. He also has 15+ years of experience planning, administering, and operating SharePoint Server environments. Tobias is a PowerShell Scripter with certifications for Microsoft 365 products. In his spare time, Tobias is busy with updates in the Microsoft 365 world or on the road with his road bike and other sports activities. If you have additional questions, please contact me via LinkedIn or [email protected].

Leave a Reply

Your email address will not be published. Required fields are marked *