Microsoft Teams Phone Number Attribute in Active Directory

Brass Contributor



I need to find users in Active Directory who have no Telephone number entry in the AD field but with assigned phone numbers in Teams?  I have to type the phone number in Active Directory manually.  I need to find a report or solution, so I could update our AD if the person in our team already assigned a phone number in Teams.  Any solution to this?  Thank you.

5 Replies
You can generate a list of users with phone numbers assigned as detailed here:
Export to CSV and use the file as input for your on-premises objects.

Hi, @Dobongsoon 


If there is no simple way, how about trying to sync with powershell commands.


1. Get all Teams users phone number  (using 'MicrosoftTeams' module) 

$teamsUsers = Get-CsOnlineUser | Select-Object UserPrincipalName, LineURI


2. Compare phone number between AD and Teams.


(Get-ADUser -Identity $teamsUser -Properties *).Mobile


3. If there is difference, overwrite AD att.



I didn't write the full script.
It seems that it can be applied using the above command and foreach syntax.






best response confirmed by Dobongsoon (Brass Contributor)

@somnio0505 Thank you for the information.  This confirms that there is no direct attribute between the two, and that the information lives in two different environment.  I will check out the script. I appreciate the time and help on this.

There's a great write up here that shows exactly how to do this using the Teams Powershell Module. There's even a script provided that can connect to your teams tenant to grab the LineURIs of users and then update the AD telephoneNumber attribute:


Can you maybe help me creating the same type of script but then the other way around. Im looking for a way to update phonenumbers of teams users by using the on prem ad.


Kind regards,

Ismet IT