Use set-csmeetingroom for assigning lineuri error

%3CLINGO-SUB%20id%3D%22lingo-sub-2197293%22%20slang%3D%22en-US%22%3EUse%20set-csmeetingroom%20for%20assigning%20lineuri%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2197293%22%20slang%3D%22en-US%22%3E%3CP%3ETrying%20to%20script%20the%20creation%20or%20migration%20of%20meeting%20rooms%20to%20Teams.%26nbsp%3B%20This%20would%20include%20assigning%20Lineuri%20for%20each%20room.%3C%2FP%3E%3CP%3EI%20can%20assign%20them%20in%20the%20GUI%20just%20fine.%3C%2FP%3E%3CP%3E(below%20is%20example%20with%20real%20data%20removed)%3C%2FP%3E%3CP%3ESet-CsMeetingRoom%20-Identity%20confrm1%40contoso.com%20-lineuri%20tel%3A%2B12225551234%20-locationID%20XXXXXXXX%3CBR%20%2F%3EUnable%20to%20set%20%22LineURI%22.%20This%20parameter%20is%20restricted%20within%20Remote%20Tenant%20PowerShell.%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20InvalidArgument%3A%20(%3A)%20%5BSet-CsMeetingRoom%5D%2C%20ManagementException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20LineURI%2CMicrosoft.Rtc.Management.AD.Cmdlets.SetOcsMeetingRoomCmdlet%3CBR%20%2F%3E%2B%20PSComputerName%20%3A%20api.interfaces.records.teams.microsoft.com%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Erunning%20the%20set-csuser%20with%20the%20room%20identity%20gives%20the%20same%20error.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2197293%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMeetings%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Trying to script the creation or migration of meeting rooms to Teams.  This would include assigning Lineuri for each room.

I can assign them in the GUI just fine.

(below is example with real data removed)

Set-CsMeetingRoom -Identity confrm1@contoso.com -lineuri tel:+12225551234 -locationID XXXXXXXX
Unable to set "LineURI". This parameter is restricted within Remote Tenant PowerShell.
+ CategoryInfo : InvalidArgument: (:) [Set-CsMeetingRoom], ManagementException
+ FullyQualifiedErrorId : LineURI,Microsoft.Rtc.Management.AD.Cmdlets.SetOcsMeetingRoomCmdlet
+ PSComputerName : api.interfaces.records.teams.microsoft.com

 

running the set-csuser with the room identity gives the same error.

2 Replies
I'm not sure if I'm late with this but here is the solution :) You need to assign the phone number before you set the command enable-csmeetingroom. If you already have enabled a csmeeting room then you have to disable it (disable-csmeetingroom) then remove the license wait for a while and then assign the license again. After that you have to enter the commands in the correct order which is assigning the phone number first then you can do the other commands like enable-csmeetingroom ... I have reported that "bug" to MS and they just say they can reproduce the issue and advised me to create a new case for that.

@ATKai 

We are having same issue. Teams Room was fine with LineURI assigned, however as part of Skype on-premises servers decomssion, we need to remove OnPrem LineURI and re-assign in Teams. All users' LineURIs assigned, however Teams Rooms LineURI getting error.