Workflow - HTTP GET Request Action

Hi All,

We have same entitlements in different AD sources, means we have duplicate entitlements in IDN.

I have setup a workflow, when the user access is provisioned, it emails description of the entitlement to the intended user. I have used HTTP GET Request action in the workflow that gets description of dynamic entitlement (once access is provisioned) and then emails it to the user.

Issue:
The HTTP GET request action returns results from all AD sources because the entitlement value is exactly the same in all AD sources. I can’t use Id or name of the entitlement as the JSON payload (provisinoig completed trigger) only has the entitlement value.

Question:
How can we restrict the HTTP GET request action to get the result only from a specific AD source? I have tried all below possible combinations but the HTTP request keeps failing.

Action: HTTP Request
Method: GET
Request Content Type: JSON
Request Body:
Request URL: https://tenant.api.identitynow.com/beta/entitlements

Query parameters that I have tried:

  • value eq “{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}” AND sourceId eq “xxxxxxxxxxxxxxxx” - doesn’t work
  • value eq “{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}” AND source.name:“XYZ” - doesn’t work
  • value eq “{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}” AND source.id:“xxxxxxxxxxxxxxxx” - doesn’t work

Also, I have tried the ‘Request URL’ as https://tenant.api.identitynow.com/beta/entitlements/{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}} and query parameter as filters source.id eq “xxxxxxxxx” or sourceId:“xxxxxxxxxx” but still no luck.

Any help would be appreciated.

Thanks

@nhassan
Try the below endpoint to get the entitlement details from the specific source

https://tenant.api.identitynow.com//beta/entitlements?filters=name eq “nameOfThEntitlement” and source.id eq “idOfTheSourceFromUI”

Thanks,
Sushant

That’s awkward, i have the same scenario where I have a Source for ADM and other for nominal accounts and the entitlements has different ID’s.

Hi @nhassan,

You have a problem with your query params :

Query parameters that I have tried:

value eq “{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}” AND sourceId eq "xxxxxxx"

Could you try this ?

value%20eq%20%22{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}%22%20AND%20sourceId%20eq%20%22xxxxxxx%22

The complete url :

https://tenant.api.identitynow.com/beta/entitlements?filters=value%20eq%20%22{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}%22%20AND%20sourceId%20eq%20%22xxxxxxx%22

%20 represent space

%22 represent "

@Sushantmr Thanks for the update.

I’ve tried this but it doesn’t work as it throws ‘request failed’ error message.

FYI - I’ve tried this using the value attribute of the entitlement because JSON payload has only the value of the entitlement and not the name of entitlement.

https://tenant.api.identitynow.com//beta/entitlements?filters=value eq "{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}" and source.id eq “idOfTheSourceFromUI”

@baoussounda Thanks for the update.

I’ve tried this but it doesn’t work. It throws ‘request failed’ error message as shown in the attached screenshot.
https://tenant.api.identitynow.com/beta/entitlements?filters=value%20eq%20%22{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}%22%20AND%20sourceId%20eq%20%22idOfTheSourceFromUI%22

Hi @nhassan
In this blog Using IdentityNow Workflows to Send a List of Uncorrelated Accounts After Aggregation i use the similar filters for /v3/accounts and see if it’s work.

I suggested to put all value manually to see what happen.

@baoussounda and @Sushantmr

Thanks very much for your help.

The following request url and query parameters did the trick for me. Now the HTTP GET request returns result only from a specific source as expected. Awesome :+1:

Request URL: https://tenant.api.identitynow.com/beta/entitlements

Query Parameters:
filters value eq “{{$.trigger.accountRequests[0].attributeRequests[0].attributeValue}}” and source.id eq “xxxxxxxxxxxxxxxxxx”

1 Like

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