Botframework-sdk: Support for meeting APIs

Created on 10 Jun 2020  路  8Comments  路  Source: microsoft/botframework-sdk

We'll need to support additional meeting APIs and events, and some schema changes to the channelData object returned from Teams when the bot is operating in a meeting context. The first of these is the GetParticipants API which will allow bot developers to retrieve a TeamsChannelAccount object with the memberRole field added to determine the individual's role in the meeting (presenter,

GetParticipant API:

Request

GET /v1/meetings/{meetingId}/participants/{participantId}?tenantId={tenantId}

Response

{
  "user":
  {
      "id": "29:1JasdfPAX9asdfGxhVasdfx_asdf-gG8Z-X03306asdf9p-xMTEbDXsT6KH7-0kkTS8cD-asdfsoV6asdf6_aYw",
      "aadObjectId": "asdfbad0-asdf-424a-asdf-20fb051f3c1a",
      "name": "Leon Smith",
      "givenName": "Leon",
      "surname": "Smith",
      "email": "[email protected]",
      "userPrincipalName": "[email protected]",
      "tenantId": "asdf88bf-asdf-41af-asdf-asdfd0asdf47",
  },
  "meeting":
  {
      "role ": "Presenter",
      "inMeeting":true
  },
  "conversation":
  {
      "id": "<conversation id>"
  }
}

SDK Support

We'll need to create support for both sending the request above, and serializing the response.

Request

For the request, we'll want to model support similar to the Teams Getmember functionality, so something like:

await TeamsInfo.GetMeetingParticipantAsync(turnContext, meetingId, participantId, cancellationToken);

Response

For the response, I propose creating a new object derived from TeamsChannelAccount that contains the two additional fields - conversation and meetingRole.

Failure responses

The failure responses are not changed from similar APIs, and should not require any special consideration.

Tracking

Dotnet SDK Issue

  • [x] PR
  • [x] Merged

Javascript SDK Issue

  • [x] PR
  • [x] Merged

Java SDK Issue

  • [x] PR
  • [x] Merged

Python SDK Issue

  • [x] PR
  • [x] Merged
Teams P0

Most helpful comment

@EricDahlvang @tracyboehrer @joshgummersall Updated the response payload again.

All 8 comments

@clearab This is still blocked, and Andrew is planning to write a spec. Draft spec is expected to be ready for review by 8/15. People needed for Spec review are @EricDahlvang , @johnataylor , @tacri

@tacri to bring @clearab up-to-speed with recent changes on this API based on various reviews.

what is meetingId? where does this come from?

They have to use the tab SDK or some other method to get it - there is currently no bot API to retrieve the meetingId.

That API is blocked on a bunch of permissions stuff they want to do with resource-specific consent in Graph.

@tacri - for testing how can we manually get the meetingId to use?

Finally figured out a way to test this, by side loading the bot into the meeting

@EricDahlvang @tracyboehrer @joshgummersall the response payload had changed slightly (added inMeeting boolean). Please see updated payload above.

@EricDahlvang @tracyboehrer @joshgummersall Updated the response payload again.

Was this page helpful?
0 / 5 - 0 ratings