question

cindymello-1540 avatar image
0 Votes"
cindymello-1540 asked saldana-msft edited

Sharepoint Design 2013 call https service getting unauth in app step web app set up with full control in site app permissions

[%Workflow Context:Current Site URL%]api/web/sitegroups/getbyname('FBA%20Dealer%20Engineers%20XRE%20Full%20Room%20Solutions')?$format=JSON&$select=Id

value for the this in the https call action is string above

I am storing response in dictionary but no response as response code is unauthorized.
The string does execute in the browser

Yes web app permissions set up and with full control for the list site and site collection it is in
App step not grey out in fact on another workflow same list I can use app step to break inheritance.

The group I am trying to get id for is not the same as list workflow is built on but the app step says I have the elevated right on the objects in the site collection and groups are in the site collection.
??
Cindy

sharepoint-workflow
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PeterFleischer-3316 avatar image
1 Vote"
PeterFleischer-3316 answered cindymello-1540 commented

Hi Cindy,
you must set X-RequestDigest.

To get X-RequestDigest string call HTTP service (HTTP POST) with address <website-url>/_api/contextinfo and extract FormDigestValue from ResponseStatusCode.




· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I was able to get the DigestID from

Source: https://saberghanmien.wordpress.com/2018/06/06/sharepoint-designer-call-http-web-service-with-requestdigest/

and use it in a second post call to get the group id

fixed the unauthorized result.

Your direction worked I got the X-RequestDigest. added it to the next call and returned the group id I was looking for

Thank you I have been told to use SPD 2013 for upgrading all our 2010 workflows and the rest calls I am learning.

Cindy


1 Vote 1 ·
cindymello-1540 avatar image
0 Votes"
cindymello-1540 answered PeterFleischer-3316 commented

One last question
will using SPD and REST call SP API and X-RequestDigest still work with 365? I do not know how long we will be on premise with SP 2019.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Cindy,
in SharePoint Online you can also get DigestID from contextinfo and include as X-RequestDigest in HTTP Post.

1 Vote 1 ·