在Azure Ad Szenario中打印职位所有者(LPR)

发布于 2025-01-29 11:34:10 字数 1551 浏览 2 评论 0原文

我正在尝试将两个用户匹配,以获取安全的打印方案:

a)printjob的所有者,在Windows客户端登录并通过LPR执行打印作业到安全的打印系统 Windows客户端直接连接到Azure AD

b)为了从安全的打印系统中获取printjob,我正在通过Graph API执行身份验证,用户正在使用UPN登录,但我可以

在 displayName等上获得一些属性。 Windows 10客户端由

-> Login via UPN
Whoami /USER returns: MaxMusterman_rcai04e
Whoami /UPN returns [email protected]

LPR打印的PrintJob的“所有者”是“ MaxMusterman_rcai04e”,

到目前为止,我还没有找到一种通过Graph API找到“此用户详细信息的方法”,以便能够“匹配”用户在安全打印上登录的用户系统与PrintJob的实际所有者。

这也是一个测试,如果两个用户具有相同的DisplayName会发生什么。

另一个帐户存在:

User1:
UPN: [email protected]
DisplayName: Max Mustermann
PrintjobOwner: MaxMustermann
User2:
UPN: [email protected]
DisplayName: Max Mustermann
PrintjobOwner: MaxMusterman_rcai04e

我尝试的是:

https://developer.microsoft.com/en-us/graph/graph-explorer
https://graph.microsoft.com/v1.0/me
https://graph.microsoft.com/v1.0/users/[email protected]/identities

我找不到印刷作业的所需所有者,或者到目前为止以编程为编程的任何方法。

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 [email protected]

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: [email protected]
DisplayName: Max Mustermann
PrintjobOwner: MaxMustermann
User2:
UPN: [email protected]
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/[email protected]/identities

I cannot find the desired owner of the print job or any way to deduce it programatically so far.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

刘备忘录 2025-02-05 11:34:10

•您可以通过查询特定的打印作业所有者来通过Microsoft Graph API获得所需的打印作业的所有者。但是您无法通过过滤或提及打印作业所有者的名称来获取打印作业列表。因此,您可以获取通过打印机给出的全部打印作业列表,然后可以过滤特定打印作业所有者的作业如下: -

命令获取打印机的打印作业列表 : -

GET https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs

•上述命令的输出包括'createby'的部分。因此,我们可以通过根据UPN应用过滤器来修改Graph API查询,根据所有者名称过滤

GET https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs$filter=createdBy/userPrincipalName eq '{upn}'

作业相关用户的 用户主名

要获取有关上述命令的更多详细信息,请参阅下面的文档链接: -

https://learn.microsoft.com/en-us/graph/graph/praph/api/printer-printer-list-jobs?view=graph-graph-raph-rest-rest-1.0& ; tabs = http

• You can surely get the owner of the desired print job through Microsoft Graph API by querying a particular print job owner. But you cannot get the list of print jobs by filtering or mentioning the name of the print job owner. Thus, you can get the whole list of print jobs that have been given through a printer and then you can filter the output for the jobs of a particular print job owner as below: -

Command for getting the list of print jobs for a printer: -

GET https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs

• Output for the above command includes the section for ‘createdBy’ for every print job displayed in the results. Thus, we can filter the jobs based on owner name by modifying the graph API query as by applying filter based on the UPN as below: -

GET https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs$filter=createdBy/userPrincipalName eq '{upn}'

Where ‘{upn}’ is the user principal name of the associated user.

To get more detailed information regarding the above commands, kindly refer to the documentation link below: -

https://learn.microsoft.com/en-us/graph/api/printer-list-jobs?view=graph-rest-1.0&tabs=http

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文