Question

I have been trying to get user manager using REST call from SharePoint Designer

[https://site_url/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v=%27i%3A0%23.f%7Cmembership%7COmi%40company.com%27][1]

above link works ok and returns entire JSON with unwanted properties of that user

I tried below link for getting only manger, so I added propertyName='Manager' but it returns The parameter name propertyName is not valid

https://site_url/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v,propertyName='Manager')?@v=%27i%3A0%23.f%7Cmembership%7COmi%40company.com%27

Thanks

Was it helpful?

Solution

Instead of using "GetPropertiesFor" use "GetUserProfilePropertyFor".

Use following url:

https://site_url/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='Manager')?@v=%27i%3A0%23.f%7Cmembership%7COmi%40company.com%27
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top