- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试代表用户创建 session ,因为我正在尝试获取代码。我已在 Azure 上注册了该应用程序。还生成了应用程序(客户端)ID 我还在 API 中添加了所需的权限。但是,当我访问此页面时,页面会要求提供电子邮件 ID,但一旦用户填写了电子邮件 ID,它就会显示“输入值范围提供的值对于重定向 URL 中的 OnlineMeeting.ReadWrite 无效”。
我在这里缺少什么?
按照@Rukmini的建议,我尝试了这个,这里是相关细节。
要获取我正在构建的代码,如下图所示:
当我传递 OnlineMeetings.ReadWrite 范围时,这不起作用。但是当我通过 https://graph.microsoft.com/.default 作为它的工作范围,我能够验证并生成代码。然后我可以使用该代码来获取访问 token ,如下图所示。但使用此访问 token 我无法创建 session ,因为它没有本文档 https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=http 中所述的 OnlineMeetings.ReadWrite 范围。
如何为 OnlineMeetings.ReadWrite 范围生成代码和访问 token ,以便我可以代表用户创建 session ?
我按照 @Rukmini 的建议使用以下查询参数生成了授权 URL。
当我访问该链接时,我看到了一个登录屏幕,但由于我之前的错误,我看到了相同的屏幕。我在这里错过了什么吗?我需要验证我的应用程序吗?或者我是否必须只使用一些特定的 ID,就像我们在 GCP 和 AWS 中所做的那样?
最佳答案
我尝试在我的环境中重现相同的结果,并成功获得如下结果:
我创建了一个 Azure AD Multi-Tenancy 应用程序:
我向 API 权限授予了管理员同意,如下所示:
我使用以下端点生成了代码并通过浏览器授权:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?
&client_id=ClientID
&response_type=code
&redirect_uri=https://jwt.ms
&response_mode=query
&scope=OnlineMeetings.ReadWrite
&state=12345
现在,我使用以下参数生成了访问 token :
https://login.microsoftonline.com/common/oauth2/v2.0/token
client_id:ClientID
client_secret:ClientSecret
scope:OnlineMeetings.ReadWrite
grant_type:authorization_code
redirect_uri:https://jwt.ms
code:code
使用 jwt.ms 解码访问 token 并检查范围是否为 OnlineMeetings.ReadWrite
:
我能够使用以下查询成功创建在线 session :
https://graph.microsoft.com/v1.0/me/onlineMeetings
Content-Type: application/json
{
"startDateTime":"2023-01-12T14:30:34.2444915-07:00",
"endDateTime":"2023-02-12T15:00:34.2464912-07:00",
"subject":"User Token Meeting"
}
关于azure - 为输入值范围提供的值对于 OnlineMeeting.ReadWrite 无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75221056/
我正在尝试代表用户创建 session ,因为我正在尝试获取代码。我已在 Azure 上注册了该应用程序。还生成了应用程序(客户端)ID 我还在 API 中添加了所需的权限。但是,当我访问此页面时,页
我目前正在尝试使用 Graph Explorer 创建在线 session ,并面临类似的问题,如这个问题:onlinemeeting-cannot-be-null-error-when-creati
我正尝试根据 the documentation 创建一个新 session : POST https://graph.microsoft.com/beta/app/onlineMeetings (包
当前使用 Microsoft Graph API v1.0 通过 POST/me/events 创建在线 session 。原因是,如果您直接创建在线 session 并在 session 中添加用户
我已遵循以下 link 中给出的代码示例通过 Microsoft 并成功获取用户列表。 我在 Azure Active Directory 中注册的应用程序也具有“OnlineMeeting.Read
我已遵循以下 link 中给出的代码示例通过 Microsoft 并成功获取用户列表。 我在 Azure Active Directory 中注册的应用程序也具有“OnlineMeeting.Read
我正在尝试创建在线 session 以使用 Graph SDK 从 Microsoft Team Meeting 获取 joinurl,但即使在我向“OnlineMeetings.Read.All”提
我是一名优秀的程序员,十分优秀!