Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 47 additions & 3 deletions msteams-platform/bots/how-to/bot-configuration-experience.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,32 @@ The following table lists the response type associated with the invoke requests:
}
```

# [Python](#tab/python)

[Sample code reference](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/85a455e417b6fba90b9806cdf4d1e3ad10f62944/samples/bot-configuration-app-auth/python/bots/bot_configuration_auth.py#L72)

```python
async def handle_teams_config_fetch(self, turn_context):
"""
Handles the configuration fetch request.
"""
response = {
"config": {
"type": "auth",
"suggestedActions": {
"actions": [
{
"type": "openUrl",
"value": "https://example.com/auth",
"title": "Sign in to this app"
}
]
},
},
}
return InvokeResponse(status=HTTPStatus.OK, body=response)
```

---

* `type="message"`: When the type is set to message, it indicates that the bot is sending a simple message back to the user, indicating the end of the interaction or providing information without requiring further input.
Expand Down Expand Up @@ -228,6 +254,24 @@ The following table lists the response type associated with the invoke requests:
}
```

# [Python](#tab/python2)

[Sample code reference](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/85a455e417b6fba90b9806cdf4d1e3ad10f62944/samples/bot-configuration-app-auth/python/bots/bot_configuration_auth.py#L92C1-L102C67)

```python
async def handle_teams_config_submit(self, turn_context):
"""
Handles the configuration submit request.
"""
response = {
"config": {
"type": "message",
"value": "You have chosen to finish setting up bot",
},
}
return InvokeResponse(status=HTTPStatus.OK, body=response)
```

---

When a user reconfigures the bot, the `fetchTask` property in the app manifest file initiates `config/fetch` in the bot logic. The user can reconfigure the bot settings post-installation in two ways:
Expand All @@ -253,10 +297,10 @@ When a user reconfigures the bot, the `fetchTask` property in the app manifest f

## Code sample

| **Sample name** | **Description** |**.NET** |**Node.js** |**Manifest**|
| **Sample name** | **Description** |**.NET** |**Node.js** | **Python** |**Manifest**|
|----------------|-----------------|--------------|--------------|--------------|
| Bot configuration app | This sample demonstrates a bot for configuring and reconfiguring Adaptive Cards in teams and group chats. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app/nodejs)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app/csharp/demo-manifest)|
| Bot configuration app with auth | This Teams bot enables configuration and reconfiguration with dynamic search capabilities on Adaptive Cards. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app-auth/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app-auth/nodejs)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app-auth/csharp/demo-manifest)|
| Bot configuration app | This sample demonstrates a bot for configuring and reconfiguring Adaptive Cards in teams and group chats. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app/nodejs)| NA |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app/csharp/demo-manifest)|
| Bot configuration app with auth | This Teams bot enables configuration and reconfiguration with dynamic search capabilities on Adaptive Cards. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app-auth/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app-auth/nodejs)| [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app-auth/python) |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-configuration-app-auth/csharp/demo-manifest)|

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ You can invoke Stageview through a deep link from your tab by wrapping the deep

## Code sample

| Sample name | Description | .NET |Node.js| TypeScript|
|-------------|-------------|------|----|
| Deep link consuming `subEntityId` | This Teams sample application highlights deeplinks for various functionalities, such as initiating calls, chats, and navigating within tabs and apps. It features a comprehensive setup guide and supports interactions with both bots and tabs for enhanced user engagement. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs) | NA|
| Tab app navigation | This sample illustrates the tab navigation feature in a Microsoft Teams application, enabling smooth transitions between different tabs. Designed for use with Node.js, it highlights how users can effectively navigate within the app for an enhanced experience. | NA | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-app-navigation/nodejs) | NA|
| Tab deep link pass values | This sample app for Microsoft Teams illustrates the creation and usage of dynamic deep links to pass contextual values to tab and standalone web applications. It highlights the differences in link formatting and consumption based on the user's access environment, enhancing navigation and data display capabilities. | NA | NA | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink-pass-values/ts)|
| Sample name | Description | .NET |Node.js| TypeScript| Python |
|-------------|-------------|------|----|----|
| Deep link consuming `subEntityId` | This Teams sample application highlights deeplinks for various functionalities, such as initiating calls, chats, and navigating within tabs and apps. It features a comprehensive setup guide and supports interactions with both bots and tabs for enhanced user engagement. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs) | NA|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/python) |
| Tab app navigation | This sample illustrates the tab navigation feature in a Microsoft Teams application, enabling smooth transitions between different tabs. Designed for use with Node.js, it highlights how users can effectively navigate within the app for an enhanced experience. | NA | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-app-navigation/nodejs) | NA|NA|
| Tab deep link pass values | This sample app for Microsoft Teams illustrates the creation and usage of dynamic deep links to pass contextual values to tab and standalone web applications. It highlights the differences in link formatting and consumption based on the user's access environment, enhancing navigation and data display capabilities. | NA | NA | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink-pass-values/ts)|NA|
6 changes: 3 additions & 3 deletions msteams-platform/concepts/build-and-test/deep-link-teams.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ groupId: "ae063b79-5315-4ddb-ba70-27328ba6c31e"

