Updates from: 06/23/2023 03:01:16
Service Microsoft Docs article Related commit history on GitHub Change details
platform Build Basic Tab App https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/get-started/build-basic-tab-app.md
Title: Build your basic tab app description: Build your basic tab app ms.localizationpriority: high Last updated : 06/07/2023 + # Build your basic tab app
-Tabs are Teams-aware webpages embedded in Microsoft Teams. You can add them as part of a channel inside a team, group chat, or personal app for an individual user. Start Microsoft Teams app development with your first Teams tab app.
+Tabs are Teams-aware webpages embedded in Microsoft Teams and a good way to begin developing for Teams. You can add them as part of a channel inside a team, group chat, or personal app for an individual user.
:::image type="content" border="false" source="../assets/images/get-started/get-started-tab.png" alt-text="Screenshot shows you the conceptual tab app in Teams client.":::
-In this tutorial, get familiarized with a basic Teams tab app in one of the following ways:
+In this tutorial, you'll learn about a basic Teams tab app in one of the following ways:
* **GitHub Codespaces**: The codespace instance allows you to experience a Teams app instantaneously. It opens Visual Studio Code (VS Code), where the Teams Toolkit extension, the app source code, and all the dependencies are pre-packaged for you.
-* **Step-by-step guide**: Allows you to create a Teams app from scratch with all development environment setup.
+* **Step-by-step guide**: Allows you to set up your development environment and create a Teams app from start.
# [GitHub Codespaces](#tab/teamstoolkitcodespaces)
-Before you create your codespace, ensure that you have:
+Before you create your codespace, ensure that you have the following prerequisites:
-* A GitHub account to create your codespace instance.
-* A [Microsoft 365 account](https://developer.microsoft.com/microsoft-365/dev-program) with sideloading permission.
+* A GitHub account to create your codespace instance
+* A [Microsoft 365 account](https://developer.microsoft.com/microsoft-365/dev-program) with sideloading permission
* A [Microsoft 365 tenant](../concepts/build-and-test/prepare-your-o365-tenant.md) > [!TIP]
-> [GitHub Codespaces](https://github.com/features/codespaces) offers free plan up to a fixed amount of usage every month. If you need to free up the space, go to [github.com/codespaces](https://github.com/codespaces) and delete the codespace that you no longer need.
+>
+> [GitHub Codespaces](https://github.com/features/codespaces) offers a free plan with a fixed amount of usage per month. If you need to free up more space, go to [github.com/codespaces](https://github.com/codespaces) and delete the codespace that you no longer need.
-To create a Teams tab app with GitHub Codespaces, follow the steps:
+To create a Teams tab app with GitHub Codespaces, follow these steps:
1. Select the following button to open GitHub Codespaces. <a href="https://github.com/codespaces/new?hide_repo_select=true&ref=v3&repo=348288141&machine=standardLinux32gb&location=WestUs2&devcontainer_path=.devcontainer%2Fhello-world-tab-codespaces%2Fdevcontainer.json&resume=1" target="_blank"><img src="https://github.com/codespaces/badge.svg" alt="Open hello-world tab in GitHub Codespaces"></a>
- You might be asked to sign in to GitHub account if you haven't.
+ You might be asked to sign in to GitHub account if you haven't already.
1. Select **Create new codespace**.
- :::image type="content" source="../assets/images/get-started/codespace.png" alt-text="Screenshot shows you the GitHub page to create a codespace for tab."lightbox="../assets/images/get-started/codespace.png":::
+ :::image type="content" source="../assets/images/get-started/codespace.png" alt-text="Screenshot shows you the GitHub page to create a codespace for tab.":::
The **Setting up your codespace** page appears.
- :::image type="content" source="../assets/images/get-started/building-codespace.png" alt-text="Screenshot shows you the codespace building your tab."lightbox="../assets/images/get-started/building-codespace.png":::
+ :::image type="content" source="../assets/images/get-started/building-codespace.png" alt-text="Screenshot shows you the codespace building your tab.":::
- Teams Toolkit prepares the tab app project for you and opens it in VS Code in the browser. Teams Toolkit icon appears in the activity bar of VS Code.
+ Teams Toolkit prepares the tab app project for you and opens it in VS Code in the browser. The Teams Toolkit icon appears in the activity bar of VS Code.
1. Select **Sign in to your Microsoft 365** and **Sign in to Azure** to sign in with your Microsoft 365 account.
To create a Teams tab app with GitHub Codespaces, follow the steps:
> [!NOTE] >
- > When you build your app, GitHub Codespaces loads it to Teams client in a new tab. If your browser blocks pop-up tabs or windows, you'll need to allow pop-ups to let your app open.
+ > When you build your app, GitHub Codespaces loads it to the Teams client in a new tab. If your browser blocks pop-up tabs or windows, you'll need to allow pop-ups for your app to open.
1. Select **Preview your Teams App (F5)** to build your tab app. :::image type="content" source="../assets/images/get-started/toolkit-in-browser.png" alt-text="Screenshot shows you the Teams Toolkit window in browser with your tab app."lightbox="../assets/images/get-started/toolkit-in-browser.png":::
- GitHub Codespaces builds your tab app, loads it to Teams client, and opens in another browser tab or window.
+ GitHub Codespaces builds your tab app, loads it to Teams client, and opens it in a separate browser tab.
1. When the app dialog appears, select **Add** to install your tab app in Teams.
To create a Teams tab app with GitHub Codespaces, follow the steps:
# [Step-by-step guide](#tab/step-by-step-guide)
-If you would want to learn how to start a project with Teams Toolkit from scratch, let's go through the step-by-step guide.
-
-Unlike GitHub Codespaces, you need to set up your development environment. Let's start building your basic tab app.
+If you want to learn how to start a project with Teams Toolkit from the beginning, you'll need to set up your development environment. Select the following button to start building your basic tab app.
> [!div class="nextstepaction"] > [Start building a basic tab app](../sbs-gs-javascript.yml)
-If a bot is what you're interested in, go to:
+If a bot is what you're interested in, select the following:
> [!div class="nextstepaction"] > [Start building a bot](build-notification-bot.md)
-If you want to build a message extension app, go to:
+If you want to build a message extension app, select the following:
> [!div class="nextstepaction"] > [Build message extension](build-message-extension.md)
platform Build Message Extension https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/get-started/build-message-extension.md
Title: Build message extension description: In this module, learn how to build your first message extension for your Teams app. ms.localizationpriority: medium Last updated : 06/07/2023
In this tutorial, you'll learn to build a search-based message extension app, an
Get familiarized with search based message extension app in one of the following ways: * **GitHub Codespaces**: The codespace instance allows you to experience a Teams app instantaneously. It opens Visual Studio Code (VS Code), where the Teams Toolkit extension, the app source code, and all the dependencies are pre-packaged for you.
-* **Step-by-step guide**: Allows you to create a Teams app from scratch with all development environment setup.
+* **Step-by-step guide**: Allows you to set up your development environment and build a Teams app from start.
# [GitHub Codespaces](#tab/teamstoolkitcodespaces)
-Before you create your codespace, ensure that you have:
+Before you create your codespace, ensure that you have the following prerequisites:
-* A GitHub account to create your codespace instance.
-* A [Microsoft 365 account](https://developer.microsoft.com/microsoft-365/dev-program) with sideloading permission.
+* A GitHub account to create your codespace instance
+* A [Microsoft 365 account](https://developer.microsoft.com/microsoft-365/dev-program) with sideloading permission
* A [Microsoft 365 tenant](../concepts/build-and-test/prepare-your-o365-tenant.md) > [!TIP]
-> [GitHub Codespaces](https://github.com/features/codespaces) offers free plan up to a fixed amount of usage every month. If you need to free up the space, go to [github.com/codespaces](https://github.com/codespaces) and delete the codespaces that you no longer need.
+> [GitHub Codespaces](https://github.com/features/codespaces) offers free plan up to a fixed amount of usage per month. If you need to free up more space, go to [github.com/codespaces](https://github.com/codespaces) and delete the codespaces that you no longer need.
-To create a search-based message extension app with GitHub Codespaces, follow the steps:
+To create a search-based message extension app with GitHub Codespaces, follow these steps:
1. Select the following button to open GitHub Codespaces. <a href="https://github.com/codespaces/new?hide_repo_select=true&ref=v3&repo=348288141&machine=basicLinux32gb&location=WestUs2&devcontainer_path=.devcontainer%2Fnpm-search-message-extension-codespaces%2Fdevcontainer.json&resume=1" target="_blank"><img src="https://github.com/codespaces/badge.svg" alt="Open message extension in GitHub Codespaces"></a>
- You might be asked to sign in to GitHub account if you haven't.
+ You might be asked to sign in to GitHub account if you haven't already.
1. Select **Create new codespace**.
- :::image type="content" source="../assets/images/get-started/codespace.png" alt-text="Screenshot shows you the GitHub page to create a codespace for message extension."lightbox="../assets/images/get-started/codespace.png":::
+ :::image type="content" source="../assets/images/get-started/codespace.png" alt-text="Screenshot shows you the GitHub page to create a codespace for message extension.":::
The **Setting up your codespace** page appears. :::image type="content" source="../assets/images/get-started/building-codespace.png" alt-text="Screenshot shows you the codespace building your message extension.":::
- Teams Toolkit prepares the message extension for you and opens it in VS Code in the browser. Teams Toolkit icon appears in the activity bar of VS Code.
+ Teams Toolkit prepares the message extension for you and opens it in VS Code in the browser. The Teams Toolkit icon appears in the activity bar of VS Code.
1. Select **Sign in to your Microsoft 365** and **Sign in to Azure** to sign in with your Microsoft 365 account.
To create a search-based message extension app with GitHub Codespaces, follow th
> [!NOTE] >
- > When you build your app, GitHub Codespaces loads it to Teams client in a new tab. If your browser blocks pop-up tabs or windows, you'll need to allow pop-ups to let your app open.
+ > When you build your app, GitHub Codespaces loads it to the Teams client in a new tab. If your browser blocks pop-up tabs or windows, you'll need to allow pop-ups for your app to open.
1. Select **Preview your Teams App (F5)** to build your message extension. :::image type="content" source="../assets/images/get-started/codespace/me-preview-teams.png" alt-text="Screenshot shows you the Teams Toolkit window in browser with your message extension."lightbox="../assets/images/get-started/codespace/me-preview-teams.png":::
- GitHub Codespaces builds your message extension app, loads it to Teams client, and opens in another browser tab or window.
+ GitHub Codespaces builds your message extension app, loads it to Teams client, and opens in a separate browser tab.
Your message extension app is sideloaded to Teams.
To create a search-based message extension app with GitHub Codespaces, follow th
# [Step-by-step guide](#tab/step-by-step-guide)
-If you would want to learn how to start a project with Teams Toolkit from scratch, let's go through the step-by-step guide.
-
-Unlike GitHub Codespaces, you need to set up your development environment. Let's start building your message extension app.
+If you want to learn how to start a project with Teams Toolkit from the beginning, you'll need to set up your development environment. Select the following button to start building your message extension app.
> [!div class="nextstepaction"] > [Build your first message extension app using JavaScript](../sbs-gs-msgext.yml)
Unlike GitHub Codespaces, you need to set up your development environment. Let's
For more information on message extensions, see [message extensions](../messaging-extensions/what-are-messaging-extensions.md).
-If a bot is what you are interested in, go to:
+If a bot is what you are interested in, select the following:
> [!div class="nextstepaction"] > [Start building a bot](build-notification-bot.md)
-If you want to build basic tab app, go to:
+If you want to build basic tab app, select the following:
> [!div class="nextstepaction"] > [Build your basic tab app](build-basic-tab-app.md)
platform Build Notification Bot https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/get-started/build-notification-bot.md
Title: Build notification bot description: Sends messages in Teams channel or group chat or personal chat. ms.localizationpriority: medium Last updated : 06/07/2023 + # Build notification bot
-The notification bot proactively sends messages in Teams channel or group chat or personal chat. You can trigger the notification bot with an HTTP request, such as cards or texts.
+The notification bot proactively sends messages in a Teams channel, group chat, or personal chat. You can trigger the notification bot with an HTTP request, such as cards or texts.
:::image type="content" border="false" source="../assets/images/get-started/get-started-bot.png" alt-text="Screenshot shows you the conceptual notification bot in Teams client":::
-In this tutorial, get familiarized with a notification bot app in one of the following ways:
+In this tutorial, you'll learn about a notification bot app in one of the following ways.
-* **GitHub Codespaces**: The codespace instance allows you to experience a Teams app instantaneously. It opens Visual Studio Code (VS Code), where the Teams Toolkit extension, the app source code, and all the dependencies are pre-packaged for you.
-* **Step-by-step guide**: Allows you to create a Teams app from scratch with all development environment setup.
+* **GitHub Codespaces**: The codespace instance allows you to experience a Teams app instantaneously. It opens Visual Studio Code (VS Code) where the Teams Toolkit extension, the app source code, and all the dependencies are pre-packaged for you.
+* **Step-by-step guide**: Allows you to set up your development environment and build a Teams app from the start.
# [GitHub Codespaces](#tab/teamstoolkitcodespaces)
-Before you create your codespace, ensure that you have:
+Before you create your codespace, ensure that you have the following prerequisites:
-* A GitHub account to create your codespace instance.
-* A [Microsoft 365 account](https://developer.microsoft.com/microsoft-365/dev-program) with sideloading permission.
+* A GitHub account to create your codespace instance
+* A [Microsoft 365 account](https://developer.microsoft.com/microsoft-365/dev-program) with sideloading permission
* A [Microsoft 365 tenant](../concepts/build-and-test/prepare-your-o365-tenant.md) > [!TIP]
-> [GitHub Codespaces](https://github.com/features/codespaces) offers free plan up to a fixed amount of usage every month. If you need to free up the space, go to [github.com/codespaces](https://github.com/codespaces) and delete the codespace that you no longer need.
+>
+> [GitHub Codespaces](https://github.com/features/codespaces) offers a free plan with a fixed amount of usage per month. If you need to free up more space, go to [github.com/codespaces](https://github.com/codespaces) and delete the codespace that you no longer need.
-To create a Teams notification bot with GitHub Codespaces, follow the steps:
+To create a Teams notification bot with GitHub Codespaces, follow these steps:
1. Select the following button to open GitHub Codespaces. <a href="https://github.com/codespaces/new?hide_repo_select=true&ref=v3&repo=348288141&machine=basicLinux32gb&location=WestUs2&devcontainer_path=.devcontainer%2Fnotification-codespaces%2Fdevcontainer.json&resume=1" target="_blank"><img src="https://github.com/codespaces/badge.svg" alt="Open hello-world tab in GitHub Codespaces"></a>
- You might be asked to sign in to GitHub account if you haven't.
+ You might be asked to sign in to GitHub account if you haven't already.
1. Select **Create new codespace**.
- :::image type="content" source="../assets/images/get-started/codespace.png" alt-text="Screenshot shows you the GitHub page to create a codespace for bot."lightbox="../assets/images/get-started/codespace.png":::
+ :::image type="content" source="../assets/images/get-started/codespace.png" alt-text="Screenshot shows you the GitHub page to create a codespace for bot.":::
The **Setting up your codespace** page appears. :::image type="content" source="../assets/images/get-started/building-codespace.png" alt-text="Screenshot shows you the codespace building your notification bot.":::
- Teams Toolkit prepares the notification bot project for you and opens it in VS Code in the browser. Teams Toolkit icon appears in the activity bar of VS Code.
+ Teams Toolkit prepares the notification bot project for you and opens it in VS Code in the browser. The Teams Toolkit icon appears in the activity bar of VS Code.
1. Select **Sign in to your Microsoft 365** and **Sign in to Azure** to sign in with your Microsoft 365 account.
To create a Teams notification bot with GitHub Codespaces, follow the steps:
> [!NOTE] >
- > When you build your app, GitHub Codespaces loads it to Teams client in a new tab. If your browser blocks pop-up tabs or windows, you'll need to allow pop-ups to let your app open.
+ > When you build your app, GitHub Codespaces loads it to the Teams client in a new tab. If your browser blocks pop-up tabs or windows, you'll need to allow pop-ups for your app to open.
1. Select **Preview your Teams App (F5)** to build your notification bot. :::image type="content" source="../assets/images/get-started/toolkit-in-browser.png" alt-text="Screenshot shows you the Teams Toolkit window in browser with your notification bot."lightbox="../assets/images/get-started/toolkit-in-browser.png":::
- GitHub Codespaces builds your notification bot app, loads it to Teams client, and opens in another browser tab or window.
+ GitHub Codespaces builds your notification bot app, loads it to Teams client, and opens it in a separate browser tab.
1. Once the app dialog appears, select **Add** to install your notification bot in Teams.
To create a Teams notification bot with GitHub Codespaces, follow the steps:
curl -X POST http://localhost:3978/api/notification ```
- > [!Tip]
- >
- > In real time, events are triggered by an external source, such as a third-party API that cause the notification bot to send the user a notification. To emulate an event trigger, you can send an event manually via curl commands on terminal.
+ > [!TIP]
+ >
+ > In real time, events are triggered by an external source, such as a third-party API that cause the notification bot to send the user a notification. To emulate an event trigger, you can send an event manually via curl commands on terminal.
The notification bot app sends a notification as an Adaptive Card to your Teams client: :::image type="content" source="../assets/images/get-started/codespace/notification-bot.png" alt-text="Screenshot shows your notification bot loaded in the Teams client.":::
- You've successfully created the notification bot and loaded it in the Teams client.
+ You've now successfully created the notification bot and loaded it in the Teams client.
# [Step-by-step guide](#tab/step-by-step-guide)
-If you would want to learn how to start a project with Teams Toolkit from scratch, let's go through the step-by-step guide.
-
-Unlike GitHub Codespaces, you need to set up your development environment. Let's start building your notification bot app.
+If you want to learn how to start a project with Teams Toolkit from the beginning, you'll need to set up your development environment. Select the following button to start building you notification bot.
> [!div class="nextstepaction"] > [Start building a notification bot](../sbs-gs-notificationbot.yml)
-If you want to build a message extension, go to:
+If you want to build a message extension, select the following:
> [!div class="nextstepaction"] > [Build message extension](build-message-extension.md)
-If you want to build basic tab app, go to:
+If you want to build basic tab app, select the following:
> [!div class="nextstepaction"] > [Build your basic tab app](build-basic-tab-app.md)
platform Choose What Suits You https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/get-started/choose-what-suits-you.md
Title: Choose what suits you description: In this module, learn more about the tools and SDKs available for you to build a Microsoft Teams app ms.localizationpriority: high Last updated : 06/07/2023 # Choose what suits you
-You've built your first tab app, notification bot, and message extension. You can build a Teams app as per your app's requirements. Based on the factors, such as business needs, development environment, and domain knowledge, select the environment and tools to build your app.
+You've built your first tab app, notification bot, and message extension. You can build a Teams app as per your app's requirements. Based on factors such as business needs, development environment, and domain knowledge, select the environment and tools to build your app.
A Teams app offers you the flexibility of choosing your build environment. It includes tools, framework, and languages to approach your app development. Build your Teams app in the environment that's best suited for your app. You can even select a combination. For example, you can use Teams Toolkit to build an app with JavaScript and host it on a SharePoint site.
-This section takes you through the various options that you have for building your Teams app.
+This section takes you through the various options for building your Teams app.
* [Teams collaborative platform](#teams-collaborative-platform) * [Tools and SDKs](#tools-and-sdks)
This section takes you through the various options that you have for building yo
As a collaborative platform for building apps, Teams offers the full range of apps and tools. Teams platform supports your app development at every stage from planning to distributing it.
-You can use various tools and services to build your app. An example development flow can be:
+You can use various tools and services to build your app. Following is an example development flow.
1. Plan your project and figure out the requirement. 1. Design your app. Use Teams UI Kit and UI Library for designing tabs UI.
You can build your Microsoft Teams app with the help of the following tools and
:::image type="content" source="../assets/images/overview/choose-what-you-need.png" alt-text="Flow chart shows you the SDKs and tools you need to build your Teams app."lightbox="../assets/images/overview/choose-what-you-need.png":::
-To start building your Teams app, you can select the tools and SDKs based on your app requirements:
+To start building your Teams app, you can select the tools and SDKs based on your app requirements.
-1. **App capabilities**: Choose the capabilities for your app. You can choose a single or a combination of capabilities based on your app requirements.
-1. **SDKs you need**: Choose the SDKs based on the capability that you're building for your app. For example, if you're building AI capability for your bot app, you must select Teams AI library.
+1. **App capabilities**: You can choose a single or a combination of capabilities based on your app requirements.
+1. **SDKs you need**: For example, if you're building AI capability for your bot app, you select Teams AI library.
1. **UI Components**: Choose the UI components to design your app based on your app capability. 1. **Languages**: Choose the language in which you want to build your app.
-1. **Recommended Tools**: Choose the tools based on the language that you've selected. You can also use Developer Portal to manage and publish your app. Teams Toolkit allows you to build your app with JavaScript, TypeScript, or C# in Visual Studio Code (VS Code) or Visual Studio.
+1. **Recommended Tools**: Choose the tools based on the language that you've selected. You can also use the Teams Developer Portal to manage and publish your app. The Teams Toolkit allows you to build your app with JavaScript, TypeScript, or C# in Visual Studio Code (VS Code) or Visual Studio.
| App capabilities | User interactions | Recommended tools | SDKs | Languages | |--|-|--|--|--|
You can also create and build your Teams app with various SDKs. Teams supports a
The following tools in the Teams platform help you during app development: | App development phase | Teams platform tools |
-|--|-|
+|--|--|
| Design | Teams UI kit and Teams UI library | | Build | Teams Toolkit, Tools and SDKs, and Microsoft Graph | | Test, deploy, and publish |Azure Active Directory (Azure AD) and Developer Portal | | Distribute | Partner Center and Teams store |
-<!--
-
-Choose the best tools and SDKs for building a new Teams app.
-
-* [SDKs and libraries to build Teams app](#sdks-and-libraries-to-build-teams-app)
-* [Azure AD-secured REST APIs](#azure-ad-secured-rest-apis)
-* [Tools](#tools)
--
-## SDKs and libraries to build Teams app
-
-### TeamsFx SDK
-
-TeamsFx helps to reduce your tasks by using Microsoft Teams single sign-on (SSO) and accessing cloud resources down to single line statements with zero configuration.
-
-> [!div class="nextstepaction"]
-> [TeamsFx SDK](~/toolkit/teamsfx-sdk.md)
-
-### Teams JavaScript client library
-
-The Microsoft Teams JavaScript client library (TeamsJS) can help you create hosted experiences in Teams, Microsoft 365 app, and Outlook, where your app content is hosted in an iFrame.
-
-> [!div class="nextstepaction"]
-> [Teams JavaScript client library](~/tabs/how-to/using-teams-client-library.md)
-
-### Microsoft Graph SDKs
-
-The Microsoft Graph SDKs are designed to simplify building high-quality, efficient, and resilient applications that access Microsoft Graph.
-
-> [!div class="nextstepaction"]
-> [Microsoft Graph SDKs](/graph/sdks/sdks-overview)
-
-### Bots SDK (v3)
-
-Build and connect intelligent bots to interact with Microsoft Teams users naturally through chat.
-
-> [!div class="nextstepaction"]
-> [Bots SDK (v3)](~/resources/bot-v3/bots-overview.md)
-
-### Message extension SDK (v3)
-
-Message extensions are a powerful way for users to engage with your app from Microsoft Teams.
-
-> [!div class="nextstepaction"]
-> [Plan your app](~/resources/messaging-extension-v3/messaging-extensions-overview.md)
-
-### Microsoft Authentication Library (MSAL)
-
-The Microsoft Authentication Library (MSAL) enables developers to acquire security tokens from the Microsoft identity platform to authenticate users and access secured web APIs.
-
-> [!div class="nextstepaction"]
-> [Microsoft Authentication Library (MSAL)](/azure/active-directory/develop/msal-overview)
-
-### SharePoint Framework (SPFx)
-
-The SharePoint Framework (SPFx) is a page and web part model that provides full support for client-side SharePoint development, easy integration with SharePoint data, and extending Microsoft Teams and Microsoft Viva.
-
-> [!div class="nextstepaction"]
-> [SharePoint Framework (SPFx)](/sharepoint/dev/spfx/sharepoint-framework-overview)
-
-### Live Share SDK
-
-Live Share is an SDK designed to transform Teams apps into collaborative multi-user experiences without writing any dedicated back-end code.
-
-> [!div class="nextstepaction"]
-> [Live Share SDK](~/apps-in-teams-meetings/teams-live-share-overview.md)
-
-## Azure AD-secured REST APIs
-
-### Microsoft Graph
-
-Microsoft Graph is the gateway to data and intelligence in Microsoft 365. It provides a unified programmability model that you can use to access the tremendous amount of data in Microsoft 365, Windows, and Enterprise Mobility + Security. Use the wealth of data in Microsoft Graph to build apps for organizations and consumers that interact with millions of users.
-
-> [!div class="nextstepaction"]
-> [Microsoft Graph](/graph/sdks/sdks-overview)
-
-### Azure Active Directory
-
-Azure Active Directory (Azure AD) is a cloud-based identity and access management service. Azure AD enables your employees access external resources, such as Microsoft 365, the Azure portal, and thousands of other SaaS applications. Azure AD also helps them access internal resources like apps on your corporate intranet, and any cloud apps developed for your own organization.
-
-> [!div class="nextstepaction"]
-> [Azure Active Directory](/azure/active-directory/fundamentals/active-directory-whatis)
-
-### Azure Bot Service
-
-Azure Bot Service is a collection of libraries, tools, and services that let you build, test, deploy, and manage intelligent bots.
-
-> [!div class="nextstepaction"]
-> [Azure Bot Services](/azure/bot-service/bot-service-overview?view=azure-bot-service-4.0)
-
-### Azure OpenAI
-
-Azure OpenAI Service provides REST API access to OpenAI's powerful language models including the GPT-3, Codex and Embeddings model series. In addition, the new GPT-4 and ChatGPT (gpt-35-turbo) model series are now available in preview. These models can be easily adapted to your specific task including but not limited to content generation, summarization, semantic search, and natural language to code translation. Users can access the service through REST APIs, Python SDK, or our web-based interface in the Azure OpenAI Studio.
-
-> [!div class="nextstepaction"]
-> [Azure OpenAI](/azure/cognitive-services/openai/overview)
-
-## Tools
-
-### Teams Toolkit
-
-Teams Toolkit makes it simple to get started with app development for Microsoft Teams using VS Code and Visual Studio.
-
-> [!div class="nextstepaction"]
-> [Teams Toolkit](~/toolkit/teams-toolkit-fundamentals.md)
-
-### Teams Toolkit CLI
-
-TeamsFx CLI is a text-based command line interface that accelerates Teams application development.
-
-> [!div class="nextstepaction"]
-> [Teams Toolkit CLI](~/toolkit/teamsfx-cli.md)
-
-### Developer Portal for Teams
-
-Developer Portal for Teams is the primary tool for configuring, distributing, and managing your Microsoft Teams apps.
-
-> [!div class="nextstepaction"]
-> [Developer Portal for Teams](~/concepts/build-and-test/teams-developer-portal.md)
-
-### Yeoman Generator
-
-Yo Teams allows you to build Microsoft Teams applications based on TypeScript and node.js on your teams, in your editor of choice, without any external or online dependencies. Including support for extending Teams app to other parts of the Microsoft 365 eco-system.
-
-If you are already familiar with Yeoman workflow, you can use to build your apps.
-
-> [!div class="nextstepaction"]
-> [YoTeams Yeoman Generator](https://github.com/pnp/generator-teams/blob/master/docs/docs/tutorials/build-your-first-microsoft-teams-app.md)
->- ## See also :::row:::
platform Get Started Overview https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/get-started/get-started-overview.md
Title: Get started - Overview description: In this module, learn how to build your first Microsoft Teams app based on language and developement environment, understand app capabilities, SDKs. ms.localizationpriority: high Last updated : 06/07/2023 + # Get started
-Let's get started with building apps for Microsoft Teams and beyond!
+Get started with building apps for Microsoft Teams and beyond!
-Use GitHub Codespaces or walk through the step-by-step guide to build a basic, real-world Teams app. The Get started module introduces you to common tools, fundamental concepts, and more advanced functionalities.
+Use GitHub Codespaces or walk through the step-by-step guide to build a basic, real-world Teams app. This module introduces you to common tools, fundamental concepts, and more advanced functionalities.
Here's an idea of what you'll learn:
Here's an idea of what you'll learn:
## Build your first Teams app
-In this section, learn more on how to build Teams app with different capabilities, such as tab, scenario-based bot app, and message extension.
+In this section, learn how to build a Teams app with different capabilities, such as tab, scenario-based bot app, and message extension.
1. Select the type of Teams app that you want to build:
- * **Build a basic Teams tab app**: You can get started with building a Teams app with a basic tab app.
-
- * **Build a scenario-based Teams bot app**: You can build a Teams app that is suitable for a particular scenario or use-case. For example, a notification bot is suitable for sending notifications but not to chat.
-
- * **Build message extension Teams app**: You can build a search-based message extension Teams app.
-
-2. Choose your path to build your selected app:
-
- * **GitHub Codespaces**: Allows you to run, test, and debug your app in a development environment without the need for any of the setup.
- * **Step-by-step guide**: Allows you to create a Teams app from scratch with all development environment setup.
-
- :::image type="content" border="false" source="../assets/images/get-started/codescpaces-vs-manual.png" alt-text="Screenshot shows your choices to build Teams app with codespaces and step-by-step guide."lightbox="../assets/images/get-started/codescpaces-vs-manual.png":::
-
-<!--
-## App capabilities and development tools
-
-(Note: will be moved to choose what suits you)
+ * **Build a basic Teams tab app**: Get started with building a Teams app with a basic tab app.
-Based on the capabilities you want for your app, choose an appropriate development tool set.
+ * **Build a scenario-based Teams bot app**: Build a Teams app that is suitable for a particular scenario or use-case. For example, a notification bot is suitable for sending notifications but not to chat.
-| App capabilities | Tabs | Bots | Message extensions |
-|--|-|--|--|
-| **User interactions** | A full-screen embedded web experience. | A chat bot that converses with members. | Shortcuts for inserting external content into a conversation or taking action on messages. |
-| **Recommended tools** | Microsoft Visual Studio Code (VS Code) with Teams Toolkit extension, or TeamsFx CLI if you prefer using CLI | VS Code with Teams Toolkit extension, or TeamsFx CLI | VS Code with Teams Toolkit extension, or TeamsFx CLI |
-| **SDKs** | TeamsFx SDK for core libs and Teams JavaScript client library for UI functionalities | TeamsFx SDK and Bot Framework SDK | TeamsFx SDK and Bot Framework SDK |
-| **Technology stacks or Languages** | Web technology in general, HTML, CSS, and JavaScript (incl. React). | Node.js, C#, Java, and Python. | Node.js, C#, Java, and Python. |
+ * **Build message extension Teams app**: Build a search-based message extension Teams app.
-*You aren't limited to using these particular stacks!*
+2. Choose your path to build your selected app.
-If you are already familiar with Yeoman workflow, you can use [YoTeams Yeoman Generator](https://github.com/pnp/generator-teams/blob/master/docs/docs/tutorials/build-your-first-microsoft-teams-app.md) to build your apps.
+ * **GitHub Codespaces**: Allows you to run, test, and debug your app in a development environment without the need for any extra setup.
+ * **Step-by-step guide**: Allows you to create a Teams app from the ground up including setting up your development environment.
>
+ :::image type="content" border="false" source="../assets/images/get-started/codescpaces-vs-manual.png" alt-text="Your choices to build a Teams app with codespaces and step-by-step guide."lightbox="../assets/images/get-started/codescpaces-vs-manual.png":::
## Next step
-If you want to build a basic tab app, go to:
+If you want to build a basic tab app, select the following:
> [!div class="nextstepaction"] > [Build your basic tab app](build-basic-tab-app.md)
-If a bot is what you're interested in, go to:
+If a bot is what you're interested in, select the following:
> [!div class="nextstepaction"] > [Start building a bot](build-notification-bot.md)
-If you want to build a message extension app, go to:
+If you want to build a message extension app, select the following:
> [!div class="nextstepaction"] > [Build message extension](build-message-extension.md)
platform Teams Toolkit Tutorial https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/get-started/teams-toolkit-tutorial.md
Title: Teams toolkit tutorial description: This tutorial helps you to select the app that you want to build. ms.localizationpriority: medium Last updated : 06/07/2023 + # Teams app tutorials and code samples You can build your own Microsoft Teams app with different capabilities using the following tutorials and code samples. ## Teams app tutorials
-Now, let's build your Teams app. You can use the following languages or frameworks and prepare your development environment for building your app.
+To start building your Teams app, use the following languages or frameworks and prepare your development environment.
| &nbsp; | **Tab** | **Bot** | **Message extension** | | | | | |
platform Overview https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/m365-apps/overview.md
The Teams app platform continues to evolve and expand holistically into the Micr
| Teams app features| App manifest element | Teams support |Outlook support | Microsoft 365 app support | Notes | |--|--|--|--|--|--|
-| [**Tabs-personal scope**](../tabs/how-to/create-personal-tab.md) |`staticTabs` | Web, Desktop, Mobile | Web, Desktop, Mobile (Android) | Web, Desktop, Mobile (Android)| Channel and group scope not yet supported for Microsoft 365. See [notes](../tabs/how-to/using-teams-client-sdk.md#microsoft-365-support-running-teams-apps-in-office-and-outlook).
+| [**Tabs-personal scope**](../tabs/how-to/create-personal-tab.md) |`staticTabs` | Web, Desktop, Mobile | Web, Desktop, Mobile (Android Beta*) | Web, Desktop, Mobile (Android)| *Rollout to Android current release in progress. Channel and group scope not yet supported for Microsoft 365. See [notes](../tabs/how-to/using-teams-client-sdk.md#microsoft-365-support-running-teams-apps-in-office-and-outlook).
| [**Message extensions-search-based**](../messaging-extensions/how-to/search-commands/define-search-command.md)| `composeExtensions` | Web, Desktop, Mobile| Web, Desktop | - |Action-based not yet supported for Microsoft 365. See [notes](extend-m365-teams-message-extension.md#troubleshooting). | | [**Link unfurling (including Stage View)**](../tabs/tabs-link-unfurling.md) | `composeExtensions.messageHandlers` | Web, Desktop | Web, Desktop | - | See notes on [link unfurling](extend-m365-teams-message-extension.md#link-unfurling) and [Stage View](extend-m365-teams-message-extension.md#stage-view)| | [**Office Add-ins**](/office/dev/add-ins/develop/json-manifest-overview) (preview) | `extensions` | - | Web, Desktop | - | Only available in [devPreview](../resources/schem) manifest version. See [notes](#office-add-ins-preview).|
platform Tab Sso Graph Api https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/authentication/tab-sso-graph-api.md
Title: Extend tab app with Microsoft Graph permissions
-description: Configure additional permissions and scopes, get access token with Microsoft Graph for to enable single sign-on (SSO).
+description: Configure additional permissions and scopes, get access token with Microsoft Graph to enable single sign-on (SSO).
ms.localizationpriority: high keywords: teams authentication tabs Microsoft Azure Active Directory (Azure AD) Graph API Delegated permission access token scope
You can configure additional Graph scopes in Azure AD for your app. These are de
4. Select **Microsoft Graph**.
- :::image type="content" source="../../../assets/images/authentication/teams-sso-tabs/request-api-permission.png" alt-text="The screenshot shows shows the request API permissions page.":::
+ :::image type="content" source="../../../assets/images/authentication/teams-sso-tabs/request-api-permission.png" alt-text="The screenshot shows the request API permissions page.":::
The options for Graph permissions display.
You can configure authentication for multiple platforms as long as the URL is un
1. Select **+ Add a platform**.
- :::image type="content" source="../../../assets/images/authentication/teams-sso-tabs/add-platform.png" alt-text="The screenshot shows the options to add add a platform.":::
+ :::image type="content" source="../../../assets/images/authentication/teams-sso-tabs/add-platform.png" alt-text="The screenshot shows the options to add a platform.":::
The **Configure platforms** page appears.
If you need to access Microsoft Graph data, configure your server-side code to:
1. Validate the access token. For more information, see [Validate the access token](tab-sso-code.md#validate-the-access-token). 1. Initiate the OAuth 2.0 OBO flow with a call to the Microsoft identity platform that includes the access token, some metadata about the user, and the credentials of the tab app (its app ID and client secret). The Microsoft identity platform will return a new access token that can be used to access Microsoft Graph. 1. Get data from Microsoft Graph by using the new token.
-1. Use token cache serialization in MSAL.NET to cache the new access token for multiple, if required.
+1. Use token cache serialization in MSAL.NET to cache the new access token for multiple, if necessary.
> [!IMPORTANT]
-> * As a best practice for security, always use the [server-side code to make Microsoft Graph calls](/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#middle-tier-access-token-request) or other calls that require passing an access token. You must not return the OBO token to the client because it enables the client to make direct calls to Microsoft Graph. This helps protect the token from being intercepted or leaked.
->
-> * DonΓÇÖt use `notifySuccess` result to return the token information to the parent page. Use `localStorage` to save the token and pass the item key via `notifySuccess`.
+>
+> - As a best practice for security, always use the [server-side code to make Microsoft Graph calls](/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow#middle-tier-access-token-request) or other calls that require passing an access token. You must not return the OBO token to the client because it enables the client to make direct calls to Microsoft Graph. This helps protect the token from being intercepted or leaked.
+>
+> - DonΓÇÖt use `notifySuccess` result to return the token information to the parent page. Use `localStorage` to save the token and pass the item key via `notifySuccess`.
## Known limitations
-Tenant admin consent: A simple way of [consenting on behalf of an organization as a tenant admin](/azure/active-directory/manage-apps/consent-and-permissions-overview#admin-consent) is by getting [consent from admin](/azure/active-directory/manage-apps/grant-admin-consent).
+1. Tenant admin consent: A simple way of [consenting on behalf of an organization as a tenant admin](/azure/active-directory/manage-apps/consent-and-permissions-overview#admin-consent) is by getting [consent from admin](/azure/active-directory/manage-apps/grant-admin-consent).
-You can ask for consent using the Auth API. Another approach for getting Graph scopes is to present a consent dialog using our existing [third party OAuth provider authentication approach](~/tabs/how-to/authentication/auth-tab-aad.md#navigate-to-the-authorization-page-from-your-pop-up-page). This approach involves popping up an Azure AD consent dialog box.
+ You can ask for consent using the Auth API. Another approach for getting Graph scopes is to present a consent dialog using our existing [third party OAuth provider authentication approach](~/tabs/how-to/authentication/auth-tab-aad.md#navigate-to-the-authorization-page-from-your-pop-up-page). This approach involves popping up an Azure AD consent dialog box.
-<details>
-<summary>To ask for additional consent using the Auth API, follow these steps:</summary>
+ <details>
+ <summary>To ask for additional consent using the Auth API, follow these steps:</summary>
-1. The token retrieved using `getAuthToken()` must be exchanged on the server-side using Azure AD [on-behalf-of flow](/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow) to get access to those other Graph APIs. Ensure you use the v2 Graph endpoint for this exchange.
-2. If the exchange fails, Azure AD returns an invalid grant exception. It usually responds with one of the two error messages, `invalid_grant` or `interaction_required`.
-3. When the exchange fails, you must ask for consent. Use the user interface (UI) to ask the app user to grant other consent. This UI must include a button that triggers an Azure AD consent dialog using [Silent authentication](~/concepts/authentication/auth-silent-aad.md).
-4. When asking for more consent from Azure AD, you must include `prompt=consent` in your [query-string-parameter](~/tabs/how-to/authentication/auth-silent-aad.md#get-the-user-context) to Azure AD, otherwise Azure AD wouldn't ask for other scopes.
- - Instead of `?scope={scopes}`, use `?prompt=consent&scope={scopes}`
- - Ensure that `{scopes}` includes all the scopes you're prompting the user for, for example, `Mail.Read` or `User.Read`.
+ 1. The token retrieved using `getAuthToken()` must be exchanged on the server-side using Azure AD [on-behalf-of flow](/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow) to get access to those other Graph APIs. Ensure you use the v2 Graph endpoint for this exchange.
+ 2. If the exchange fails, Azure AD returns an invalid grant exception. It usually responds with one of the two error messages, `invalid_grant` or `interaction_required`.
+ 3. When the exchange fails, you must ask for consent. Use the user interface (UI) to ask the app user to grant other consent. This UI must include a button that triggers an Azure AD consent dialog using [Silent authentication](~/concepts/authentication/auth-silent-aad.md).
+ 4. When asking for more consent from Azure AD, you must include `prompt=consent` in your [query-string-parameter](~/tabs/how-to/authentication/auth-silent-aad.md#get-the-user-context) to Azure AD, otherwise Azure AD wouldn't ask for other scopes.
+ - Instead of `?scope={scopes}`, use `?prompt=consent&scope={scopes}`
+ - Ensure that `{scopes}` includes all the scopes you're prompting the user for, for example, `Mail.Read` or `User.Read`.
- To handle incremental consent for tab app, see [incremental and dynamic user consent](/azure/active-directory/develop/v2-permissions-and-consent).
-5. After the app user has granted more permissions, retry the OBO flow to get access to these other APIs.
+ To handle incremental consent for tab app, see [incremental and dynamic user consent](/azure/active-directory/develop/v2-permissions-and-consent).
+ 5. After the app user has granted more permissions, retry the OBO flow to get access to these other APIs.
</details>
+1. Race condition in fetching Graph access token via on-behalf-of (OBO) flow after consent: If your app calls Microsoft Graph, you might use the on-behalf-of (OBO) flow in your API to get a valid Graph token for that user.
+
+ If a user hasn't granted Azure AD application consent for these scopes, your OBO call will fail with `invalid_grant` or `interaction_required` error. This error informs you that you need to prompt the user for their consent.
+
+ When the user has provided their consent and you try to make an OBO call immediately, sometimes there's a race condition between Azure AD propagating this consent and the OBO request taking place. This can lead to OBO call failing with the same `invalid_grant` or `interaction_required` errors.
+
+ If your application is unaware of this behaviour, it might ask the user for consent multiple times.
+
+ There's no workaround to this limitation. Azure AD recommends that you can build a meaningful wait-and-retry mechanism to overcome this issue.
+
+ This wait-and-retry mechanism should keep track if a user has consented to the required scopes. If an API call that includes an OBO request fails with the above errors, but the user has already consented, avoid showing the consent prompt to the user. Instead, wait for some time before retrying the API call. Usually, Azure AD sends the consent within three to five seconds. In one of our [sample applications](https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/8f266c33608d6d7b4cf89c81779ccf49e7664c1e/samples/bot-tab-conversations/csharp/Source/ConversationalTabs.Web/ClientApp/src/utils/UtilsFunctions.ts#LL8C1-L8C1), we retry up to three times with double the wait time between each retry, starting at a one second wait.
+
+ If after three to five attempts the OBO flow still fails, the user might not have consented to all the required scopes, and you may have to prompt them to consent again.
+
+ This approach helps reduce the possibility of user being prompted for consent more than once.
+ ## Code sample | **Sample name** | **Description** | **C#** | **Node.js** |