I'm trying to create subsites for items in a project list using a SharePoint Designer Workflow using the SharePoint REST API services, but each time I attempt to run the workflow I get the Response
"Unauthorized" (or sometimes a 401 or 403 error... I've tried a lot of fixes).
I am running the workflow and assigning permissions all using the administrator account so I don't think it's a user privileges error, but an issue with the app privileges. I know the app step was working (some of the time) because I have received emails from the workflow. I've tried so many different versions though that it's hard to tell if it's working at this point.
The subsites will be created under the projects site collection:
which is of course the same address that the HTML POST call references...
but I have tried to add app permissions to the main site collection as well, just in case that could be an issue:
I have looked through many of the resources available and tried everything I can think of:
Microsoft say they updated the XML permissions code sometime at the end of 2017: https://msdn.microsoft.com/en-us/library/office/jj822159.aspx
but I've tried copy pasting the code there and even trying to bypass the gotcha with the following XML:
<AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" /> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" /> </AppPermissionRequests>
but nothing seems to be working.
Could this be an issue with the app catalogue, or is there something I'm missing? Alternatively it could just be that Microsoft Products are garbage, but I need to check whether it's my fault first.
I'd appreciate any sort of assistance (but please don't mark as duplicate question and link to some irrelevant article).