Checking for Phone plan licenses for Microsoft Teams users

Author by Brett Janzen

I had to find if users had a phone system licenses in order to assign them a direct routing number.

Get-MsolUser -userprincipalname user@domain.com | select-object Licenses

Licenses
 {M365x880312:ENTERPRISEPREMIUM, M365x880312:EMSPREMIUM}

Phone system Licenses = MCOEV

When working with Direct Routing, the user cannot have Calling Plan Licenses installed for the accounts. MCOPSTN2, MCOPSTN1 and MCOPSTN5

If the user has for an example ENTERPRISEPREMIUM This includes phone system so no need to add it.

Reference to Licenses Names

https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/licensing-service-plan-reference