Get Manager field of Active Directory from SharePoint Designer Workflow 2013
Вопрос
Is there any option in ShaerPoint Designer 2013 workflow to access Active Directory "Manager" field?
So that we can get the manager of a user specified in particular field.
Решение
You're using SharePoint 2013 - got it.
If your workflow is a SharePoint 2010 workflow you can simply use the Lookup Manager for User activity.
If your workflow is a SharePoint 2013 workflow you will need to use the Call HTTP Web Service activity, with the following end point URL:
http://your-sharepoint-site/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v=[%Workflow Context:Initiator%]
You can find full details here.
Другие советы
I have posted a detailed instructions for getting the current user and the user's manager in SharePoint Online. I have also added a link for the JS and custom form for download. Get Current Logged in User & Manager using REST API in SharePoint Online
REST API Call:
var url=_spPageContextInfo.webAbsoluteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties"