Exporting Teams Phone Numbers
Follow the below steps in order to export the information from the correct module (Microsoft Teams).
- Open Powershell as Administrator
-
Install-Module -Name PowerShellGet -Force -AllowClobber
-
Install-Module -Name MicrosoftTeams -Force -AllowClobber
- Import-Module MicrosoftTeams
-
Connect-MicrosoftTeams -Credential $credential
- Login as a Global admin or Teams admin account
- Get-CsOnlineUser | Where-Object { $_.LineURI -notlike $null } | ft DisplayName,UserPrincipalName,LineURI
The final command will export a CSV file to C:/users/name.