Hello, I'm having trouble with a POST REST web service call from workflow in 365. Using information from this post Updating list items using SharePoint 2013 workflow engine | Cambridge Technology Partners Blog and this post My SharePoint Insight: Using SharePoint REST services from workflow with POST method I was able to successfully create a new document library in the current site using a REST call and Nintex Workflow. However, when I try to create a list in a sub site I get a response code of 'Unauthorized' and the message "Unauthorized - {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}"
My sub site inherits permissions from the parent where the workflow is running. Both sites have the feature enabled 'Workflows can use app permissions'. I am using the Call HTTP Web Service action but I have also tried using the Call Web Service action so I could specify credentials. It just suspends the workflow with the message 'Invalid text data'.
Here are my steps:
1. Build Dictionary - Request Headers
2. Build Dictionary - Metadata
3. Build Dictionary - Request Content
4. Inside an App Step action - Call HTTP Web Service
According to this post How to call a web service logged in as another user who's got the permissions to do it? In Nintex Workflow Office 365 this should work simply by wrapping the call web service action in an App Step.
I am having to use the REST service to create this document library because I specifically want to enable content types on it. I have been unsuccessful getting the SOAP UpdateList call to configure this and the CreateList call does not allow for additional parameters.
Any additional information would be greatly appreciated. Thanks!