Monday, 14 March 2016

List the Groups a User Belong To

Setting up security as a Cognos Admin requires to know which group a certain user belongs to. I created a simple report that will show a user’s group and identity:




The code for each column is shown here:


#sq(CAMIDList())#
#sq(CSVIdentityNameList())#

The limitation of this report however is that it ill display the identity and the group of the user who ran this report. So a system administrator has to ask a user to run this report and send a screenshot in order to find out that user’s groups and identities.
If you have access to your Cognos Content Store database however, you can use this SQL statement (or version of it) to list the groups of user(s):
You may need to change <user name> to the name of the user you want to query. If you need to query multiple users, then the query conditions should be changed a little bit. Also you might need to change the value in “b.maplocaleid = 96″  to suit you better.


No comments:

Post a Comment