The following example shows how to retrieve the roles granted to a user using the GetGrantedRoles() method:
USING OpenEdge.DataAdmin.*.
USING OpenEdge.DataAdmin.Lang.Collections.*.

VAR DataAdminService oDAS.
VAR IGrantedRoleSet oGrants.
VAR IGrantedRole oGrant.
VAR IIterator iter.
VAR logical lResult.

oDAS = NEW DataAdminService(LDBNAME("DICTDB")).
oGrants = oDAS:GetGrantedRoles("where RoleName eq 'TestRole'").

iter = oGrants:Iterator().
DO WHILE iter:HasNext():
       ASSIGN oGrant = cast(iter:Next(), IGrantedRole).
       // oGrant:Role:Name, oGrant:Grantee, oGrant:Grantor will provide details about the role.
       MESSAGE "Role " oGrant:Role:Name " granted to " oGrant:Grantee " by " oGrant:Grantor VIEW-AS ALERT-BOX.
END.