Pregunta

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

¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
scroll top