In Microsoft Teams, it is required to create a resource account for auto-attendants and call queues to be able to route phone numbers or auto attendants to them. In the PBX world this would be considered an inbound rule/route.
Side Panel > Org-wide settings > Resource accounts
name of queue or auto attendant
we use the same as Displayname @
Resource account type:
Auto Attendant or
Now that you have created your resource group, you need to assign a phone number. For direct routing, we will assign a phone number via PowerShell.
Follow this guide if you are unfamiliar with accessing PowerShell.
Set-CsOnlineApplicationInstance -Identity "firstname.lastname@example.org" -OnpremPhoneNumber "1NPANXXYYYY"
email@example.com to the resource account user.
1NPANXXYYYY to the phone number you want assigned to your phone number.