You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Microsoft Graph API创建Bookings预约时遇502 BadGateway错误求助

使用Microsoft Graph API v1.0创建Microsoft Bookings预约时遭遇502 BadGateway(UnknownError)

调用POST https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{id}/appointments接口创建Bookings预约时,持续返回无有效提示的502错误,错误响应如下:

{
  "message": "BadGateway",
  "innerError": {
    "error": {
      "code": "UnknownError",
      "message": ""
    }
  }
}

已排查内容

  • 确认访问令牌有效,且权限范围配置正确
  • 核对过Booking企业ID、服务ID、员工ID均无误
  • 最初使用Microsoft Docs提供的示例请求体发起请求,未成功
  • 后来以通过Bookings前端手动创建的现有预约的GET请求返回JSON为模板构造请求体,仍然失败
  • 同一访问令牌可正常调用取消、更新现有预约的Graph API接口

当前使用的请求体

POST https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/EXAMPLE@Example.com/appointments
Content-type: application/json

{
  "@odata.type": "#microsoft.graph.bookingAppointment",
  "customerName": "Filip",
  "customerEmailAddress": "example@g.com",
  "customerTimeZone": "Eastern Standard Time",
  "serviceId": "XYZ",
  "startDateTime": {
    "dateTime": "2025-06-14T13:00:00Z",
    "timeZone": "UTC"
  },
  "endDateTime": {
    "dateTime": "2025-06-14T14:00:00Z",
    "timeZone": "UTC"
  },
  "staffMemberIds": [
    "XYZ"
  ]
}

有没有人遇到过类似的创建预约时的502 UnknownError问题?能否分享一个可成功执行的POST请求体示例?


内容的提问来源于stack exchange,提问作者Filip

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 21:18:13