Forum Discussion
Microsoft Teams Phone Number Attribute in Active Directory
- Feb 23, 2022
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.
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.
- Ismet_ITAug 27, 2023Copper Contributor
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
- DobongsoonFeb 23, 2022Brass 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.