Fetch Entitlement name From Provisioning Completed Trigger

Hi Experts,

I am having some issues with Provisioning Completed trigger. I want to get the entitlement name from the trigger. But the JSON obtained from the trigger has only entitlement value. Hence, I am using Get Access action and filtering using search query as below. (With only entitlement checkbox checked)

{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}

The output from this Get Access action is supposed to return just one list ( with entitlement that was provisioned). But I am getting a list of entitlements with one list being what was provisioned. Is there a bug in this action or I am doing something wrong?

Would appreciate some responses.
Thanks.

Get Access action of workflow will return all entitlements assigned to the user. You can add loop operator to narrow down to particular entitlement of a source

That’s why I am using filter as you can see my filter condition. The filter is supposed to return only one entitlement that was provisioned.

Can you try this sample filter on trigger

$.accountRequests[?(@.provisioningTarget== ‘Corp AD’ && @.provisioningResult== ‘committed’)].attributeRequests[?(@.attributeName== ‘memberOf’ && @.attributeValue==‘CN=sales,DC=helpco,DC=com’)]

I don’t have any problem with trigger. I want to fetch the name of entitlement from the trigger json response. And I am using get access action and using the access selection method as search query. I am filtering by entitlement value that is obtained from initial provisioning completed json response and it should give me just one result. But, I am getting random list of entitlements. That was my only concern. I don’t have to modify trigger.

{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}

I think search query input for Get Access action is a list instead of string, so you are getting random entitlement as result of this action

yeah, It is a list which should be one list, that contains id, name and type. But, I am getting array of list. I am supposing to get just one list of entitlement that was provisioned.

By any chance you can share your JSON for workflow and trigger that you are using? Also what is the use case you are trying to achieve?

Instead of GetAccess with Search, you may use httpPost sending an API request to

with query parameter filters=value eq "{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}"