Cannot Assign Phone Number to Ressource Account via PowerShell

Copper Contributor

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

4 Replies
Hi,

the docs say the command should look like this:
Set-CsOnlineVoiceApplicationInstance -Identity testra1@contoso.com -TelephoneNumber +14255550100

If this supposed to be a french number, it would look like +33xxxxxxxx
https://docs.microsoft.com/en-us/powershell/module/skype/set-csonlinevoiceapplicationinstance?view=s...

Hope this helps
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
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.
Yes of course it is a service number.

I can't assign anything but a service number from the ressource account menu on teams anyway.