Assume that you try to assign a location policy to a cloud-based user in a Microsoft on-premises Lync Server 2013 and Lync Online hybrid deployment. To do this, you run the Grant-CsLocationPolicy cmdlet on an on-premises Lync Server 2013 server. In this situation, the operation fails, and you receive the following error message:
Grant-CsLocationPolicy : Cannot assign policy to user hosted by a hosting provider.
+ Grant-CsLocationPolicy <User> -PolicyName UserLocationPolicy
+ CategoryInfo : NotSpecified: (:) [Grant-CsLocationPolicy], ManagementException
+ FullyQualifiedErrorId : Microsoft.Rtc.Management.AD.ManagementException,Microsoft.Rtc.Management.AD.Cmdlets.AssignLocationPolicyCmdlet
+ Grant-CsLocationPolicy <User> -PolicyName UserLocationPolicy
+ CategoryInfo : NotSpecified: (:) [Grant-CsLocationPolicy], ManagementException
+ FullyQualifiedErrorId : Microsoft.Rtc.Management.AD.ManagementException,Microsoft.Rtc.Management.AD.Cmdlets.AssignLocationPolicyCmdlet