Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Bad Envelope tag error - SOAP createAccountjson

NullPointer
New Contributor II
New Contributor II

Hello, 

We are receiving a "bad envelope tag" error when trying to create an account using a soap connector.  The json example was taken from the documentation as well as the below forum posts linked below. Can anyone point me in the right direction as to what this json is expecting format wise? 

Using Saviynt as a Ticketing System for SAP GRC - Saviynt Forums - 42928

Scenarios for Implementing the Connector (saviyntcloud.com)

#########################################################

 

[
{
"CONNECTION": "login",
"REQUESTXML": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:soap:functions:mc-style\"><soapenv:Header/><soapenv:Body><urn:GracIdmUsrAccsReqServices><RequestHeaderData><Reqtype>029</Reqtype><Priority>006</Priority><ReqInitSystem>TEST</ReqInitSystem><Requestorid>${manager.systemUserName}</Requestorid><Email>${manager.email}</Email><ReqDueDate>${new Date().plus(10).format('yyyyMMdd')}</ReqDueDate><RequestReason>Saviynt Birthright Provisioning</RequestReason></RequestHeaderData><UserInfo><item><Userid>${task.accountName}</Userid><SncName>p:CN=${task.accountName}, C=US</SncName><Fname>${user.firstname}</Fname><Lname>${user.lastname}</Lname><Email>${user.customproperty1}</Email><Manager>${manager.systemUserName}</Manager><Department>${user.departmentname}</Department><Location>${user.location}</Location></item></UserInfo></urn:GracIdmUsrAccsReqServices></soapenv:Body></soapenv:Envelope>",
"RESPONSEMAPPING": {
"task.provisioningcomments": "Body.GracIdmUsrAccsReqServicesResponse.MsgReturn.MsgStatement",
"TASK.TICKETID": "Body.GracIdmUsrAccsReqServicesResponse.RequestNo",
"SUCCESSMSG": "Body.GracIdmUsrAccsReqServicesResponse.MsgReturn.MsgType"
},
"SUCCESSCRITERIA": "SUCCESSMSG=SUCCESS",
"REQUESTPARAMS": {
"Content-Type": "text/xml;charset=UTF-8",
"SOAPAction ": "urn:sap-com:document:sap:soap:functions:mc-style:GRAC_USER_ACCES_WS:GracIdmUsrAccsReqServicesRequest"
}
}
]

##############################################

 

Thanks

1 REPLY 1

rushikeshvartak
All-Star
All-Star

Possible Causes:

  1. Incorrect Namespace Declaration:
    SOAP services are strict about namespaces. If the namespace used in the request does not exactly match what the service expects, it will reject the request with a “bad envelope tag” error.

  2. Improper SOAP Action Header:
    In the REQUESTPARAMS section, the SOAPAction value might not be correctly specified. Ensure it matches the exact operation exposed by the SAP web service.

    • Example: "SOAPAction": "urn:sap-com:document:sap:soap:functions:mc-style:GRAC_USER_ACCES_WS:GracIdmUsrAccsReqServicesRequest"
  3. XML Encoding Issues:
    Dynamic content like ${user.firstname} and ${manager.email} might contain special characters (like & or <) that need to be escaped properly.

  4. Malformed or Missing Envelope/Body Tags:
    Ensure the <Envelope>, <Header>, and <Body> sections are correctly opened and closed without syntax errors.


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.