Provisioning Completed Filter

H I need help with my provisioning completed filter. The workflow is working as expected my only question is I only want the workflow to be trigger when Adding a Role. I am using the json path :
$.accountRequests[*].attributeRequests[?(@.operation == ‘Add’)]

Except trigger the workflow twice because there is Add entitlement action, and add role action. I only want it to trigger for add role.

MicrosoftTeams-image (10)

Hi not entirely sure about this but I think the “attributeName” will say if it is an role being added or something else. So perhaps something like this:

$.accountRequests[*].attributeRequests[?(@.operation == 'Add' && @.attributeName != 'detectedRoles')]

If operation is add and the attribute is not “detectedRoles” it should be entitlement, though I guess it could also trigger if the provisioning is changing an attribute such as firstname on the user account etc. Also my suggestion is probably for access profiles and it might be “assignedRoles” instead of “detectedRoles” if it is an role.
Since I do not know what your request looks like it might be faulty but I just took a look of an old example I found and it might be something like this. But if you download the execution in your second picture and format the trigger row hopefully you should hopefully be able to reverse engineer it otherwise (if the request actually do contain the necessary information).


1 Like

Mine actually worked this morning! I think there was a bug!

1 Like

Ah cool, great to hear :slight_smile:

Thank you for the help though!

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