Forum Discussion

WhoThis's avatar
WhoThis
Copper Contributor
May 18, 2021

Cannot Assign Phone Number to Ressource Account via PowerShell

Hi

 

I'm trying to implement a script to assign phone numbers to resource account through teams, but unfortunately, I keep getting an error stating the format is not valid.

 

Although, when trying to assign the number through the GUI, it is possible and with no issue.

 

Here's an example of the command I'm trying to use

Set-CsOnlineVoiceApplicationInstance -Identity $ID -TelephoneNumber -33xxxxxxxx

 

Of course a virtual license is assigned to the account.

 

Is there something that I might have forgotten to apply for it to work correctly?

 

Thank you for your help

    • WhoThis's avatar
      WhoThis
      Copper Contributor
      Hi,

      I am aware of the docs, I just put $Id which is the ObjectID of the Ressource Account.
      Of course I did test with the UPN and have the same result.

      As for the number, yes, it is a French number, with 9 digits after +33

      But after some more in-depth check, it seems the issue is with the tenant as I cannot assign a phone number to a resource account even with the GUI.

      I'll see with Microsoft support about the issue.

      Thank you
      • paul-lange's avatar
        paul-lange
        Iron Contributor
        One thing is worth a check. What is the type of the number you are trying to assign? It should be a service number if you want to assign it to a resource account.

Resources