SOLVED

Add empty value on MobilityPolicy

Copper Contributor

I try to put empty value for MobilityPolicy for OnlineUser with this method :

 

 

Grant-CsMobilityPolicy -PolicyName $Null -Identity 'test'

 

 

But I have this error message

 

 

This policy must be assigned a value compatible with the user's subscription and location. It cannot be $null.
+ CategoryInfo : InvalidOperation : (Grant-CsMobilityPolicy:String) [Grant-CsMobilityPolicy], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.Rtc.Management.Xds.GrantMobilityPolicyCmdlet
+ PSComputerName : admin2e.online.lync.com

 

 

I don't know why I have this error because I have user who have this empty value. Some with license and location and some without.

Too I can't add an existing MobilityPolicy to an user who have an empty value.

 

If someone have an idea, I will be glad to discuss about this.

 

Thanks you

 

 

5 Replies
best response confirmed by aehanno (Copper Contributor)
Solution

Hey @aehanno ,

 

Is this a hybrid environment ? By default in SFB online (atleast thats how i see in my environment) the default policy name is "MobilityEnableOutsideVoice".

You can check the same for a default user using : Get-Csonlineuser | select userprincipalname,mobilitypolicy

 

So the $NULL attribute as policy name most probably won't work for user homed in SFBOnline. To set a online user back to default you can use:

Grant-CsMobilityPolicy -Identity user@domain.com -PolicyName MobilityEnableOutsideVoice

 

As far as users showing empty value, check where the users are hosted.

 

Get-Csonlineuser | select userprincipalname,hostingprovider

If you see SRV: that would mean the user is on-premises and you will have to manage the policy on-premises.

 

Thanks

 

hello@harveer singh 

 

thanks for the response.

 

So if I understand, if users are online, they can't have MobilityPolicy's value empty but if there are on-premise the default value is $null?

 

You right, all users who have mobility policy's value empty are users with hostingprovider's value SRV

But when a user have SRV as hostingprovider and MobilityEnableOutsideVoice as MobilityPolicy when I want put $null for mobilitypolicy I have the same error than before

 

thanks

If a user has hosting provider as SRV: you need to manage its mobility policy from on-premises skype for business powershell. The $null attribute should work on-premises and right you will not be able to use $null for a user in sfbonline.

I can't use Grant-CsMobilityPolicy when the user is on prem ?

What I have to use ? I only find this one on the Microsoft Doc

 

Thanks

Use the same command but from skype for business on-premises powershell.
Check this link out : https://github.com/MicrosoftDocs/office-docs-powershell/issues/3661
Pretty much the same issue, but the command does work with $null attribute if you run it against an on-premises sfb user from on-premises skype for business powershell.
1 best response

Accepted Solutions
best response confirmed by aehanno (Copper Contributor)
Solution

Hey @aehanno ,

 

Is this a hybrid environment ? By default in SFB online (atleast thats how i see in my environment) the default policy name is "MobilityEnableOutsideVoice".

You can check the same for a default user using : Get-Csonlineuser | select userprincipalname,mobilitypolicy

 

So the $NULL attribute as policy name most probably won't work for user homed in SFBOnline. To set a online user back to default you can use:

Grant-CsMobilityPolicy -Identity user@domain.com -PolicyName MobilityEnableOutsideVoice

 

As far as users showing empty value, check where the users are hosted.

 

Get-Csonlineuser | select userprincipalname,hostingprovider

If you see SRV: that would mean the user is on-premises and you will have to manage the policy on-premises.

 

Thanks

 

View solution in original post