Migrating from one tenant to another, and we have a problem.

Iniobong Nkanga 2,051 Reputation points
2023-01-25T10:36:29.7066667+00:00

Hello

Please i need your help on this issue.

We have been migrating from one tenant to another, and we have a problem. 

Is there a way to get us a full list of teams, and members of those teams that was emptied. or if we could get the members of the teams in this tenant.

If this is possible, for me - I can do it myself - but i cant find it - so I'm trying you to see if anyone can be of to help.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,879 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kael Yao-MSFT 37,696 Reputation points Microsoft Vendor
    2023-01-26T02:03:12.6+00:00

    Hi @Iniobong Nkanga

    It can be done via Teams Powershell.

    Here is an example from Microsoft Teams PowerShell Commands to List All Members and Owners.

    (Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.)

    Connect-MicrosoftTeams -AccountId ******@domain.onmicrosoft.com
    
    $AllTeams = (Get-Team).GroupID
    $TeamList = @()
    
    Foreach ($Team in $AllTeams)
    {       
            $TeamGUID = $Team.ToString()
            $TeamName = (Get-Team | ?{$_.GroupID -eq $Team}).DisplayName
            $TeamOwner = (Get-TeamUser -GroupId $Team | ?{$_.Role -eq 'Owner'}).Name
            $TeamMember = (Get-TeamUser -GroupId $Team | ?{$_.Role -eq 'Member'}).Name
    
            $TeamList = $TeamList + [PSCustomObject]@{TeamName = $TeamName; TeamObjectID = $TeamGUID; TeamOwners = $TeamOwner -join ', '; TeamMembers = $TeamMember -join ', '}
    }
    
    $TeamList | export-csv c:\temp\TeamsData.csv -NoTypeInformation 
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.