Currently, I'm trying to programmatically get the name of the user that started a printing job to a mapped IPP printer.

I'm struggeling with the fact that the JOB_INFO_2 structure's member pUserName contains the name of the user that is being used to connect to the IPP printer and not the user that started the print job locally.

To illustrate:

enter image description here

Looking at both, the Microsoft's PrintMon tool and the printer queue they both show the same:

enter image description here

and

enter image description here

They show "uwe_keim" as the user that is the owner, although another user started the print job.

This seems to come from the connecting credentials of the user that is being used to authenticate with the IPP printer:

enter image description here

I'm really clueless on how/whether there is a chance to get the actual user that started a print job (I need this for an app that runs in a multi-user terminal environment).

So to summarize my question:

How to get the name of the user who started a print job? (in contrast to the name of the user who owns a print job)

Edit
Report