Skip to main content
Please help, anyone.

I'm having some troubles when accessing the K2 worklist.
I have no problems getting the worklist when using the following code:
' Open the connection to the K2 server
' ------------------------------------
objK2Conn = New Connection
objK2Conn.Open(AppSettings("K2Server"))

' Get the worklist of the current page user
' -----------------------------------------
objK2WorkList = objK2Conn.OpenWorklist("ASP")

BUT, I want to be able to get the worklist for another user, I'm trying the following code:
' Open the connection to the K2 server
' ------------------------------------
objK2Conn = New Connection
objK2Conn.Open(AppSettings("K2Server"), _
AppSettings("Domain") & "," & _
AppSettings("K2UID") & "," & _
AppSettings("K2PWD"))

' Get the worklist of the current page user
' -----------------------------------------
objK2WorkList = objK2Conn.OpenWorklist("ASP", Username)

But I get "User is not allowed to open the worklist", is there something I'm missing 😉 ?
Hi Dawie,

When you're trying to open the other user's worklist, you already open the connection with this user's credentials - which is fine. In this case, you do NOT need to call the OpenWorklist method with the 'Username' parameter. If you do use this parameter, you bring 'Managed Users' into play and the current page user in not necessarily managed by the connection string user.

Does this make sense?
Ockert
Hi Ockert,

This does make alot of things a little clearer, however, I need to open the worklist of ANY user and I won't know the password for the user, all I'll have is the Windows username. I assume that I'll then have to open their worklists in another way? The users themselves wont be accessing the page that needs to open the worklist.

Could I authenticate on the server using only the users windows username?

Thanks again.
Hi Dawie,

The only way you would be able to open ANY other user's worklist, without having their password, would be to open the connection as a certain "super user" who is defined to be the Manager of all other users in AD. Obviously, for most companies, this is not a viable solution.

Could I authenticate on the server using only the users windows username?
No, you need the full credential set to authenticate the user.

Do you need to physically open the worklist items or just list a user's worklist items?

Regards,
Ockert

Sorry, there is a way to impersonate a user but this could obviously become a security risk and believe me - difficult to get it set up correctly.

Please have a look at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/WSS_Ch4_ProtTranTechSuppl.asp

Handle with care!!

Ockert
Thanks Ockert! 😃

I'll have a look at this, hope I can get this to work.
Dawie,
I'd be curious to hear how your issue panned out, as we are facing a similar requirement.

Our solution is centered on the SQL UM, in which we essentially manipulate the GetManageUser (sic) stored procedure to make K2 believe that all users manage every other user.

Reply