# Required request body is missing

**URL:** <https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771>\
**Category:** SHF Discussion and Questions\
**Tags:** webservice-connector, access-requests, sailpoint-identity-security, provisioning\
**Created:** [October 3, 2024, 9:06pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771 "2024-10-03T21:06:39Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasmedina](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jasmedina](https://developer.sailpoint.com/discuss/u/jasmedina)\
**Post date:** [October 3, 2024, 9:06pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/1 "2024-10-03T21:06:39Z")

</div>

Hi All,

I was trying to create an account via access request. However, I am encountering this error even though the HTTP body is populated. I was also able to successfully call the API in postman.

Create Account body:

```auto
{
    "user": {
        "name": "$plan.name$",
        "siteRole": "$plan.siteRole$"
    }
}

```

I tried to hardcode the values for name and siteRole and it is working fine when I tried to request an access. I am not sure why the error log is saying “Required request body is missing” when I try to use the attributes from my Create Account provisioning plan.

---

<div class="post-metadata">

**Author:** ![bcariaga](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/bcariaga/32/1890_2.png) [@bcariaga](https://developer.sailpoint.com/discuss/u/bcariaga)\
**Post date:** [October 3, 2024, 9:23pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/2 "2024-10-03T21:23:57Z")

</div>

Hello @jasmedina,

Can you please share the details of your operation configuration on the request and your create account plan?

Thanks,  
Braden

---

<div class="post-metadata">

**Author:** ![jasmedina](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jasmedina](https://developer.sailpoint.com/discuss/u/jasmedina)\
**Post date:** [October 3, 2024, 9:43pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/3 "2024-10-03T21:43:33Z")

</div>

Hi @bcariaga! Here is the **Create Account plan:**

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/6/6/66f7b95c63f141bfd8c397a1869c32573b2a3e25.png)

**Create Account body:**

```auto
{
    "user": {
        "name": "$plan.name$",
        "siteRole": "$plan.siteRole$"
    }
}

```

**Headers**

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/0/4/04fb644d92d340ab6a0e9517eeca858d6a7c442e.png)

**Response Mapping:**

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/3/8/381c15aff6834a8ab15fba87ef0ad5ed614cd4e5.png)

**Curl from Postman:**

```auto
curl --location 'https://xxxx \
--header 'Content-Type: application/json' \
--header 'X-Tableau-Auth: xxxxxx' \
--data '{
    "user": {
        "name": "testuser",
        "siteRole": "Viewer"
    }
}'

```

---

<div class="post-metadata">

