使用 MS 图获取 SP 站点的 SharePoint 用户 ID 和配置文件 api

Get SharePoint user ID and profile of an SP site with MS graph api

有没有办法使用 Microsoft Graph API 在 SharePoint 站点内获取用户 ID?

我得到一个带有 /me 端点的 guid id,但在我的 SP 站点中,当前用户的 id 是 033。

我知道有一种方法可以将 SP rest api 与 currentspcontext 一起使用。但是我想用ms graph

查询

我认为 Microsoft Graph 目前仅允许您查询 SharePoint 网站、列表和列表项。您是否尝试过使用 Microsoft Graph 查询用户信息列表?

这是您需要的服务调用示例。您需要提供用户信息列表的 guid 和用户的显示名称。 //graph.microsoft.com/v1.0/sites/root/lists/{用户信息列表guid}/items?$select=Fields&$filter=Fields/Title eq 'Alex Wilber'&$expand=字段