问题描述
我们有一个应用程序,供用户从门户预订/编辑/取消会议室邮箱会议。
因此,用户应该能够在会议室邮箱中创建日历事件,并且所有参与者都应收到会议邀请
您能否告知Graph API需要除“ Calendars.ReadWrite”以外的其他权限
解决方法
根据document关于创建在线会议的说明,我尝试调用api,并且该API可以与Calendars.ReadWrite一起使用,这是详细信息。
- 创建Azure广告应用并添加api权限
- 获取
access token
,请注意,我只是将ReadWrite设置为作用域。 - 根据上面的文档调用api,将获得成功响应,您可以打开Outlook并在日历中找到已创建的会议。
这是我的网址和参数:
Post:https://graph.microsoft.com/v1.0/me/events
Authorization:Bearer <access token>
Prefer:outlook.timezone="Pacific Standard Time"
Content-Type:application/json
body:{
"subject": "Prep for customer meeting","body": {
"contentType": "HTML","content": "Does this time work for you?"
},"start": {
"dateTime": "2020-11-20T13:00:00","timeZone": "Pacific Standard Time"
},"end": {
"dateTime": "2020-11-20T14:00:00","location":{
"displayName":"Cordova conference room"
},"attendees": [
{
"emailAddress": {
"address":"AdeleV@contoso.OnMicrosoft.com","name": "Adele Vance"
},"type": "required"
}
],"allowNewTimeProposals": true,"isOnlineMeeting": true,"onlineMeetingProvider": "teamsForBusiness"
}