**Author:** ![jrossicare](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jrossicare](https://developer.sailpoint.com/discuss/u/jrossicare)\
**Post date:** [October 3, 2024, 11:43pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/4 "2024-10-03T23:43:25Z")

</div>

it looks ok

if not working, then see what you can find in CCG log.

You may need to create and attach a Web Service Before Operation rule to the create HTTP Operation, so you can see exactly the headers and body of the request you are sending.

---

<div class="post-metadata">

**Author:** ![gogubapu](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gogubapu/32/15242_2.png) [@gogubapu](https://developer.sailpoint.com/discuss/u/gogubapu)\
**Post date:** [October 4, 2024, 5:24am UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/5 "2024-10-04T05:24:06Z")

</div>

Hi @jasmedina ,

If your using tableau application refer below link:  
[Users and Groups Methods - Tableau](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_users_and_groups.htm#add_user_to_site)

Change API body to xml format like below:

```auto
<tsRequest>
  <user name="$plan.name$"
        siteRole="$plan.siteRole$"
</tsRequest>

```

Thank You.

---

<div class="post-metadata">

**Author:** ![rkhade](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/rkhade/32/6043_2.png) [@rkhade](https://developer.sailpoint.com/discuss/u/rkhade)\
**Post date:** [October 4, 2024, 6:47am UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/6 "2024-10-04T06:47:58Z")

</div>

Hi @jasmedina , can you check if you are getting attribute values as expected in plan, you can check this in ccg.log in VA.

you can patch the before operation rule to operation and check.

Please modify below snippet as per the requirement and use

```java
import java.util.List; 
import java.util.HashMap; 
import java.util.Map; 
import sailpoint.tools.Util; 
import sailpoint.object.ProvisioningPlan;
import sailpoint.object.ProvisioningPlan.AccountRequest;
import sailpoint.object.ProvisioningPlan.AttributeRequest;
import sailpoint.object.ProvisioningPlan.GenericRequest;
import connector.common.JsonUtil; 

Map body = requestEndPoint.getBody();
String jsonBody = (String) body.get("jsonBody");
Map jsonMap = JsonUtil.toMap(jsonBody);
log.info("-----JsonBody"+ jsonMap);
 if (provisioningPlan != null) {
        List accounts = provisioningPlan.getAccountRequests();
    for (AccountRequest accReq : Util.iterate(provisioningPlan.getAccountRequests())) {

        for (ProvisioningPlan.AttributeRequest attReq : Util.iterate(accReq.getAttributeRequests())) {
            if (attReq != null) {
              log.info("------Attribute Name From Plan : "+attReq.getName(), );
			  log.info("-------Attribute Value From Plan : "+ attReq.getValue());
              
            } 
        }
    }
 }

```

Hope this helps to troubleshoot

Thank you

---

<div class="post-metadata">

**Author:** ![jasmedina](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jasmedina](https://developer.sailpoint.com/discuss/u/jasmedina)\
**Post date:** [October 4, 2024, 6:02pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/7 "2024-10-04T18:02:46Z")

</div>

Hi Jason,

Based from the CCG logs, the body is missing. Even though I can see that the body in the Create Account operation is configured.

---

<div class="post-metadata">

**Author:** ![jasmedina](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jasmedina](https://developer.sailpoint.com/discuss/u/jasmedina)\
**Post date:** [October 4, 2024, 6:03pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/8 "2024-10-04T18:03:05Z")

</div>

Thank you, Rakesh! I will try this out 🙂

---

<div class="post-metadata">

**Author:** ![jasmedina](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jasmedina](https://developer.sailpoint.com/discuss/u/jasmedina)\
**Post date:** [October 7, 2024, 1:57pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/9 "2024-10-07T13:57:12Z")

</div>

Hi @rkhade! I am getting the correct attribute values as per the logs. However, when I look at the error message, it seems that it is not seeing or passing those attributes.

**Logs for Attributes:**  
 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/4/8/48ebcafd756880a8cf7ab4f85c162253275dd488.png)

**Error message:**

> “message”:“Updating account null result with error message {"error":{"summary":"Bad Request","detail":"Payload is either malformed or incomplete","code":"400000"}”

It looks like it this attribute is not getting passed in the body. I am not sure why it is happening since this is working correctly in postman.  
 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/0/e/0ea9285d4c20f1f72459e94b8b7ebd3e50868fb2.png)

Create Account body:

> {  
> “user”: {  
> “name”: “$plan.name$”,  
> “siteRole”: “Viewer”  
> }  
> }

---

<div class="post-metadata">

**Author:** ![jasmedina](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jasmedina](https://developer.sailpoint.com/discuss/u/jasmedina)\
**Post date:** [October 7, 2024, 2:55pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/10 "2024-10-07T14:55:47Z")

</div>

Tried also setting the name attribute as the account ID and used $plan.nativeIdentity$ in the body. Here’s the log below:

![image](https://global.discourse-cdn.com/sailpoint/original/3X/7/2/72de46771fc4ed83eda3365b82554deefb1876f4.png)\

The name attribute is now being passed in the body however, I am getting a different error:

> {"error":{"summary":"Resource Not Found","detail":"User ‘jmedina’ could not be found.","code":"404002"}

---

<div class="post-metadata">

**Author:** ![rkhade](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/rkhade/32/6043_2.png) [@rkhade](https://developer.sailpoint.com/discuss/u/rkhade)\
**Post date:** [October 7, 2024, 3:06pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/11 "2024-10-07T15:06:21Z")

</div>

Hi @jasmedina ,

As the id is not passed while creating account, it needs to be fetched from create account response body and pass to the next operations.

Can you check the response mapping of create account operation once, you can use [JSON path finder](https://jsonpathfinder.com/) for this, if its correct.

Try configuring [get Object](https://documentation.sailpoint.com/connectors/webservices/help/integrating_webservices/json_get_object.html) operation, Which will fetch the single the account details once the account is created, Use fetch single account API for configuration.

Thank you

---

<div class="post-metadata">

**Author:** ![jasmedina](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jasmedina](https://developer.sailpoint.com/discuss/u/jasmedina)\
**Post date:** [October 7, 2024, 3:22pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/12 "2024-10-07T15:22:20Z")

</div>

Hi @rkhade! The response mapping is correct and id is also in the response mapping:  
 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/5/2/524a3a9684beaa66f0b63a6ee4902daacdef471c.png)

I am not sure if get Object will work since the account is not created to begin with.

---

<div class="post-metadata">

**Author:** ![rkhade](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/rkhade/32/6043_2.png) [@rkhade](https://developer.sailpoint.com/discuss/u/rkhade)\
**Post date:** [October 7, 2024, 4:24pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/13 "2024-10-07T16:24:26Z")

</div>

As the same body is working with hardcoded values, looks like the error is thrown by some other operation(Add Entitlement, update Account) after create operation, can you check those operations or remove those operation and test.

---

<div class="post-metadata">

**Author:** ![udayputta](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/udayputta/32/14195_2.png) [@udayputta](https://developer.sailpoint.com/discuss/u/udayputta)\
**Post date:** [October 7, 2024, 5:33pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/14 "2024-10-07T17:33:33Z")

</div>

> [@jasmedina](#):
>
> > “message”:“Updating account null result with error message {“error”:{“summary”:“Bad Request”,“detail”:“Payload is either malformed or incomplete”,“code”:“400000”}”

Based on the error code it looks like your Tableau is using AD for auth, and the format of the name is not valid. Can you validate once.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/b/3/b3ad5d16a4571eb060c6a43cda7c6114dd6d7329.png)

Also check this out

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/b/a/ba2a0b93b8126a903817d9a273aa05bb3dada063.png)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [December 6, 2024, 5:33pm UTC](https://developer.sailpoint.com/discuss/t/required-request-body-is-missing/83771/15 "2024-12-06T17:33:54Z")

</div>

Closed on December 6, 2024, 5:33pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
