REST call to SharePoint Online from Designer Workflow
-
08-02-2021 - |
Question
I have been trying to get user manager using REST call from SharePoint Designer
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
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