I'm trying to match two users for a secure print scenario:
a) the owner of a printjob, logged in on a windows client and performing a print job to a secure print system via LPR The windows client is connected directly to an azure AD
b) to fetch the printjob from the secure print system I am performing an authentication via graph API, the user is logging in with the UPN but I can get some attributes like displayName etc.
On the windows 10 client
-> Login via UPN
Whoami /USER returns: MaxMusterman_rcai04e
Whoami /UPN returns Max.Mustermann1@domain.com
The "owner" of the printjob printed by LPR is "MaxMusterman_rcai04e"
So far I have not found a way to "find" this user detail via graph api to be able to "match" the user logged in on the secure print system with the actual owner of the printjob.
This is also a test what happens if two users have the same displayName.
Another account exists:
User1:
UPN: Max.Mustermann@domain.com
DisplayName: Max Mustermann
PrintjobOwner: MaxMustermann
User2:
UPN: Max.Mustermann1@domain.com
DisplayName: Max Mustermann
PrintjobOwner: MaxMusterman_rcai04e
What I have tried:
https://developer.microsoft.com/en-us/graph/graph-explorer
https://graph.microsoft.com/v1.0/me
https://graph.microsoft.com/v1.0/users/Max.Mustermann1@domain.de/identities
I cannot find the desired owner of the print job or any way to deduce it programatically so far.