## Code Sample

| Sample name | Description | .NET |Node.js|
|-------------|-------------|------|----|
|Deep link consuming Subentity ID | This Teams sample application highlights deeplinks for various functionalities, such as initiating calls, chats, and navigating within tabs and apps. It features a comprehensive setup guide and supports interactions with both bots and tabs for enhanced user engagement. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs)|
| Sample name | Description | .NET |Node.js| Python|
|-------------|-------------|------|----|----|
|Deep link consuming Subentity ID | This Teams sample application highlights deeplinks for various functionalities, such as initiating calls, chats, and navigating within tabs and apps. It features a comprehensive setup guide and supports interactions with both bots and tabs for enhanced user engagement. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/csharp)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/python)|
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,6 @@ Teams app can read the URL for joining a meeting URL through Graph APIs. This de

## Code sample

| Sample name | Description | .NET |Node.js|
|-------------|-------------|------|----|
|Deep link consuming Subentity ID | This Teams sample application highlights deeplinks for various functionalities, such as initiating calls, chats, and navigating within tabs and apps. It features a comprehensive setup guide and supports interactions with both bots and tabs for enhanced user engagement. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs) |
| Sample name | Description | .NET |Node.js|Python|
|-------------|-------------|------|----|----|
|Deep link consuming Subentity ID | This Teams sample application highlights deeplinks for various functionalities, such as initiating calls, chats, and navigating within tabs and apps. It features a comprehensive setup guide and supports interactions with both bots and tabs for enhanced user engagement. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/python) |
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ The following are the launcher.js definitions:

## Code sample

| **Sample name** | **Description** | **Node.js** |
|-----------------|-----------------|----------------|
| Share to Teams | This Teams sample application illustrates how to use deeplinks for initiating calls, video chats, and navigating within various app tabs. It includes detailed setup instructions and supports interactions with bots and tabs to enhance user experience. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs) |
| **Sample name** | **Description** | **.Net** | **Node.js** | **Python** |
|-----------------|-----------------|----------------|----------------|----------------|
| Share to Teams | This Teams sample application illustrates how to use deeplinks for initiating calls, video chats, and navigating within various app tabs. It includes detailed setup instructions and supports interactions with bots and tabs to enhance user experience. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/nodejs) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-deeplink/python) |

## See also

Expand Down
4 changes: 2 additions & 2 deletions msteams-platform/concepts/build-and-test/shared-channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ If you're developing an app for use in federated group chats with external users

## Code sample

| Sample name | Description | Node.js |
| Sample name | Description | Node.js | Python |
|-------------|-------------|------|----|
| Teams Conversation Bot | This sample app displays the names of the members in a federated group chat with external users. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-feed-members/nodejs/)|
| Teams Conversation Bot | This sample app displays the names of the members in a federated group chat with external users. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-feed-members/nodejs)| [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-feed-members/python) |

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,9 @@ If you don't want your app to be blocked by default, update the `defaultBlockUnt

## Code sample

