You can use Microsoft Teams PowerShell module to obtain phone numbers.
- Install the Microsoft Teams PowerShell module. You can find the module here.
- Connect to the other tenant using the
Connect-MicrosoftTeams
cmdlet and authenticate with the necessary permissions. - Use the
Get-CsPhoneNumberAssignment
cmdlet to retrieve the phone numbers. Here's an example command:
Get-CsPhoneNumberAssignment -UserId "user-id"
Replace "user-id" with the user ID of the Teams user in the other tenant.
https://learn.microsoft.com/en-us/powershell/module/teams/Get-CsPhoneNumberAssignment?view=teams-ps
Thanks,
Prasad Das
*************************************************************************
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.