702
Views
2
Comments
Solved
How to retrieve list of role of current logged in user
Question

I know that to get the id of current log in user, I can use the function GetUserId(). And Outsystems have 3 enity including User, Role, UserRole. How can I get the list of all role that logged in user have.

2018-12-17 04-50-28
Manish Pandey
Solution

Hi Duy,


In UserRole, you have UserId and RoleId ,so based on logged In UserId you can find all the RoleId's and then based on RoleId's From Role entity you can directly fetch all the role list.


Thanks,

Manish Pandey

2026-01-26 10-25-31
Lennart Kraak
Champion

Hi,

The easiest way to do this is to use the System entity 'User_Effective_Role'. This is basically a view containing the user's roles, both direct or via user groups.

Regards,
Lennart


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.