Updates from: 07/07/2021 03:10:59
Service Microsoft Docs article Related commit history on GitHub Change details
platform Send Proactive Messages https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/bots/how-to/conversations/send-proactive-messages.md
See [install apps for users](/graph/api/userteamwork-post-installedapps) in the
## Samples
-The following code shows a simple code sample that proactively installs your app using Graph:
+The following code shows how to send proactive messages:
# [C#](#tab/dotnet)
The following table provides a simple code sample that incorporate basic convers
||--|--|-|--| | Teams Conversation Basics | Demonstrates basics of conversations in Teams, including sending one-to-one proactive messages.| [View](https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/csharp_dotnetcore/57.teams-conversation-bot) | [View](https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/57.teams-conversation-bot) | [View](https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/python/57.teams-conversation-bot) | | Start new thread in a channel | Demonstrates creating a new thread in a channel. | [View](https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/csharp_dotnetcore/58.teams-start-new-thread-in-channel) | [View](https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/javascript_nodejs/58.teams-start-new-thread-in-channel) | [View](https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/python/58.teams-start-thread-in-channel) |
+| Proactive installation of app and sending proactive notifications | This sample shows how you can use proactive installation of app for users and send proactive notifications by calling 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) | |
### Additional code sample
platform Graph Proactive Bots And Messages https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/graph-api/proactive-bots-and-messages/graph-proactive-bots-and-messages.md
When your app is installed for the user, the bot receives a `conversationUpdate`
Your bot can [send proactive messages](/azure/bot-service/bot-builder-howto-proactive-message?view=azure-bot-service-4.0&tabs=csharp&preserve-view=true) after the bot has been added for a user or a team, and has received all the user information.
+## Code sample
+
+| **Sample Name** | **Description** | **.NET** | **Node.js** |
+||--|--|-|--|
+| Proactive installation of app and sending proactive notifications | This sample shows how you can use proactive installation of app for users and send proactive notifications by calling 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) |
+ ## See also * [**Manage app setup policies in Microsoft Teams**](/MicrosoftTeams/teams-app-setup-policies#create-a-custom-app-setup-policy)
Your bot can [send proactive messages](/azure/bot-service/bot-builder-howto-proa
## Additional code samples > > [!div class="nextstepaction"]
-> [**Teams proactive messaging code samples**](/samples/officedev/msteams-samples-proactive-messaging/msteams-samples-proactive-messaging/)
+> [**Teams proactive messaging code samples**](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-proactive-messaging/csharp)
platform Configuration Page https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/tabs/how-to/create-tab-pages/configuration-page.md
The following code is an example of corresponding code for the configuration pag
```html <head>
-<script src='https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js'></script>
+ <script src='https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js'></script>
</head>
- <body>
- <button onclick="(document.getElementById('icon').src = '/images/iconGray.png'); colorClickGray()">Select Gray</button>
- <img id="icon" src="/images/teamsIcon.png" alt="icon" style="width:100px" />
- <button onclick="(document.getElementById('icon').src = '/images/iconRed.png'); colorClickRed()">Select Red</button>
-
- <script>
- microsoftTeams.initialize();
- let saveGray = () => {
- microsoftTeams.settings.registerOnSaveHandler((saveEvent) => {
- microsoftTeams.settings.setSettings({
- websiteUrl: "https://yourWebsite.com",
- contentUrl: "https://yourWebsite.com/gray",
- entityId: "grayIconTab",
- suggestedDisplayName: "MyNewTab"
- });
- saveEvent.notifySuccess();
+<body>
+ <button onclick="(document.getElementById('icon').src = '/images/iconGray.png'); colorClickGray()">Select Gray</button>
+ <img id="icon" src="/images/teamsIcon.png" alt="icon" style="width:100px" />
+ <button onclick="(document.getElementById('icon').src = '/images/iconRed.png'); colorClickRed()">Select Red</button>
+
+ <script>
+ microsoftTeams.initialize();
+ let saveGray = () => {
+ microsoftTeams.settings.registerOnSaveHandler((saveEvent) => {
+ microsoftTeams.settings.setSettings({
+ websiteUrl: "https://yourWebsite.com",
+ contentUrl: "https://yourWebsite.com/gray",
+ entityId: "grayIconTab",
+ suggestedDisplayName: "MyNewTab"
});
- }
- let saveRed = () => {
- microsoftTeams.settings.registerOnSaveHandler((saveEvent) => {
- microsoftTeams.settings.setSettings({
- websiteUrl: "https://yourWebsite.com",
- contentUrl: "https://yourWebsite.com/red",
- entityId: "redIconTab",
- suggestedDisplayName: "MyNewTab"
- });
- saveEvent.notifySuccess();
+ saveEvent.notifySuccess();
+ });
+ }
+ let saveRed = () => {
+ microsoftTeams.settings.registerOnSaveHandler((saveEvent) => {
+ microsoftTeams.settings.setSettings({
+ websiteUrl: "https://yourWebsite.com",
+ contentUrl: "https://yourWebsite.com/red",
+ entityId: "redIconTab",
+ suggestedDisplayName: "MyNewTab"
});
- }
-
- let gr = document.getElementById("gray").style;
- let rd = document.getElementById("red").style;
-
- const colorClickGray = () => {
- gr.display = "block";
- rd.display = "none";
- microsoftTeams.settings.setValidityState(true);
- saveGray()
- }
-
- const colorClickRed = () => {
- rd.display = "block";
- gr.display = "none";
- microsoftTeams.settings.setValidityState(true);
- saveRed();
- }
- </script>
- </body>
-...
+ saveEvent.notifySuccess();
+ });
+ }
+
+ let gr = document.getElementById("gray").style;
+ let rd = document.getElementById("red").style;
+
+ const colorClickGray = () => {
+ gr.display = "block";
+ rd.display = "none";
+ microsoftTeams.settings.setValidityState(true);
+ saveGray()
+ }
+
+ const colorClickRed = () => {
+ rd.display = "block";
+ gr.display = "none";
+ microsoftTeams.settings.setValidityState(true);
+ saveRed();
+ }
+ </script>
+ ...
+</body>
``` Choose either **Select Gray** or **Select Red** button in the configuration page, to display the tab content with a gray or red icon.