nico
Process Pupil

Re: Create SharePoint Group with Contribute permissions

Jump to solution

Be carful, you pass a wrong content type in your request.

Your body is in JSON format, and in your query Content type (in the header) the value is XML. 

Change your "content type" value with : "application/json;odata=verbose"

(I have just test it, and I have sucess full create a SPGroup)

2019-04-24_14-20-54.png

0 Kudos
Reply
mirian_navas
Forms Fledgling

Re: Create SharePoint Group with Contribute permissions

Jump to solution

Thanks @nico . It must have been some proof. I have reviewed all the headers and I have the same as the photo you send. The result is the same

If I use web request:

Store response Content: {"error":{"code":"-2130575251, Microsoft.SharePoint.SPException","message":{"lang":"en-US","value":"The security validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your

If I use Call http Web Service:

 headers: {"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The property '__metadata' does not exist on type 'SP.Group'. Make sure to only use property names that are defin

The only difference is that Web request I can pass the contents of the body and headers directly and with call I have to use dictionaries.

 

If you have a solution that works, there would be a possibility that you would export that WF and send it to me and I'll try it (deleting your username and password)

0 Kudos
Reply
nico
Process Pupil

Re: Create SharePoint Group with Contribute permissions

Jump to solution

No problem for exporting the Workflow, see it in attachment (I have renamed the package with .zip, remove it before import)

 

An exemple of the result : 

2019-04-25_10-36-37.png

 

Note : In my 2 "Web Request" actions, I set my Email / password, else I have an UnauthorizedAccessException

 

Be carefull, there is actualy a bug when you want to use JSON and workflow varariable. 

You can find some workaround here : 

https://community.nintex.com/t5/Nintex-for-Office-365/Build-string-jSon-and-workflow-variables-not-w...

https://community.nintex.com/t5/Nintex-for-Office-365/Changing-Site-URL-and-Title-via-Nintex-Workflo...

 

Good luck

View solution in original post

0 Kudos
Reply
mirian_navas
Forms Fledgling

Re: Create SharePoint Group with Contribute permissions

Jump to solution

@nico  Your solution works!
I think the difference (and the error) is in passing the content in a string and not in a dictionary.

 

Thank you very much for your time and help.

 

0 Kudos
Reply