在 Microsoft Graph 中选择 API 以创建和加入联机会议Choose an API in Microsoft Graph to create and join online meetings

Microsoft Graph 提供了两个 API 集,可在 Microsoft Teams 或 Skype 上安排和加入联机会议:Microsoft Graph offers two API sets that arrange and join online meetings on Microsoft Teams or Skype:

选择如下所示:The choice is between:

  • 一种简便的编程方法,可在 Outlook 日历中设置一个联机会议,与会者可在该日历中单击加入会议,并在 Teams 或 Skype 中继续其体验。A convenient programmatic way to set up an online meeting in the Outlook calendar where attendees click to join the meeting, and continue their experience in Teams or Skype.
  • 在应用中,可通过更丰富的编程方式集成 Teams 或 Skype 功能,实现更好的自定义体验。And, a richer programmatic integration of Teams or Skype features in an app for a more customized experience.

为方案选择 API 时的注意事项Considerations when choosing an API for your scenario

选择日历 API,以获得与 Outlook 日历的简化内置集成,从而在 Outlook 日历中生成联机会议事件:Choose the calendar API for a streamlined, built-in integration with Outlook calendar, that results in an online meeting event in the Outlook calendar:

  • 编程支持:Programmatic support:
    • 应用可以_在 Outlook 日历中作为联机会议直接创建或更新事件_,并在 Outlook 日历事件中插入一个“加入 Teams 会议”blob。Apps can directly create or update an event as an online meeting in the Outlook calendar, with a join-Teams-meeting blob inserted in the Outlook calendar event.
    • 应用可通过 Internet 或拨号方式获取用于加入会议的属性。Apps get properties for joining meeting over the Internet or by dialing in.
  • 与会者的以编程方式创建的日历事件 UI 体验与通过 Outlook UI 创建的任何事件完全相同:Attendees' UI experience with the programmatically created calendar event is in full parity with any event that has been created through the Outlook UI:
    • 与会者可以选择联机或亲自出席会议。Attendees can choose to meet online or in person.
    • 与会者可以单击“加入 Teams 会议”blob 以通过 Internet 或拨号方式加入会议。Attendees can click in the join-Teams-meeting blob to join meeting over the Internet or by dialing in.
    • 如果已配置,则与会者可使用 Teams 的其他丰富功能(包括视频会议和会议厅)。Attendees can use other rich features of Teams, including video conferencing and meeting lobby, if configured.

注意: 与 Outlook 日历集成假设管理员已在 Outlook 中设置了联机会议。Note: Integration with Outlook calendar assumes an administrator has set up Outlook for online meetings. 使用 API 前,请验证支持。Verify the support before using the API.

选择云通信 API 以获得灵活性和更广泛的编程支持:Choose the cloud communications API for flexibility and broader programmatic support:

  • 应用具有更大的灵活性,可以进一步将 API 结果与业务线和其他应用集成。Apps have more flexibility to further integrate the API results with line of business and other apps. 该 API 与任何特定日历保持分离,并且不会在任何日历中创建事件。The API is decoupled with any specific calendar, and does not create an event in any calendar.
  • 应用可为与会者提供以下功能:Apps can provide the following capabilities for attendees:
    • 基于区域设置的加入信息。Locale-based join information.
    • 通过 Internet 或拨号方式加入会议。Joining meeting over the Internet or by dialing in.
    • 视频会议。Video-conferencing.
    • 其他安全功能(如会议厅)和自动与会者许可(预览)。Additional security features such as meeting lobby and automating attendee admission (preview).
    • 将会议与 Microsoft Teams 聊天相关联。Associating meeting with a Microsoft Teams chat.

比较 APIComparing the APIs

下表详细介绍了 API 级别的区别。The following table details the differences at the API level.

