SELECT UsersTable.UserName, UsersTable.EmailAddress AS 'User Email Address', UserRolesTable.UserId, UsersTable.IsActive AS 'User is Active',
UsersTable.IsDeleted AS 'User is Deleted', RobotsTable.Name AS 'Robot Name', RobotsTable.UserName AS 'Robot UserName',
Roles.DisplayName AS 'Role Name', Roles.Id AS 'Role ID',
PermissionsTable.Name AS 'Permission', PermissionsTable.IsGranted AS 'Permission is Granted',
Roles.[IsStatic] AS 'Role is Static',Roles.[IsDefault] AS 'Role is Default',Roles.[IsDeleted] AS 'Role is Deleted'
FROM [uipath].[dbo].[UserRoles] AS UserRolesTable
INNER JOIN [uipath].[dbo].[Roles] AS Roles ON UserRolesTable.RoleId=Roles.Id
INNER JOIN [uipath].[dbo].[Permissions] As PermissionsTable ON UserRolesTable.RoleId=PermissionsTable.RoleId
INNER JOIN [uipath].[dbo].[Users] AS UsersTable ON UsersTable.Id=UserRolesTable.UserId
INNER JOIN [uipath].[dbo].[Robots] AS RobotsTable ON UsersTable.Id=RobotsTable.UserId
AND (PermissionsTable.Name LIKE '%Packages%' OR PermissionsTable.Name LIKE '%Librar%') AND UsersTable.UserName='marian.platonov' AND (RobotsTable.IsDeleted='0' AND RobotsTable.Enabled='1')
ORDER BY UserRolesTable.UserId, PermissionsTable.Name
Thank you very much, it is a solution indeed but is there a easier way for general user such that they can simply check it from Orchestrator, like when they create a new role, the permission table is displayed and they can tick on the boxes ?
You can check this GET Rest API: https://cloud.uipath.com/ORGANIZATION_NAME/TENANT_NAME/orchestrator_/odata/Users/UiPath.Server.Configuration.OData.GetCurrentPermissions
Returns a user permission collection containing data about the current user and all the permissions it has.