使用JSOM或CSOM或REST API更新当前用户的用户配置文件属性隐私值 [英] Update Current User's User Profile Property Privacy Value using JSOM or CSOM or REST API

查看:66
本文介绍了使用JSOM或CSOM或REST API更新当前用户的用户配置文件属性隐私值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




大家好, 


我有一个senario来更新用户个人资料已登录用户的属性值以及每个属性的隐私搜索,例如"显示到" - > "大家"或NBSP; "仅限我"。 
$


我可以使用以下功能更新用户个人资料属性值。 

- Microsoft.SharePoint .Client.UserProfiles.PeopleManager :: SetSingleValueProfileProperty()

- Microsoft.SharePoint.Client.UserProfiles.PeopleManager :: SetMultiValuedProfileProperty()



但是,通过自定义代码更新每个房产的隐私政策是不可行的。



请建议实现此目的的可行性。 





提前付款, 



Sugumaran S





Sugumaran Srinuvasan

解决方案


< p style ="margin-bottom:12.0pt; line-height:125%; background:white"> 我们无法通过Client API为用户配置文件属性设置隐私策略s。


如果要更改其他用户配置文件属性,则需要使用服务器端对象模型(SSOM)。


通过
设置隐私级别和隐私政策
隐私枚举

PrivacyPolicy Enum
来自
Microsoft.Office.Server.UserProfiles


如何使用SSOM设置隐私政策:


https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ms583766(v%的3Doffice.14)


Best 问候,


Linda 张



Hi All, 

I have a senario to update the User profile property value of the logged user along with privacy seeting of each property like "Show To" - > "EveryOne" OR  "Only Me". 

I can Update the User profile property value using below Functions. 
- Microsoft.SharePoint.Client.UserProfiles.PeopleManager::SetSingleValueProfileProperty()
- Microsoft.SharePoint.Client.UserProfiles.PeopleManager::SetMultiValuedProfileProperty()

But there is no feasibility to update privacy policy of each property via Custom Code.

Please suggest the feasible of achieving this. 


thanks in advance, 

Sugumaran S


Sugumaran Srinuvasan

解决方案

Hi,

We cannot set privacy polices for user profile properties via Client APIs.

If you want to change other user profile properties, you need to use the server-side object model (SSOM).

Set privacy level and privacy policy for the property through Privacy Enum and PrivacyPolicy Enum from Microsoft.Office.Server.UserProfiles.

How to set privacy policies using SSOM:

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ms583766(v%3Doffice.14)

Best regards,

Linda Zhang


这篇关于使用JSOM或CSOM或REST API更新当前用户的用户配置文件属性隐私值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