Skip to content

Commit 65ae553

Browse files
committed
Update get-teams-context.md
1 parent 6907272 commit 65ae553

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

msteams-platform/bots/how-to/get-teams-context.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Get Teams specific context for your bot, fetch user profile, get si
44
ms.topic: conceptual
55
ms.localizationpriority: high
66
ms.owner: angovil
7-
ms.date: 04/06/2026
7+
ms.date: 04/09/2026
88
---
99
# Get Teams specific context for your bot
1010

@@ -14,7 +14,7 @@ A bot can access additional context data about a team or chat where it's install
1414

1515
Your bot can query for the list of members and their basic user profiles, including Teams user IDs and Microsoft Entra information, such as name and objectId. You can use this information to correlate user identities. For example, to check whether a user logged into a tab through Microsoft Entra credentials is a member of the team.
1616

17-
The following sample code is used for fetching the roster:
17+
The following sample code is used to fetch the roster:
1818

1919
# [C#](#tab/dotnet)
2020

@@ -26,7 +26,7 @@ app.OnMessage(async context =>
2626
var conversationId = context.Activity.Conversation.Id;
2727

2828
// Gets all members of the conversation.
29-
var members = await context.Api.Conversations.Members.GetAsync(conversationId);
29+
var members = await context.Api.Conversations.Members.Get(context.Conversation.Id);
3030
});
3131
```
3232

@@ -53,7 +53,7 @@ async def handle_message(ctx: ActivityContext[MessageActivity]):
5353
conversation_id = ctx.activity.conversation.id
5454

5555
# Gets all members of the conversation.
56-
members = await ctx.api.conversations.members(conversation_id).get_all()
56+
members = await ctx.api.conversations.members.get(ctx.activity.conversation.id)
5757
```
5858

5959
# [JSON](#tab/json)
@@ -147,7 +147,7 @@ async def handle_message(ctx: ActivityContext[MessageActivity]):
147147
member_id = ctx.activity.from_.id
148148

149149
# Gets a single member by ID.
150-
member = await ctx.api.conversations.members(conversation_id).get(member_id)
150+
member = await ctx.api.conversations.members.get_by_id(conversation_id, member_id)
151151
```
152152

153153
# [JSON](#tab/json)

0 commit comments

Comments
 (0)