I have created a workflow that calls https://site.sharepoint.com/sites/site/_api/Web/CurrentUser
and stores the user ID in a variable called userId.
I am then passing that userId into another call
/_api/Web/getUserbyId([%Variable: userId%])/Groups
.
Now I am storing the results of the second call in a variable called JSONResultsGroup
Next I want to get the Title of the groups from the dictionary.
I am using
Get d/Title from Variable: JSONResultsGroup (Output to Variable: dataset )
Then counting the items in the dataset and storing the count in resultsCount variable.
For troubleshooting I am logging the count of the variable, but I never seem to get any results. I have tried many different variations in the Get d/Title
call but cant seem to get the path of the json correct.
Actual workflow:
Call ://site.sharepoint.com/sites/ksec... HTTP web service with request (ResponseContent to Variable: JSONResults |ResponseHeaders to Variable: responseHeaders |ResponseStatusCode to Variable: responseCode )
Get Id from Variable: JSONResults (Output to Variable: userId )
Log User ID Is [%Variable: userId%] to the workflow history list
Call ://site.sharepoint.com/sites/ksec... HTTP web service with request (ResponseContent to Variable: JSONResultsGroup |ResponseHeaders to Variable: responseHeadersGroup |ResponseStatusCode to Variable: responseCode1 )
Log 2nd call is [%Variable: responseCode1%] to the workflow history list
Get d/Title from Variable: JSONResultsGroup (Output to Variable: dataset )
Count Items in Variable: dataset (Output to Variable: resultsCount )
Log resultscount [%Variable: resultsCount%] to the workflow history list