MS Teams - Get number from deleted user

Theo Gordon 2 Reputation points
2022-05-12T11:28:43.077+00:00

Is there a way to get the number back from a deleted user in Teams? Preferably via Powershell

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,073 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Daniel Kåven 696 Reputation points
    2022-05-12T21:43:53.983+00:00

    There is a feature in the teams powershell module and the commandlet
    Get-CsPhoneNumberAssignment

    Read more here: https://learn.microsoft.com/en-us/powershell/module/teams/get-csphonenumberassignment?view=teams-ps

    If you need more details please specify, I haven't got a tenant with voice atm, but have some experience with Poweshell.

    0 comments No comments

  2. Yuki Sun-MSFT 40,856 Reputation points
    2022-05-13T08:32:09.937+00:00

    Hi @Theo Gordon ,

    Are you referring to phone number assigned in Teams?

    As far as I know, it's not feasible to retrieve the data from a "deleted" user. If it's a recently deleted user(within 30 days), you can try restoring the user's account and then connect to Teams powershell, run the command below to get its phone number:

    Get-CsOnlineUser <UserIdentity> | ft LineURI  
    

    But if the user has already been deleted permanently, I am afraid it cannot be retrieved any more.


    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.