IBM Support

Dashboarding: Custom Data - Getting the user ID

Technical Blog Post


Abstract

Dashboarding: Custom Data - Getting the user ID

Body

You may already know that it's possible to visualize custom data in the Dashboard Application Service Hub (DASH).  Using tools such as Impact or Tivoli Directory Integrator (TDI) allow you to access many different kinds of data sources to visualize in DASH.  However, it may not be immediately obvious how to scope what the user sees.  The problem is determining the user's ID.  The following snippets should allow you to get the user's ID which you can then use to scope the data the provider returns for a particular user.

Depending on whether TDI or Impact is being used, the solution is different.  The following snippets will get the user ID and log it.

For TDI users:

var http_auth = task.opEntry.getObject("http_auth");
if (http_auth != null) {
   task.logmsg("LoginId "+http_auth.getString("remoteUser"));
}

For Impact users:

LoginId = RExtract(eventDestination,"//(.*?)_"+remoteSessionId);
Log("LoginId " + LoginId);



Hope this helps!
 

[{"Business Unit":{"code":"BU050","label":"BU NOT IDENTIFIED"},"Product":{"code":"SSHPN2","label":"Tivoli"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

UID

ibm11275580