Forum Discussion
Hubert_Zarna
May 23, 2024Copper Contributor
GetPropertiesFor not returning properties with "Only Me" privacy
Hi,
I'm trying to get user profile properties with privacy set to "Only Me" using REST API.
I'm using url:
https://<company_name>-admin.sharepoint.com/_api/SP.UserProfiles.PeopleManager/getpropertiesfor(accountName=@v)?@v='i:0%23.f|membership|test.user@<company_name>.com'
It returns lot o properties but properties with privacy "Only Me" are not present.
If I change accountName to the same as I'm using to make request "Only Me" properties are present.
If I change "Only Me" to "Everyone", property is present is response.
I'm using account with admin privileges and can see/edit those properties on sharepoint admin web page. I expect the same behavior and REST API. Any idea how to get those properties?
No RepliesBe the first to reply