有没有办法通过 Graph API 检查应用程序是否已被授予 requiredResourceAccess?

Is there a way to check if requiredResourceAccess has been granted on an application via the Graph API?

我正在使用 Graph API(通过 NodeJS SDK)在 Azure AD 中注册一个应用程序,我需要等待站点管理员为新应用程序授予对 RequiredResources 的访问权限。我如何检查是否已通过 Graph API 向应用程序授予该访问权限?

是的,您可以查看此状态。 Microsoft Graph REST API 提供此功能。

在您的情况下,您可以通过调用 privilegedApproval API 来执行此操作,这允许您检查以下同意:

pending, approved, denied, aborted, canceled

你可以使用这个 API Get privilegedApproval

Note : APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

详情请参考here