To get the department property of the logged in user -
http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties?$select=Department
To get all the properties of another user -
http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties?$select=Department
To get all the properties of another user -
For Office 365/SharePoint Online:
http://siteurl/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='Department')?@v='i:0%23.f|membership|user@siteurl.onmicrosoft.com'
For SharePoint 2013 On-Premise:
http://siteurl/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='Department')?@v='domain\username'
No comments:
Post a Comment