Skip to content
Prev Previous commit
Next Next commit
Added sample code extract to demonstrate AsTeamsChannelAccounts() met…
…hod (#94)

* Added sample code extract to demonstrate AsTeamsChannelAccounts() method

Making it clearer how to implement functionality

* Minor edits

* Updated JSON formatting
  • Loading branch information
daltskin authored and billbliss committed Feb 27, 2018
commit bb36c5b1e9baaeda7bc5b922791407c75283e8a1
10 changes: 9 additions & 1 deletion msteams-platform/concepts/bots/bots-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Get context for your bot
description: Describes how to get context for bots in Microsoft Teams
keywords: teams bots context
ms.date: 02/27/2018
---

# Get context for your Microsoft Teams bot
Expand Down Expand Up @@ -79,7 +80,14 @@ await context.PostAsync($"People in this conversation: {sb.ToString()}");
```

> [!NOTE]
> The `GetTeamsConversationMembersAsync(teamId, tenantId)` override is now obsolete. If your code uses this override, update it to use `IConversations.GetConversationMembersAsync(conversationId)`; then use `AsTeamsChannelAccount` to get the extended properties.
> The `GetTeamsConversationMembersAsync(teamId, tenantId)` override is now obsolete. If your code uses this override, update it to use `IConversations.GetConversationMembersAsync(conversationId)` and use `AsTeamsChannelAccount` to get the extended properties, for example:
>```csharp
>var members = await connector.Conversations.GetConversationMembersAsync(message.Conversation.Id);
>foreach (var member in members.AsTeamsChannelAccounts())
>{
> [...]
>}
>```

#### Node.js example

Expand Down