联机会议功能Online meeting feature 日历 API(事件资源)Calendar API (event resource) 云通信 API(onlineMeeting 资源)Cloud communication API (onlineMeeting resource)
主要 API 成员Main API members 事件资源:event resource:
- isOnlineMeeting 属性- isOnlineMeeting property
- onlineMeetingInfo 类型的 onlineMeeting 属性- onlineMeeting property of the onlineMeetingInfo type
- onlineMeetingProvider 属性- onlineMeetingProvider property
日历资源:calendar resource:
- allowedOnlineMeetingProviders 属性- allowedOnlineMeetingProviders property
- defaultOnlineMeetingProvider 属性- defaultOnlineMeetingProvider property
联机会议资源onlineMeeting resource
音频会议资源audioConferencing resource
与日历项目的集成Integration with a calendar item
- 创建更新事件 API 会自动将生成的 Outlook 日历事件设置为联机会议。- Create or update event API automatically sets the resultant Outlook calendar event as an online meeting.
-使用返回的 Outlook 日历事件isOnlineMeetingonlineMeetingonlineMeetingProvider 属性。- Use the isOnlineMeeting, onlineMeeting, and onlineMeetingProvider properties of the returned Outlook calendar event.
- 创建 API 可返回与特定日历类型无关的联机会议资源。- Create API returns an onlineMeeting resource that is independent of a particular calendar type.
- 不会创建或更新任何 Outlook 事件。- Does not create or update any Outlook event.
- 将返回的联机会议资源信息集成到适合你的方案的应用体验中。- Integrate the returned onlineMeeting resource information in an app experience appropriate for your scenario.
- 使用 createOrGet 返回具有指定 externalId 值的联机会议,或者创建一个外部值(如果不存在),以简化将生成的会议嵌入到第三方日历中的过程。- Use createOrGet to return an online meeting that has a specified externalId value, or create one if none already exists, to streamline embedding the resultant meeting in a third-party calendar.
更改为脱机会议Changing to offline meeting - 否 - 一旦启用了用于联机加入的事件,就不能更新该事件以使其成为脱机会议。- No - once you enable an event for joining online, you cannot update it to make it an offline meeting.
- 不能更改 onlineMeetingProvider 属性,也不能将 isOnlineMeeting 设置为 false 以禁用联机会议。- Cannot change the onlineMeetingProvider property, nor set isOnlineMeeting to false to disable the meeting online.
否 - 创建联机会议资源后,只能删除它,而不能将其更改为脱机会议。No - once you create an onlineMeeting resource, you can only delete it but cannot change it to an offline meeting.
基于区域设置的加入信息Locale-based join information 无直接 API 集成。No direct API integration. - 创建联机会议时,请使用 Accept-Language HTTP 标头。- Use the Accept-Language HTTP header when creating an online meeting.
- 请参阅示例- See example.
通过 Internet 加入 (VoIP)Joining over Internet (VoIP) 通过 onlineMeeting 属性访问 joinUrlThrough the onlineMeeting property, access joinUrl. 使用 joinWebUrl 属性。Use the joinWebUrl property.
通过拨号方式加入Joining by dial-in 通过 onlineMeeting 属性访问:Through the onlineMeeting property, access:
- conferenceIdquickDialphonestollFreeNumberstollNumber- conferenceId, quickDial, phones, tollFreeNumbers, tollNumber.
通过 audioConferencing 属性访问:Through the audioConferencing property, access:
- conferenceIdtollFreeNumbertollNumber- conferenceId, tollFreeNumber, tollNumber.
- dialinUrl 用于可在外部访问的网页,其包含拨入信息,便于与第三方应用集成。- dialinUrl property for an externally-accessible web page that contains dial-in info to facilitate integration with third-party apps.
通过视频会议(音频和视频)加入Joining by video conferencing (audio and video) 无直接 API 集成。No direct API integration. 使用 videoTeleconferenceId 属性。Use the videoTeleconferenceId property.
会议厅和自动准许与会者加入联机会议Meeting lobby and automating attendee admission into online meeting - 无直接 API 集成。- No direct API integration.
- 在事件的已注入“加入 Teams 会议”blob 中,如果管理员启用了“会议选项”链接,则与会者可以单击该链接来访问会议厅。- In the injected join-Teams-meeting blob of the event, attendee can click a Meeting options link to access meeting lobby, if enabled by the administrator.
- API 将来自组织者所在公司和联合公司的与会者以及其他与会者(包括匿名与会者)区分开。- API differentiates attendees from the organizer’s company and federated companies, and other attendees including anonymous ones.
- 使用 autoAdmittedUsers 属性(预览)。- Use the autoAdmittedUsers property (preview).
与 Teams 聊天相关Relating to a Teams chat 无直接 API 集成。No direct API integration. 使用 chatInfo 属性。Use the chatInfo property.

另请参阅See also