Forum Discussion
aehanno
Aug 11, 2020Copper Contributor
Add empty value on MobilityPolicy
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
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
- harveer singhSteel Contributor
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
- aehannoCopper Contributor
helloharveer 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
- harveer singhSteel ContributorIf 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.