SOLVED

Microsoft Teams Phone Number Attribute in Active Directory

Occasional Contributor

Hi,

 

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.

3 Replies
You can generate a list of users with phone numbers assigned as detailed here: https://docs.microsoft.com/en-us/microsoftteams/see-a-list-of-phone-numbers-in-your-organization#usi...
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.

 

Thanks.

 

 

 

best response confirmed by Dobongsoon (Occasional Contributor)
Solution

@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.