Probably the first question here could be “Why do we still need the set-csuser cmdlet”. In Skype For Business it was mandatory to modify user properties but in Teams it has a really limited usage.
Still, it is required to enable users to Direct Routing (if you have Calling Plans, you are able to do the user configuration without using it) with a format like
Set-CsUser -Identity "" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:
+xxxxxxxxxx
There is no replacement in the Teams Admin Center so the cmdlet is mandatory
In my test the user had Teams Service Administrator role (as for the screenshot below)
As a side note, there was no pre-existing Skype for Business deployment.
The set-csuser cmdlet was missing (also if other set-cs cmdlets were available, though) as in the picture below
After a bit of searching (including verifications in Azure AD Privileged Identity Management) what I found is that you need to be also Skype for Business administrator (even where Skype for Business was never used)
Adding the Skype for Business administrator role, the cmdlet is there
So, in a nutshell:
- You need the set-csuser cmdlet for Teams Direct Routing
- You need Teams Service Administrator and Skype for Business administrator role (regardless if Skype for Business was used or not)