Graph API 在线会议 - 找不到此应用程序的应用程序访问策略

问题描述 投票:0回答:1

我们在尝试访问在线会议 API 时遇到应用程序访问策略问题。

我们注册了新的应用程序,并为在线会议的申请权限提供了资助。

enter image description here

我们按照 MS 文档来配置访问策略。

https://learn.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy#configure-application-access-policy

我们尝试使用全局管理员和 Office 365 管理员帐户使用不同的用户帐户,但仍然无法解决此问题。

由于我的用户帐户启用了 MFA,因此我尝试在浏览器中以交互方式登录。

enter image description here

我的团队帐户是组织帐户,驻留在 1 个租户中。创建在线会议所需的应用程序注册位于另一个租户中。

我已经为应用程序 ID“d070...”配置了正确的 API 权限。但我仍然遇到访问被拒绝。

enter image description here

powershell azure-active-directory microsoft-graph-api microsoft-teams
1个回答
0
投票

最初我得到了相同的错误,如下所示:

https://graph.microsoft.com/v1.0/users/userID/onlineMeetings/MeetingID

enter image description here

要解决该错误,请检查以下内容:

TenantA
创建应用并授予API权限:

enter image description here

用户驻留在

TenantB
中,当我尝试创建应用程序策略时,出现了相同的错误:

New-CsApplicationAccessPolicy -Identity Ruk-policy -AppIds "TenantAAppID" -Description "Ruk"

enter image description here

对于

TenantB
中的用户,我分配了活动的 Skype for Business 管理员角色:

enter image description here

分配角色后,使用

TenantB
用户重新连接到 Microsoft Teams 模块,并创建策略并授予策略

Disconnect-MicrosoftTeams
Connect-MicrosoftTeams

New-CsApplicationAccessPolicy -Identity Ruk-policy -AppIds "TenantAAppID" -Description "Ruk"

Grant-CsApplicationAccessPolicy -PolicyName Ruk-policy -Global

enter image description here

生成访问令牌

https://login.microsoftonline.com/TenantID/oauth2/v2.0/token

client_id:ClientID
client_secret:ClientSecret
scope:https://graph.microsoft.com/.default
grant_type:client_credentials

enter image description here

通过使用上述访问令牌,我能够成功查询

TenantB
用户会议详细信息

https://graph.microsoft.com/v1.0/users/UserID/onlineMeetings/MeetingID

enter image description here

要查询

TenantA
(应用所在的位置)用户在线会议详细信息,请使用
TenantA
用户连接到 Microsoft Teams 并创建应用程序访问策略,然后查询用户的会议详细信息。

© www.soinside.com 2019 - 2024. All rights reserved.