[英]The provided value for the input value scope is not valid for OnlineMeeting.ReadWrite
I am trying to create meeting on behalf of a user for that I am trying to get the code.我正在尝试代表用户创建会议,因为我正在尝试获取代码。 I have registered the app on Azure. Also generated Application(Client) ID I have also added the required permission in the API. But when I am visiting this page the page asks for the email id but once the users fill the email id it says The provided value for the input value scope is not valid for OnlineMeeting.ReadWrite in the redirect URL.
我已经在 Azure 上注册了该应用程序。还生成了应用程序(客户端)ID 我还在 API 中添加了所需的权限。但是当我访问此页面时,该页面要求输入 email id 但是一旦用户填写 email id 它说为输入值 scope 提供的值对于重定向 URL 中的 OnlineMeeting.ReadWrite 无效。
Please guide me to know what I am missing here.请指导我知道我在这里缺少什么。
Edit 1: As suggested by @Rukmini I tried this and here is the relevant details.编辑 1:正如@Rukmini 所建议的,我尝试了这个,这里是相关的细节。
To obtain the the code I am building url like this image要获得我正在构建的代码 url 就像这个图像
This does not work when I pass the OnlineMeetings.ReadWrite scope. But when I pass https://graph.microsoft.com/.default as scope it works and I am able to authenticate and generate a code.当我通过 OnlineMeetings.ReadWrite scope 时,这不起作用。但是当我将https://graph.microsoft.com/.default作为 scope 传递时,它起作用并且我能够进行身份验证并生成代码。 Then I can use that code to get the access token like following image.
然后我可以使用该代码获取访问令牌,如下图所示。 But using this access token I can not create the meeting as it does not have the OnlineMeetings.ReadWrite scope as stated in this doc ** https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=http**[![enter image description here] 3 ] 3
但是使用此访问令牌我无法创建会议,因为它没有本文档中所述的 OnlineMeetings.ReadWrite scope ** https://learn.microsoft.com/en-us/graph/api/application-post- onlinemeetings?view=graph-rest-1.0&tabs=http**[![在此处输入图片描述] 3 ] 3
Let me know what I can do to generate code and access token for the OnlineMeetings.ReadWrite scope so that I can create the meeting on users behalf.让我知道如何为 OnlineMeetings.ReadWrite scope 生成代码和访问令牌,以便我可以代表用户创建会议。 Thanks
谢谢
I tried to reproduce the same in my environment and got the results successfully like below:我尝试在我的环境中重现相同的内容并成功获得如下结果:
I created an Azure AD Multi-Tenant Application:我创建了一个 Azure AD 多租户应用程序:
I granted Admin Consent to the API permissions like below:我授予管理员同意API 权限,如下所示:
I generated the code by using below endpoint and authorizing it via browser:我通过使用以下端点生成代码并通过浏览器授权它:
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
Now, I generated access token by using the below parameters:现在,我使用以下参数生成了访问令牌:
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
Decode the access token using jwt.ms and check whether the scope is OnlineMeetings.ReadWrite
:使用jwt.ms解码访问令牌并检查 scope 是否为
OnlineMeetings.ReadWrite
:
I am able to create the Online meetings successfully by using the below query:我可以使用以下查询成功创建在线会议:
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"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.