Microsoft Graph API OnlineMeetings错误-预期不为null \ r \ n参数名称:会议 [英] Microsoft Graph API OnlineMeetings Error - Expected not null\r\nParameter name: meeting

查看:36
本文介绍了Microsoft Graph API OnlineMeetings错误-预期不为null \ r \ n参数名称:会议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个休闲应用程序,该应用程序调用Microsoft Graph API,以生成Microsoft Teams会议链接.

I am working on a slack app that calls Microsoft Graph API in order to generate a Microsoft Teams meeting link.

我能够生成访问令牌,但是出现错误:

I am able to generate an access token, however I am getting the error:

{
    "error": {
        "code": "InvalidArgument",
        "message": "Expected not null\r\nParameter name: meeting",
    }
}

这是我的发帖请求:

POST https://graph.microsoft.com/v1.0/me/onlineMeetings

{
    "subject":"User Token Meeting",
    "startDateTime": "2020-12-28T14:30:34.2444915-07:00",
    "endDateTime": "2020-12-29T15:00:34.2464912-07:00"
}

Microsoft Graph文档除了这三个元素和不记名令牌之外,没有提及要包含在POST中的任何其他内容,因此我对参数名称:会议的含义感到困惑.如果有人可以帮助我,我将不胜感激.

The Microsoft Graph docs don't mention anything else to include in the POST besides these three elements and the bearer token, so I'm confused as to what it means when it says parameter name: meeting. I would really appreciate it if someone could help me out.

如果这很重要,请参考,该应用程序不获取用户凭据,而是自行执行所有操作,包括生成自己的访问令牌.

For reference if this matters, the application doesn't take user credentials, and does everything on its own, including generating its own access token.

推荐答案

如注释中所述,应该在请求正文中添加属性参与者,尽管官方文档中没有提到此属性是必要的.该请求应类似于:

As mentioned in comment, the property participants should be added in request body although the official document doesn't mentioned this property is necessary. The request should be like:

{
  "startDateTime":"2019-09-09T14:33:30.8546353-07:00",
  "endDateTime":"2019-09-09T15:03:30.8566356-07:00",
  "subject":"Application Token Meeting",
  "participants": {
    "organizer": {
      "identity": {
        "user": {
          "id": "550fae72-d251-43ec-868c-373732c2704f"
        }
      }
    }
  }
}

正如艾伦在您的下一个

And as Allen mentioned in your next post, you should not use the Application Object ID in the request url, you need to use the user id instead.

这篇关于Microsoft Graph API OnlineMeetings错误-预期不为null \ r \ n参数名称:会议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