Skip to main content

I recently configured K2 to accept claims, works fine as long as I want to access K2 under the credentials of the end user.


Before claims, I ran the application under a service account (app pool) and impersonated the end user right before I made the SourceCode.Workflow.Client call to ensure that the call was done under the credentials of the end-user. Calls to SourceCode.Workflow.Management API were done under the credentials of the service account, who had administrative privileges in K2.


After claims, I pass the end-user claims to K2. This still allows me to act in the context of the end-user, it's actually simpler since I no longer have to use impersonation.


Unfortunately I am having some issues using the SourceCode.Workflow.Management API, since the end-user does not have administrative privileges (and will not get those either).


How can I act under the credentials of the (administrator-privileged) ServiceAccount with claims enabled on the K2 HostServer?


 

How about using impersonation on K2 connection?


 


con.ImpersonateUser("K2:ServerDomainUserThatWantToImpersonate);


You just have to grant the impersonation access to service account from the K2 workspace


Reply