Unable to update User Profile Property due to Policy Settings set to Disabled
The web service userprofileservice <site url>/_vti_bin/userprofileservice.asmx has to be used to update user profile properties for other users in SharePoint 2013 and SharePoint Online.
Even though the HTTP status code response returned was 200 which means successful, the user profile property was blank when the user properties was queried using the REST api method sp.userprofiles.peoplemanager/getpropertiesfor.
<site url>/_api/sp.userprofiles.peoplemanager/getpropertiesfor(@v)?@v=’i%3A0%23.f%7Cmembership%7CfirstName.LastName%40arteliauk.onmicrosoft.com’
The user profile property updated was PictureUrl , however it was showing as null
<d:PictureUrl m:null="true" />
After spending a couple of hours trying to figure out why the use profile property was not showing, I decided to review the user profiles properties for Picture property and how it is different from the other user profile properties, e.g. Job Title which was showing the updated value.
The Policy Settings on Picture property was disabled for some reason.
Disabled from Manage user profile policies in SharePoint admin center meant
The property or feature is visible only to the User Profile Service administrator. It does not appear in personalized sites or Web Parts, and it cannot be shared.
Also it meant the property was not visible when queried by REST API.
After updating the policy settings to Optional, the pictureURL property for the user is being returned by the REST API query and showing up in SharePoint sites as well.
<d:PictureUrl>siteurl/StaffDetail/js.jpg?t=63579640559</d:PictureUrl>
from reshmeeauckloo http://bit.ly/2hPZfdw
|
You must be logged in to post a comment.