# Web service connector Add Entitelement operation

**URL:** <https://developer.sailpoint.com/discuss/t/web-service-connector-add-entitelement-operation/1709>\
**Category:** SHF Discussion and Questions\
**Created:** [October 4, 2021, 11:40am UTC](https://developer.sailpoint.com/discuss/t/web-service-connector-add-entitelement-operation/1709 "2021-10-04T11:40:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkgupta1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/pkgupta1/32/4152_2.png) [@pkgupta1](https://developer.sailpoint.com/discuss/u/pkgupta1)\
**Post date:** [October 4, 2021, 11:40am UTC](https://developer.sailpoint.com/discuss/t/web-service-connector-add-entitelement-operation/1709/1 "2021-10-04T11:40:02Z")

</div>

Hi All,

We are working on a web service connector implementation with identitynow. Where the web service has put operation. What it does is whatever response you pass in it simply replaces the complete user object. So when we add a new entitlement we have to send the existing entitlement information as well otherwise it will replace the all entitlements with just new entitlement.  
Can somebody help with how to design the response in a way that we can send this additional information.  
The problem is with both add and remove operations.

Thanks  
Pradeep

---

<div class="post-metadata">

**Author:** ![cpatel](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@cpatel](https://developer.sailpoint.com/discuss/u/cpatel)\
**Post date:** [October 4, 2021, 11:43am UTC](https://developer.sailpoint.com/discuss/t/web-service-connector-add-entitelement-operation/1709/2 "2021-10-04T11:43:20Z")

</div>

> [@pkgupta1](#):
>
> The problem is with both add and remove operations

The solution here would be to have before operation rule which will get latest entitlement from end system and then using what you have incoming in plan and what is currently assigned to user you can decide your final body.

e.g You get Provisioning plan to remove entitlement A,B and user currently has A,B,C then you send only C.

In before operation rule, make call to end system and get latest entitlement for user and compare with incoming plan.

---

<div class="post-metadata">

**Author:** ![pkgupta1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/pkgupta1/32/4152_2.png) [@pkgupta1](https://developer.sailpoint.com/discuss/u/pkgupta1)\
**Post date:** [October 5, 2021, 9:39am UTC](https://developer.sailpoint.com/discuss/t/web-service-connector-add-entitelement-operation/1709/3 "2021-10-05T09:39:18Z")

</div>

Hi Chirag,

Thanks, Can you also help me how can we write this rule. Also is there a way to use apis or webservices to deploy the same. if you have any sample please do share with us.

Thanks  
Pradeep

---

<div class="post-metadata">

**Author:** ![cpatel](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@cpatel](https://developer.sailpoint.com/discuss/u/cpatel)\
**Post date:** [October 8, 2021, 1:37pm UTC](https://developer.sailpoint.com/discuss/t/web-service-connector-add-entitelement-operation/1709/4 "2021-10-08T13:37:27Z")

</div>

[https://developer.sailpoint.com/idn/api/beta/create-connector-rule](https://developer.sailpoint.com/idn/api/beta/create-connector-rule)

More details: [https://community.sailpoint.com/t5/IdentityNow-Articles/IdentityNow-Rule-Guide/ta-p/76665](https://community.sailpoint.com/t5/IdentityNow-Articles/IdentityNow-Rule-Guide/ta-p/76665)

To apply rule to source  
use source json patch : [https://developer.sailpoint.com/idn/api/v3/update-source](https://developer.sailpoint.com/idn/api/v3/update-source)

[ {

```
            "op": "replace",

            "path": "/connectorAttributes/connectionParameters/2/beforeRule",

            "value": "Azure Pagination"

```

}

]

The index starts with 0 in UI. If you have 3 end points in UI, first one is zeroth.

---

<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:** [July 19, 2023, 2:22pm UTC](https://developer.sailpoint.com/discuss/t/web-service-connector-add-entitelement-operation/1709/5 "2023-07-19T14:22:08Z")

</div>


