As part of my administrative duties for my various clients, I periodically trawl through the logs. Many times I’ll want to see exactly what the users are doing in the reports on my server. It becomes a headache when these reports are in the users’ “My Folders”. I need to go into the administration page, find the user, go into their “My Folders”, copy out the report, paste it into mine then run it. It’s a mess and I’m far too lazy for that.
Fortunately Cognos allows us to access objects through URL parameters. On my laptop, I’m using OpenDJ as my authentication provider, so the CAMID is slightly different than Active Directory. My CAMID here is CAMID(“OpenDJ:u:cn=administrator”). In AD, it might be CAMID(“AD:u:r7a1n7d8o8m3l1e4t9t2e2r4s01234567)
I can just copy that CAMID and paste it into the URL as:
http://server/cognos/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=CAMID(“OpenDJ:u:cn=administrator”)
Obviously this is still predicated on the security in place. A user who doesn’t have permission to access another user’s folder will get an “Access Denied”
UPDATE!
In the comments below, Ryan shared that a users’ folders can be accessed directly with the username:
http://server/cognos/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=//account[@userName=’john.doe’]/folder[@name=’My Folders’]
Hi,
There used to be a method where you didn’t have to know the CAMID, and you could specify their userid within the URL – which is often much easier to come by.
I used to use it regularly, but I think it stopped working in V10.
Mick
You can still use a valid userid in Cognos v10 and even specify the My Folders location. Try this:
http://[your server]/cognos10/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=//account[@userName=’john.doe’]/folder[@name=’My Folders’]
Which version are you using? What authentication provider are you using? On 10.2.1 with OpenDJ I can’t get that to work. I’ll update the post now.
Hi Ryan,
You’re right – indeed it does work! Thanks for posting.
Thanks!
Mick
Hi all,
Is there a way to do the same with CA ?
Many thanks !
I found this working with CA (11.0.7) :
http://[your server]/ibmcognos/bi/v1/disp?b_action=xts.run&m=portal/legacy_tools/tools_directory.xts&m_path=CAMID(“OpenDJ:u:cn=administrator”)
Any thoughts on how to do this in Cognos Analytics v11?
We can still do it in the legacy portal.
http://localhost/ibmcognos/bi/v1/disp?b_action=xts.run&m=portal/cc.xts&m_path=CAMID(%22::Anonymous%22)/folder[@name=%27My%20Folders%27] works fine for me on my laptop. Details can be found here: http://www-01.ibm.com/support/docview.wss?uid=swg27048317&aid=1
In the meantime, I’m still looking in to how to do this through the C11 folder system. First, it would only work in 11.0.6+, since that was R6 was the first version we could open folders directly. There’s a shorthand in the folder structure that concerns me a little. We can access our own my folders using bi/?perspective=home&folder=.my_folders, but calling the camid doesn’t work.
Hi Paul,
Your blog so useful. I really get a lot of useful information from your posts.
Is it possible to test a report on behalf of another username to check what a user can see in the report if we want to check the data level security? So if I have admin privileges can I somehow override the username session parameter in Report Studio and run the report for a set of users to test?
Thanks.
Unfortunately no, this isn’t possible. User impersonation isn’t something that Cognos can do natively. Fortunately there’s a Motio tool that can handle it: http://info.motio.com/blog/impersonation-solving-cognos-support-issues-made-easier