Getting existing entitlements

Hi All,
When reqesting access from request center old enttilements are getting replaced with the new ones. so im trying to add existing entitlement to newly added entitlements using before operation rule.I finding it difficult to get the existing entitlements for an account using before operation rule in webservice. Can anyone me with the solution to find the existing

Hi @kani1

To get the existing entitlements for an account , try the following in your rule .
Get Native Identity .
Get Identity Id of this using this native identity with the help of Get All Account API EndPoint:

{{baseUrl}}/accounts?filters=nativeIdentity eq $plan.nativeIdentity

Now we have identity Id of the identity for which you need entitlements on a source .
Now to fetch entitlements on a source , let’s get account details of this identity on the source where entitlements belong to . Use the below end point to get Account Id of the identity on a source

{{baseUrl}}/accounts?filters=identityId eq "{identity_id}"&filters=sourceName eq "{Sourcename your entitlements belong to}"

From the above end point , you will be able to get account Id of the identity on the desired source . Now let’s get entitlements for this accounts using the following endpoint:

{{baseUrl}}/accounts/{AccountID}/entitlements

From the above endpoint , you will be able to see all the entitlements that the account holds on the source .

I hope this helps !

Thank you

3 Likes