# Combining multiple requests into one using addRemoveEntInSingleReq

**URL:** <https://developer.sailpoint.com/discuss/t/combining-multiple-requests-into-one-using-addremoveentinsinglereq/69043>\
**Category:** SHF Discussion and Questions\
**Tags:** webservice-connector, access-requests, identity-security-cloud, provisioning, entitlements\
**Created:** [June 26, 2024, 1:04pm UTC](https://developer.sailpoint.com/discuss/t/combining-multiple-requests-into-one-using-addremoveentinsinglereq/69043 "2024-06-26T13:04:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohan98](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mohan98](https://developer.sailpoint.com/discuss/u/mohan98)\
**Post date:** [June 26, 2024, 1:04pm UTC](https://developer.sailpoint.com/discuss/t/combining-multiple-requests-into-one-using-addremoveentinsinglereq/69043/1 "2024-06-26T13:04:02Z")

</div>

We want to combine separate add entitlement calls into a single call given requested entitlements are of the same type as below:

```auto
{
  "updateRole": {
  "roles": ["role:1","role:2","role:3"]
  }
}

```

To achieve the above we tried setting addRemoveEntInSingleReq to true as below:

```auto
[
    {
        "op": "add",
        "path": "/connectorAttributes/addRemoveEntInSingleReq",
        "value": true
    }
]

```

And modified the operation body as:

```auto
{
  "updateRole": {
  "roles": $plan.Roles$
  }
}

```

But even after doing the above, IDN is sending individual add entitlement requests instead of combining it into one single request. Is there something we are missing here?

---

<div class="post-metadata">

**Author:** ![agutschow](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/agutschow/32/8543_2.png) [@agutschow](https://developer.sailpoint.com/discuss/u/agutschow)\
**Post date:** [June 26, 2024, 1:29pm UTC](https://developer.sailpoint.com/discuss/t/combining-multiple-requests-into-one-using-addremoveentinsinglereq/69043/2 "2024-06-26T13:29:15Z")

</div>

What connector are you using?

Alicia

---

<div class="post-metadata">

**Author:** ![mohan98](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mohan98](https://developer.sailpoint.com/discuss/u/mohan98)\
**Post date:** [June 26, 2024, 2:29pm UTC](https://developer.sailpoint.com/discuss/t/combining-multiple-requests-into-one-using-addremoveentinsinglereq/69043/3 "2024-06-26T14:29:39Z")

</div>

it’s webservice connector.

---

<div class="post-metadata">

**Author:** ![uday\_kilambi](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/uday_kilambi/32/31482_2.png) [@uday\_kilambi](https://developer.sailpoint.com/discuss/u/uday_kilambi)\
**Post date:** [June 26, 2024, 7:07pm UTC](https://developer.sailpoint.com/discuss/t/combining-multiple-requests-into-one-using-addremoveentinsinglereq/69043/4 "2024-06-26T19:07:10Z")

</div>

Hi @mohan98 ,

I am not sure if enabling the addRemoveEntInSingleReq would help in handling your case. As far as I know, when there are requests for multiple type of entitlements(lets say group, role etc.), enabling this flag ensures one single Add Entitlement API can handle the request for all the types.

![image](https://global.discourse-cdn.com/sailpoint/original/2X/4/44618451e8f805186af62681b2bd581f625a7650.png)

I never tried with multiple entitlements of the same type with this flag.  
However, I followed the below approach for one of my previous projects which would work. My requirement was the Add entitlement operation is of type PUT where only the roles passed in the API request will be attached to the user. We cannot pass the group one by one as for each call the previous requested group is removed.

I utilized the provisioningPlan from webservice before operation rule to fetch all the requested groups at one go and updated my requestBody for all the groups and returned the updated requestEndPoint.

This ensures all the groups are passed in the same request and processed without issues. Only downside to this approach is the endpoint might be called multiple times, say 3 times if 3 groups are requested at once. I didn’t had any issues with that as at the end it is the same requestBody which is updated with all the groups is executed. Hence, no impact to the access.

Hope this helps.

Regards,  
Uday Kilambi

---

<div class="post-metadata">

**Author:** ![mohan98](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mohan98](https://developer.sailpoint.com/discuss/u/mohan98)\
**Post date:** [June 27, 2024, 11:44am UTC](https://developer.sailpoint.com/discuss/t/combining-multiple-requests-into-one-using-addremoveentinsinglereq/69043/5 "2024-06-27T11:44:21Z")

</div>

When I requested 2 roles together at once and printed provisioning plan using before operation rule on add entitlement operation, it printed two provisioning plans each with 1 role attribute request not one provisioning plan with both of the roles. My doubt is how can I fetch all the requested roles at one go when they are not in the same provisioning plan?

---

<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:** [August 26, 2024, 11:44am UTC](https://developer.sailpoint.com/discuss/t/combining-multiple-requests-into-one-using-addremoveentinsinglereq/69043/6 "2024-08-26T11:44:40Z")

</div>

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