Much appreciate your help.
The decision (findfirst) thing worked for my initial API: /api/v2/authorization/subjects/${input.subjectId}
Community is a rich knowledge builder with people like you.
Keep rocking!
------------------------------
Khurshid Ali,
Consultant / Developer / Tech Lead,
NCR Voyix,
khurshid.ali@ncrvoyix.com,
New Delhi,
India
------------------------------
Original Message:
Sent: 05-08-2024 17:37
From: Anton Vroon
Subject: How to validate (logical decision) if the user has a 'supervisor role' using API?
Sure, through this together pretty quickly, so could probably be done better.
Contracts:

Configuration

Output example:

In the flow, remember to set default value for the boolean to false, check for empty list etc

That Boolean Assignment

------------------------------
Anton Vroon
------------------------------
Original Message:
Sent: 05-08-2024 02:35
From: Khurshid Ali
Subject: How to validate (logical decision) if the user has a 'supervisor role' using API?
Hello @Anton Vroon, Thanks for your input.
Sorry to ask this. can you please share a screenshot of the data action how to put this in the response and call flow.
------------------------------
Khurshid Ali,
Consultant / Developer / Tech Lead,
NCR Voyix,
khurshid.ali@ncrvoyix.com,
New Delhi,
India
Original Message:
Sent: 05-05-2024 18:03
From: Anton Vroon
Subject: How to validate (logical decision) if the user has a 'supervisor role' using API?
One option is to use:
Expand authorization
Then, where 123-456-789 is the user id, it would look like:
In your data action response template, you want an array, with a path like:
$.entities[0].authorization.roles[*].name
And then in your flow, do findfirst(Task.ReturnedArray, "Your Supervisor Role Name") >= 0
if -1 then not found, if 0 or more than they have the role
------------------------------
Anton Vroon