How to get user roles


I have try to get logged in Users role with the help of this page detail :

But when execute this below lines with my userid-

var requestUrl = "{userid}.xml (or .json)

var xml = webClient.DownloadString(requestUrl);

it throws error- "Unable to connect to the remote server"

can anyone please help me to sort it out.


Parimal Patel

  • In reply to Luke D:

    I've written you an working widget example. See below.

    You really should read the documentation:

    #set($apiListResponse = $core_v2_role.List("%{Username = 'admin'}"))

    <h2>Roles for Admin</h2>

    #foreach($role in $apiListResponse)