Workflow Role assignment issue

Hi Team ,

I have created a joiner workflow where I am checking if the user already has a Role than don’t provision that role again .

But When I am using the comparison operator to check if the User’s Role contains Role id or not .

but even IF the user has that role id still it is returning False

Please have a look at my workflow

I used get access action to fetch Roles

and used Compare string operator to check if User already contains Role id or not

But even If the user has the Role id … it is still returning false (role not found in user profile)

NOTE : I have also used the
$.trigger.owns.roles Contains “xxxxx” to have check if list of role identities has this user id or not .

Could you guys please check my configuration and help me out to check why it is returning false everytime , even when the User already has role

Below are my test results :

Get access output

Compare string input

compare string output

Best Regards
Dalia

Hi @dboukercha ,

We can simply incorporate a “Get Access” action to retrieve roles and then follow up with a “Verify Data Type” action. Within the action value, we can include: $.getAccess.accessItems[?(@.name == ‘your Role’)].name. This approach allows us to ascertain whether the statement holds true or false.

I am not sure if I understand the purpose of this workflow. If you would like to assign a Role to a joiner, you can use Birth right Role. When a role is assigned to an identity, and if the identity already has the role, then IDN will not take any action.

exactly, I am just returning message for example “Role already assigned”

Hi Gokul , I have tried the same with verify data … but again it is behaving the same

Hi @dboukercha,

The following works for me :slight_smile:

image

1 Like

@timahm Thanks alot , it worked for me :slight_smile:

1 Like

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