Hello,
I appreciate your assistance in the below.
A simple web service to get the PreferredName of the account using either SharePoint UserGroup.asmx service or REST and both are not working.
Whenever I try the Run Now, I get the results as expected. When running the instance the first (UserGroup.asmx) results in 401 Unauthorized. The second (REST)provides a completely different XML without the user profile properties.
Please find attached the screens for the configuration and the results.
results in 401 unauthorized in a workflow context.
Failed to invoke web service. Error returned from server: 401 UNAUTHORIZED
The returned xml is only this part that doesn't include the user information.
<?xml version="1.0" encoding="utf-8"?><d:GetPropertiesFor xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:null="true" />
The workflow runs in the context of the user who published the workflow and is also a site admin same as the username specified for the webservices.
Appreciate any insight and thank you in advance!
Solved! Go to Solution.
@zeet .....Is there a reason you're not using query user profile or set variable action instead?
@zeet ....I'm talking about Query User Profile and you can also use Set Variable action. Since your user information have multiple source but it does gets sync with SP farm using User Profile Service Application which means either action will be able to work for you.
Thank you @kunalpatel but for some reason, there is no Query User Profile
@zeet ....did you try set variable action?