SOLVED

Teams Direct routing error

%3CLINGO-SUB%20id%3D%22lingo-sub-218327%22%20slang%3D%22en-US%22%3ETeams%20Direct%20routing%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-218327%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20anyone%20help%20with%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESet-CsUser%20-Identity%20%22xxxx%40yyy.com%22%20-OnPremLineURI%20tel%3A%2B44XXXXXXXX1%20-EnterpriseVoiceEnabled%20%24true%20-HostedVoiceMail%20%24true%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGetting%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECannot%20modify%20the%20parameter%3A%20%22OnPremLineURI%22%20because%20it%20is%20restricted%20for%20the%20user%20service%20plan%3A%3CBR%20%2F%3EMCOPSTN1%2CMCOEV%2CMCOProfessional.%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20PermissionDenied%3A%20(Set-CsUser%3AString)%20%5BSet-CsUser%5D%2C%20UnauthorizedAccessException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20UnAuthorized%2CMicrosoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet%3CBR%20%2F%3E%2B%20PSComputerName%20%3A%20admingb1.online.lync.com%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-218327%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-315170%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-315170%22%20slang%3D%22en-US%22%3E%3CP%3EI%20found%20the%20solution.%3C%2FP%3E%3CP%3EIn%20my%20case%20my%20user%20was%20assigned%20a%20domestic%20calling%20plan.%3C%2FP%3E%3CP%3EI%20deleted%20the%20domestic%20calling%20plan%2C%20waited%2015%20minutes%2C%20and%20then%20I%20was%20able%20to%20change%20the%20LinUri.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-315095%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-315095%22%20slang%3D%22en-US%22%3E%3CP%3Efrom%20memory%20it%20was%20just%20a%20syntax%20issue%20and%20i%20think%20this%20sorted%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESet-CsUser%20-Identity%20%22bsnow%40xxxx.com%22%20-EnterpriseVoiceEnabled%20%24true%20-HostedVoiceMail%20%24true%20-OnPremLineURI%20tel%3A%2B44123456789%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-315038%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-315038%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20just%20got%20the%20same%20error%20when%20trying%20to%20change%20the%20LineUri%20on%20a%20online%20user.%3C%2FP%3E%3CP%3EDid%20you%20ever%20find%20the%20solution%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1258873%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1258873%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F32466%22%20target%3D%22_blank%22%3E%40Kjetil%20Lindl%C3%B8kken%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20you%20able%20to%20share%20the%20command%20you%20ran%3F%20I%20cant%20seem%20to%20remove%20the%20domestic%20calling%20plan%20and%20still%20receiving%20the%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECannot%20modify%20the%20parameter%3A%20%22OnPremLineURI%22%20because%20it%20is%20restricted%20for%20the%20user%20service%20plan%3A%20MCOProfessional%2CMCOMEETADD.%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20PermissionDenied%3A%20(Set-CsUser%3AString)%20%5BSet-CsUser%5D%2C%20UnauthorizedAccessException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20UnAuthorized%2CMicrosoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet%3CBR%20%2F%3E%2B%20PSComputerName%20%3A%20admin1e.online.lync.com%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regard%3C%2FP%3E%3CP%3EDave%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415341%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415341%22%20slang%3D%22en-US%22%3E%3CP%3EDid%20this%20get%20resolved%2C%26nbsp%3B%20I'm%20running%20into%20the%20same%20issue.%3C%2FP%3E%3CP%3EI%20enabled%20one%20user%20for%20direct%20routing%2C%20however%20this%20second%20user%20is%20give%20the%20below%20error%20when%20running%20the%20exact%20same%20power-shell%20command%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESet-CsUser%20-Identity%20%22userid%40domain%22%20-EnterpriseVoiceEnabled%20%24true%20-HostedVoiceMail%20%24true%20-OnPremLineURI%20'tel%3A%26lt%3B%2BE.164%20number%26gt%3B'%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECannot%20modify%20the%20parameter%3A%20%22EnterpriseVoiceEnabled%22%20because%20it%20is%20restricted%20for%20the%20user%20service%20plan%3A%3CBR%20%2F%3EMCOProfessional.%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20PermissionDenied%3A%20(Set-CsUser%3AString)%20%5BSet-CsUser%5D%2C%20UnauthorizedAccessException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20UnAuthorized%2CMicrosoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet%3CBR%20%2F%3E%2B%20PSComputerName%20%3A%20adminau1.online.lync.com%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1421408%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1421408%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F164032%22%20target%3D%22_blank%22%3E%40Brad%20Snow%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThen%20I%20ran%20this%20on%20a%20Teams%20Powershell%20session%3A%3CBR%20%2F%3ESet-CsUser%20-Identity%20%E2%80%9CFirst%20Last%E2%80%9D%20-EnterpriseVoiceEnabled%20%24false%3CBR%20%2F%3E%3CBR%20%2F%3Ethen%2C%20I%20ran%20this%20command%20on%20my%20DC%20and%20it%20worked%3A%3CBR%20%2F%3E%3CBR%20%2F%3Eset-aduser%20-Identity%20%3CUPN%3E%20-clear%20msRTCSIP-PrimaryUserAddress%2CmsRTCSIP-PrimaryHomeServer%2CmsRTCSIP-UserEnabled%2CmsRTCSIP-OptionFlags%2CmsRTCSIP-UserPolicies%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FUPN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1502409%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20routing%20error%20(RESTRICTED%20FOR%20THE%20USER%20SERVICE%20PLAN)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1502409%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F678545%22%20target%3D%22_blank%22%3E%40AK202020%3C%2FA%3E%26nbsp%3Bthe%20syntax%20is%20fine.%20The%20problem%20is%20most%20likely%20that%20the%20user%20does%20not%20have%20the%20Phone%20System%20license%20applied%20to%20their%20profile.%20Please%20add%20this%2C%20give%20it%205-20%20minutes%20to%20sync%20in%20the%20backend%2C%20then%20try%20again.%20Hope%20this%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Can anyone help with this?

 

Using;

 

 

Set-CsUser -Identity "xxxx@yyy.com" -OnPremLineURI tel:+44XXXXXXXX1 -EnterpriseVoiceEnabled $true -HostedVoiceMail $true

 

Getting;

 

Cannot modify the parameter: "OnPremLineURI" because it is restricted for the user service plan:
MCOPSTN1,MCOEV,MCOProfessional.
+ CategoryInfo : PermissionDenied: (Set-CsUser:String) [Set-CsUser], UnauthorizedAccessException
+ FullyQualifiedErrorId : UnAuthorized,Microsoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet
+ PSComputerName : admingb1.online.lync.com

8 Replies
Highlighted

Hi,

I just got the same error when trying to change the LineUri on a online user.

Did you ever find the solution?

Highlighted

from memory it was just a syntax issue and i think this sorted it?

 

Set-CsUser -Identity "bsnow@xxxx.com" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:+44123456789

Highlighted

I found the solution.

In my case my user was assigned a domestic calling plan.

I deleted the domestic calling plan, waited 15 minutes, and then I was able to change the LinUri.

Highlighted

@Kjetil Lindløkken 

 

Are you able to share the command you ran? I cant seem to remove the domestic calling plan and still receiving the error:

 

Cannot modify the parameter: "OnPremLineURI" because it is restricted for the user service plan: MCOProfessional,MCOMEETADD.
+ CategoryInfo : PermissionDenied: (Set-CsUser:String) [Set-CsUser], UnauthorizedAccessException
+ FullyQualifiedErrorId : UnAuthorized,Microsoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet
+ PSComputerName : admin1e.online.lync.com

 

Best regard

Dave

Highlighted

Did this get resolved,  I'm running into the same issue.

I enabled one user for direct routing, however this second user is give the below error when running the exact same power-shell command:

 

Set-CsUser -Identity "userid@domain" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI 'tel:<+E.164 number>'

 

Cannot modify the parameter: "EnterpriseVoiceEnabled" because it is restricted for the user service plan:
MCOProfessional.
+ CategoryInfo : PermissionDenied: (Set-CsUser:String) [Set-CsUser], UnauthorizedAccessException
+ FullyQualifiedErrorId : UnAuthorized,Microsoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet
+ PSComputerName : adminau1.online.lync.com

Highlighted

@Brad Snow 

Then I ran this on a Teams Powershell session:
Set-CsUser -Identity “First Last” -EnterpriseVoiceEnabled $false

then, I ran this command on my DC and it worked:

set-aduser -Identity <upn> -clear msRTCSIP-PrimaryUserAddress,msRTCSIP-PrimaryHomeServer,msRTCSIP-UserEnabled,msRTCSIP-OptionFlags,msRTCSIP-UserPolicies

 

Highlighted

@AK202020 the syntax is fine. The problem is most likely that the user does not have the Phone System license applied to their profile. Please add this, give it 5-20 minutes to sync in the backend, then try again. Hope this helps.

Highlighted
Best Response confirmed by ThereseSolimeno (Microsoft)
Solution

@GrantC66 

 

Thanks,

I did some testing and found that the Teams Phone License needs to eb assigned to the user prior to running these commands.

I was under the impression that these commands would assign the license and also enable them for Direct Routing.

However the user needs to have a license assigned first, then these commands executed.

So this is now resolved.

Thanks