|**Sample name** | **Description** | **.NET** | **Node.js** | **Manifest**|
|----------------|-----------------|--------------|----------------|-----------|
| Hello world | A Microsoft Teams Hello World sample app built with .NET/C# that demonstrates essential features like tabs, bots, and messaging extensions for seamless interaction within the Teams environment. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-hello-world/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-hello-world/nodejs) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-hello-world/csharp/demo-manifest/app-hello-world.zip)|

|**Sample name** | **Description** | **.NET** | **Node.js** | **Python** | **Manifest**|
|----------------|-----------------|--------------|----------------|-----------|-----------|
| Hello world | A Microsoft Teams Hello World sample app built with .NET/C# that demonstrates essential features like tabs, bots, and messaging extensions for seamless interaction within the Teams environment. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-hello-world/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-hello-world/nodejs) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-hello-world/python) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-hello-world/csharp/demo-manifest/app-hello-world.zip)|

## Next step

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ Device permissions are stored for every sign in session. It means that if you si

## Code sample

| Sample name | Description | Node.js | Manifest
|---------------------|--------------|---------|---------|
|Device permissions | This sample app for Microsoft Teams demonstrates how to handle device permissions, including audio, video, and geolocation, within a tab interface. It provides insights into device permission usage across desktop and mobile views, allowing developers to enhance user interactions effectively. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-device-permissions/nodejs)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-device-permissions/nodejs/demo-manifest/tab-device-permissions.zip)
| Sample name | Description | Node.js | Python | Manifest
|---------------------|--------------|---------|---------|---------|
|Device permissions | This sample app for Microsoft Teams demonstrates how to handle device permissions, including audio, video, and geolocation, within a tab interface. It provides insights into device permission usage across desktop and mobile views, allowing developers to enhance user interactions effectively. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-device-permissions/nodejs)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-device-permissions/python)|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/tab-device-permissions/nodejs/demo-manifest/tab-device-permissions.zip)

## Next step

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,56 @@ server.get('/api/notify', async (req, res) => {
});
```

# [Python](#tab/python)

* [SDK reference](/python/api/botbuilder-core/botbuilder.core.cloudadapterbase?view=botbuilder-py-latest#botbuilder-core-cloudadapterbase-continue-conversation&preserve-view=true)
* [Sample code reference](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/5e1d0e4c28a8b2c2205aaa8004e40a99f6bdbd58/samples/bot-conversation/python/bots/teams_conversation_bot.py#L172)

```python
async def _message_all_members(self, turn_context: TurnContext):
team_members = await self._get_paged_members(turn_context)

for member in team_members:
conversation_reference = TurnContext.get_conversation_reference(
turn_context.activity
)

conversation_parameters = ConversationParameters(
is_group=False,
bot=turn_context.activity.recipient,
members=[member],
tenant_id=turn_context.activity.conversation.tenant_id,
)

async def get_ref(tc1):
conversation_reference_inner = TurnContext.get_conversation_reference(
tc1.activity
)
return await tc1.adapter.continue_conversation(
conversation_reference_inner, send_message, self._app_id
)

async def send_message(tc2: TurnContext):
return await tc2.send_activity(
f"Hello {member.name}. I'm a Teams conversation bot."
) # pylint: disable=cell-var-from-loop

await turn_context.adapter.create_conversation(
conversation_reference, get_ref, conversation_parameters
)

await turn_context.send_activity(
MessageFactory.text("All messages have been sent")
)
```

---

## Code sample

| **Sample Name** | **Description** | **.NET** | **Node.js** |
|---------------|--------------|--------|-------------|
| Proactive installation of app and sending proactive notifications | This sample application demonstrates proactive installation of a Teams app and sending notifications to users using Microsoft Graph APIs. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-proactive-installation/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-proactive-installation/nodejs) |
| **Sample Name** | **Description** | **.NET** | **Node.js** | **Python** |
|---------------|--------------|--------|-------------|-------------|
| Proactive installation of app and sending proactive notifications | This sample application demonstrates proactive installation of a Teams app and sending notifications to users using Microsoft Graph APIs. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-proactive-installation/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-proactive-installation/nodejs) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-proactive-installation/python) |

## Additional code samples
>
Expand Down
Loading