Office 365 API - 获取许可信息:"Insufficient privileges to complete the operation"

Office 365 API - Getting Licensing Information: "Insufficient privileges to complete the operation"

我正在尝试通过此查询获取用户的产品许可信息: https://graph.microsoft.com/v1.0/dmsarktrial.onmicrosoft.com/subscribedSkus

并得到一个错误 "Insufficient privileges to complete the operation"。我设置了一个承载和其他需要身份验证的查询。可能是什么问题?

根据测试,Microsoft Graph REST 需要 Directory.AccessAsUser.All 的范围。您可以授予如下图所示的范围: