cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
dyermull
Nintex Newbie

Nintex for Office 365 Web Request error

Jump to solution

I'm using the Nintex Web Request Action in Office 365 to create a SharePoint group that is failing and getting a Soap error in the response code:

soap:ClientServer was unable to read request. ---> Request format is invalid: Missing required soap:Body element.

I set the Web Request up by using these instructions but modifying slightly for the AddGroup method:Getting Started 

The general idea is to put an item in a SharePoint list and create a SharePoint group. I've tried changing some of the parameters around, but I keep getting the same error. Maybe I'm going about this the wrong way. Any ideas?

The Web Request is configured as below:

URL: https://<SITE>/sites/DEV/_vti_bin/UserGroup.asmx

Method: SOAP 1.1, Soap action: http://schemas.microsoft.com/sharepoint/soap/directory/AddGroup

Body: (Content selected)

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <AddGroup xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">

      <groupName>‎‏{Current ItemSmiley Frustratedhort Name}‌</groupName>

      <ownerIdentifier>‎‏{Current ItemSmiley Frustratedite Owners}‌</ownerIdentifier>

      <ownerType>user</ownerType>

      <defaultUserLoginName>‎‏{Current ItemSmiley Frustratedite Owners}‌</defaultUserLoginName>

      <description>‎‏{Current ItemSmiley Frustratedhort Description}‌</description>

    </AddGroup>

  </soap:Body>

</soap:Envelope>

Labels: (1)
Tags (2)
0 Kudos
Reply
8 Replies
dyermull
Nintex Newbie

Re: Nintex for Office 365 Web Request error

Jump to solution

I recreated this Action and am now getting an error: Request body cannot be empty

Reply
emha
Nintex Newbie

Re: Nintex for Office 365 Web Request error

Jump to solution

isn't it a call webservice action an option for you?

it might be easier to make it working.

anyway, from formal point of view content of your request seems to be correct.

so make sure you supply correct data into it. let them write to history log and double check they are correct.

if your variables might contain sensitive characters try to XmlEncode() request content before you supply it to web service.

Reply
dyermull
Nintex Newbie

Re: Nintex for Office 365 Web Request error

Jump to solution

I can try the Web Service call, but there is less documentation out there than for the Web Request and I'm not 100% sure if I know how to create the dictionaries necessary. I'll see what I can find.

Since the users who are going to be using the list aren't admins, I am thinking that I will also need to use the Web Service call within an App Step?

Reply
emha
Nintex Newbie

Re: Nintex for Office 365 Web Request error

Jump to solution

advantage of web service call action is that it reads service definition and provides you with a field for all the inputs the service needs.

it as well builds request XML, so you need not to spent so much time studying web service. you just need to understand what input data are expected.

I even think that there is not needed any extra documentation for the action itself, I think description in the documentation should be sufficient. as I said, it's moreless about understanding what input data are needed.

I do not know what you mean with "create dictionaries", can you explain that?

yes, you will need to execute AddGroup web service call with sufficient credentials to do that.

Reply
dyermull
Nintex Newbie

Re: Nintex for Office 365 Web Request error

Jump to solution

First, thank you for the help. In Office 365, the Call Web Service Action does not look like the On-Prem version. That is what I tried first, because I am familiar with the On-Prem version. It works well and like you describe On-Prem. In Office 365 you need to create dictionary variables for Headers and Content. At least you have to in my tenancy. Does yours look different? Please see the screen shots.

Call_HTTP_WS.png

Configure_HTTP_Web_Service.png

Reply
emha
Nintex Newbie

Re: Nintex for Office 365 Web Request error

Jump to solution

ok, I see now.

I do not have experience with 0365 so I haven't realized the difference to on-prem.

however, I think these links might help you with web service and dictionaries (if you haven't seen them already)

Dictionary Part 3 - Call Web Service result into a Dictionary

http://www.vadimtabakman.com/nintex-workflow-dictionary.aspx

an this regarding web request

Web Request action for O365

0 Kudos
Reply
dyermull
Nintex Newbie

Re: Nintex for Office 365 Web Request error

Jump to solution

I did finally get this sorted out. I had an awful time with both the Web Request and Call HTTP Web Service, but the issue was not with those Nintex Workflow actions, it was with configuration of SharePoint Online itself. I needed to enable the feature "Workflows can use app permissions", then set app permissions for the Workflow App Identifier, then run the Web Service call in an App Step.

This link explains what was done​ to fix the issue.

After I did that and set up all the dictionaries, I got the Call HTTP Web Service action to work.

0 Kudos
Reply
Not applicable

Re: Nintex for Office 365 Web Request error

Jump to solution

I see you figured this out.  For anybody else getting this answer and this did not resolve it for you, I had this issue and the reason for the error was because I did not first create a dictionary, I was just using text in the request body.  If you get this error and you have not first created a dictionary variable with your keys/values, you may want to try that.

0 Kudos
Reply