问题描述
在特定租户下登录我们系统的任何用户(以身份验证身份登录)都应该能够创建一个在线会议(MS Teams)形式的活动.
Any user who logged into our system (IdentityServer as Auth) under a specific tenant should be able to create an event as an online meeting (MS Teams).
我们按照 构建 ASP.NET Core MVC 应用程序与 Microsoft Graph 和 创建和启用在线会议以创建应用程序验证组织的AD 用户,并允许他将活动创建为在线会议.
We followed Build ASP.NET Core MVC apps with Microsoft Graph and Create and enable an event as an online meeting to create an application that authenticates an AD user of an organization and allow him to create an event as an online meeting.
我们能够成功实施它,并且能够将活动创建为在线会议.
We are able to implement it successfully and was able to create the event as an online meeting.
但这里的确切情况是,在我们的 Web 应用程序中通过身份验证的任何用户(非 AD 用户)都应该能够创建 MS Teams 会议事件并与其他参与者共享,这些参与者应该能够加入会议.
But the exact scenario here is any user who is authenticated in our web application (not a AD user) should be able create a MS Teams meeting event and share it with other participants who should be able to join the meeting.
我不确定如何实现这一点.
I am not sure how to achieve this.
编辑
或者至少我如何创建在线会议 ?我尝试使用 客户端凭据提供程序如下
Or at least how do I create onlineMeeting ? I tried with Client credentials provider as below
IConfidentialClientApplication confidentialClientApplication = ConfidentialClientApplicationBuilder
.Create("<<App_Id>>")
.WithTenantId("<<Tenant_Id>>")
.WithClientSecret("<<Client_Secret>>")
.Build();
ClientCredentialProvider authenticationProvider = new ClientCredentialProvider(confidentialClientApplication);
GraphServiceClient graphClient = new GraphServiceClient(authenticationProvider);
var onlineMeeting = new OnlineMeeting
{
StartDateTime = DateTimeOffset.Parse("2020-01-15T21:30:34.2444915+05:30"),
EndDateTime = DateTimeOffset.Parse("2020-01-15T22:00:34.2464912+05:30"),
Subject = "User Token Meeting"
};
var meeting = graphClient.Me.OnlineMeetings
.Request()
.AddAsync(onlineMeeting).Result;
但它被扔了
Code: Forbidden
Inner error:
AdditionalData:
request-id: <<some_id>>
date: 2020-07-09T16:42:23
ClientRequestId: <<some_id>>
推荐答案
我这几天一直在研究你的问题,我打算在其他答案中提到一些建议.但此外,这里的主要挑战是,系统需要知道谁有权做什么.
I been working on your question in few days, I was going to mention some of the suggestions comes with the other answer. But in addition, the main challenge here, the system need to know who is authorized to do what.
因此,IMO 解决此问题的最佳选择是在 AzureAD,您可以使用它来创建团队活动.此外,您可以在访客用户登录后添加一个额外的步骤,以便访客输入他/她的姓名并将其用作参考.
So IMO The Best choice to solve this is creating a guest login in AzureAD, than you can use that to create a Team Events. Further more you can added an extra step after guest user logon, so that guest should enter his/her name and use it as reference.
这篇关于使用 Microsoft Graph API 创建“活动作为在线会议"或仅在线会议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!