Remove Role via Workflow - Scheduled Search trigger

Hi everyone,

I have this requirement where in the role should be removed once the application (where it is tied to) is disabled in the application side.
I created this scheduled search workflow to cater the requirement however, when I do the testing I’m not getting any result.
It should already have triggered the removal of the role of one of my test accounts but it didn’t. I’m not sure which step is the problem in my workflow.
Here is how I have configured it.





**I’m not sure what to put on the “Context”


Hope someone, could help me out on this.

Hi Christine,

In your loop you make multiple references to “$.trigger.identity.id”. However, the trigger you are using is “Scheduled Search”. The input body of Scheduled Search does not contain the JSON attributes “identity.id”: Scheduled Search.

I am assuming you want to iterate through the identities that came up in the search which you have pulled from the “HTTP Request” action. Since you have defined it as your loop input you can use “$.loop.loopInput” to reference its contents. That being said, your screenshot cuts off the exact endpoint you are calling, if you could provide it, I may be able to advise on how best to loop through and reference those identities.

As to your question about context - It is nothing more than additional data input to the loop. The loop will iterate over the Loop Input and the context will remain static at each step as a reference. The context may be redundant in your case but also does not hurt to add.

Best,
Chris

1 Like

Hi @CeeJ1

You cannot use the “$.trigger.identity.id” in all other operation, since the trigger doesn’t give the id. The trigger will gave the identity displayName and few but not the identity ID.

So either you need to use the id that you are getting from the HTTP Request which is an search query that return the identities who have particular roles.

If you can share the json file of the workflow it will be much more easier to review it and let give you more info.

Hope this helps.
Shantha Kumar

Hi,
Here is the workflow:
RemoveRoleviaSSv220241101.json (3.1 KB)

Hi @CeeJ1,

Here is a modified WF you may want to try.

RemoveRoleviaSSv220241101 (3).json (3.3 KB)

1 Like

Hi Everyone,

Thank you for helping me out on this issue.