Home > Reshmee Auckloo, Work > Unable to update User Profile Property due to Policy Settings set to Disabled

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.

pictureurl-policysettingsettodisabled-1

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.

pictureurl-policysettingsettooptional

<d:PictureUrl>siteurl/StaffDetail/js.jpg?t=63579640559</d:PictureUrl>

 

 

 

from reshmeeauckloo http://bit.ly/2hPZfdw

Reshmee Auckloo
Reshmee Auckloo – Reshmee is a certified Microsoft professional and has been involved in delivering solutions across a wide variety of industry sectors in a range of assignments from SSRS to Microsoft SharePoint, Project Server development, CRM Dynamics and .Net including business requirements gathering and software quality assurance.

This article has been cross posted from reshmeeauckloo.wordpress.com (original article)

Advertisement
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: