Updates from: 06/17/2021 03:16:23
Service Microsoft Docs article Related commit history on GitHub Change details
platform Auth Flow Bot https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/bots/how-to/authentication/auth-flow-bot.md
for an example that demonstrates authentication flow for bots using Node.js and
> The OAuth 2.0 authorization code grant flow calls for a `state` parameter in the authentication request which contains a unique session token to prevent a [cross-site request forgery attack](https://en.wikipedia.org/wiki/Cross-site_request_forgery). The example uses a randomly-generated GUID. 4. When the user selects the *signin* button, Teams opens a popup window and navigates to the start page. > [!NOTE]
- > The size of the pop-up window can be controlled through width and height query string parameters in the URL. For example, if you add width=500 and height=500, the size of the pop-up window is 500x500 pixels. Teams displays the pop-up window with the given pixel size, up to a maximum that's a percentage of the size of the main window.
+ > The size of the pop-up window can be controlled through width and height query string parameters in the URL. For example, if you add width=600 and height=600, the size of the pop-up window is 600x600 pixels. The actual size of the pop-up window is capped as a percentage of the Teams main window size. If the Teams window is small, the pop-up window is smaller than the specified dimensions.
5. The start page redirects the user to the identity provider's `authorize` endpoint. ([View code](https://github.com/OfficeDev/microsoft-teams-sample-auth-node/blob/469952a26d618dbf884a3be53c7d921cc580b1e2/public/html/auth-start.html#L51-L56)) 6. On the provider's site, the user signs in and grants access to the bot.
platform Send Proactive Messages https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/bots/how-to/conversations/send-proactive-messages.md
After you get the appropriate address information, you can send your message.
## Send the message
-Now that you have the right address information, you can send your message. If you're using the SDK, you'll do so using the `continueConversation` method, and the `conversationId` and `tenantId` to make a direct API call. You must set the `conversationParameters` correctly to successfully send your message. See the [samples](#samples) section or use one of the samples listed in the [code sample](#code-sample) section.
-
-If you are using the SDK, you must use the `continueConversation` method, and the `conversationId` and `tenantId` to make a direct API call to send the message. You must set the `conversationParameters` correctly to successfully send your message.
+Now that you have the right address information, you can send your message. If you are using the SDK, you must use the `continueConversation` method, and the `conversationId` and `tenantId` to make a direct API call. You must set the `conversationParameters` correctly to successfully send your message. See the [samples](#samples) section or use one of the samples listed in the [code sample](#code-sample) section.
Now that you have sent the proactive message, you must follow these best practices while sending proactive messages for better information exchange between users and the bot.
The following table provides a simple code sample that incorporate basic convers
> [!div class="nextstepaction"] > [Teams proactive messaging code samples](/samples/officedev/msteams-samples-proactive-messaging/msteams-samples-proactive-messaging/)
+## See also
+
+[**Teams proactive messaging code samples**](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-proactive-messaging/csharp)
+ ## Next step > [!div class="nextstepaction"]
-> [**Teams proactive messaging code samples**](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-proactive-messaging/csharp)
> [Format your bot messages](~/bots/how-to/format-your-bot-messages.md)
platform Design Teams App Process https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/concepts/design/design-teams-app-process.md
Read in depth about or at least familiarize yourself with the [fundamentals of T
After the planning phase, you can determine which Teams capabilities fit your appΓÇÖs use cases. For example, if you want to proactively notify people, a bot might be the right capability.
-The UI kit has pre-built designs that show you how people typically add, set up, use, and manage each capability. For quick reference, this information is also in these docs, but with the UI kit you can copy and paste any of these designs into your appΓÇÖs design.
+The UI kit has pre built designs that show you how people typically add, set up, use, and manage each capability. For quick reference, this information is also in these docs, but with the UI kit you can copy and paste any of these designs into your appΓÇÖs design.
1. In the UI kitΓÇÖs left nav, go to **App capabilities** and select the capability you want for your app. 1. Copy what you need from that page to design your app.<br />
The UI kit has pre-built designs that show you how people typically add, set up,
## Design your UX flow
-Once you have a basic app design, you can modify and refine it as much as you want (and quickly) by copying Teams UI templates and basic components from the UI kit.
+Once you have a basic app design, you can modify and refine it as much as you want by copying Teams UI templates and basic components from the UI kit.
### Design with UI templates
Not unlike the design phase, you can use these Fluent UI components in your app
Whether youΓÇÖre just starting on your app or close to a production-ready app, we recommend that you periodically review the following resources:
-* **Microsoft Teams store validation guidelines**: Provides standards that all Teams apps should strive for (not just apps listed in the store). For more information, see the [guidelines](~/concepts/deploy-and-publish/appsource/prepare/teams-store-validation-guidelines.md).
+* **Microsoft Teams store validation guidelines**: Provides standards that all Teams apps should strive for, and not just apps listed in the store. For more information, see the [guidelines](~/concepts/deploy-and-publish/appsource/prepare/teams-store-validation-guidelines.md).
* **Design best practices**: These docs and the UI kit provide best practices for designing high-quality apps. For example, see the [best practices for designing bots](~/bots/design/bots.md#best-practices).+
platform First App Blazor https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/get-started/first-app-blazor.md
The app manifest is loading the tab from a `localhost` URL. In this section, yo
You can now use the **Preview in Teams** button at the top of the page to launch your app within Teams.
-## Next steps
-
-Learn about other methods for creating Teams apps:
+## See also
- [Create a Teams app with React](first-app-react.md)-- [Create a Teams app as a SharePoint Web Part](first-app-spfx.md) (Azure not required) - [Create a conversational bot app](first-app-bot.md) - [Create a messaging extension](first-message-extension.md)+
+## Next step
+
+> [!div class="nextstepaction"]
+> [Create a Teams app as a SharePoint Web Part](first-app-spfx.md)
platform First App Bot https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/get-started/first-app-bot.md
Deployment involves provisioning resources on an active Azure subscription and d
</details>
-## Next steps
-
-Learn about other methods for creating Teams apps:
+## See also
- [Create a Teams app with React](first-app-react.md) - [Create a Teams app with Blazor](first-app-blazor.md) - [Create a Teams app as a SharePoint Web Part](first-app-spfx.md) (Azure not required)-- [Create a messaging extension](first-message-extension.md)+
+## Next step
+
+> [!div class="nextstepaction"]
+> [Create a messaging extension](first-message-extension.md)
platform First App React https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/get-started/first-app-react.md
# Build and run your first Microsoft Teams app with React
-In this tutorial, you will create a new Microsoft Teams app in React that implements a simple personal app to pull information from the Microsoft Graph. (A *personal app* includes a set of tabs scoped for individual use.) During the tutorial, you will learn about the structure of a Teams app, how to run an app locally, and how to deploy the app to Azure.
+In this tutorial, you can create a new Microsoft Teams app in React that implements a simple personal app to pull information from the Microsoft Graph. (A *personal app* includes a set of tabs scoped for individual use.) During the tutorial, you can learn about the structure of a Teams app, how to run an app locally, and how to deploy the app to Azure.
-The app that is built displays basic user information for the current user. When permission is granted, the app will connect to the Microsoft Graph as the current user to get the complete profile.
+The app that is built displays basic user information for the current user. When permission is granted, the app connects to Microsoft Graph as the current user to get the complete profile.
## Before you begin
Use the Teams Toolkit to create your first project:
:::image type="content" source="../assets/images/teams-toolkit-v2/create-new-project-intro.png" alt-text="Wizard start for Create New Project":::
-1. On the **Select capabilities** step, the **Tab** capability will already be selected. Press **OK**.
+1. On the **Select capabilities** step, the **Tab** capability is already selected. Press **OK**.
:::image type="content" source="../assets/images/teams-toolkit-v2/create-project-capabilities.png" alt-text="Screenshot showing how to add capabilities to your new app.":::
Use the Teams Toolkit to create your first project:
:::image type="content" source="../assets/images/teams-toolkit-v2/create-project-programming-languages.png" alt-text="Screenshot showing how to select the programming language.":::
-1. Select a workspace folder. A folder will be created within your workspace folder for the project you are creating.
+1. Select a workspace folder. A folder is created within your workspace folder for the project you are creating.
-1. Enter a suitable name for your app, like `helloworld`. The name of the app must consist only of alphanumeric characters. Press **Enter** to continue.
+1. Enter a suitable name for your app, like `helloworld`. The name of the app must consist only of alphanumeric characters. Press **Enter** to continue.
-Your Teams app will be created within a few seconds.
+Your Teams app is created within a few seconds.
# [Command line](#tab/cli)
Use the `teamsfx` CLI to create your first project. Start from the folder where
teamsfx new ```
-The CLI walks through some questions to create the project. Each question will tell you how to answer it (for example, to use arrow keys to select an option). When you have answered the question, confirm your choice by pressing **Enter**.
+The CLI walks through some questions to create the project. Each question tells you how to answer it, for example, use arrow keys to select an option. When you have answered the question, confirm your choice by pressing **Enter**.
1. Select **Create a new Teams app**. 1. Choose the **Tab** capability.
The CLI walks through some questions to create the project. Each question will
1. Press **Enter** to select the default workspace folder. 1. Enter a suitable name for your app, like `helloworld`. The name of the app must consist only of alphanumeric characters.
-Once all the questions have been answered, your project will be created.
+Once all the questions have been answered, your project is created.
To build and run your app locally:
> When you run the app for the first time, all dependencies are downloaded and the app is built. A browser window automatically opens when the build is complete. This can take 3-5 minutes to complete.
- The Toolkit will prompt you to install a local certificate if needed. This certificate allows Teams to load your application from `https://localhost`. Select yes when the following dialog appears:
+ The Toolkit prompts you to install a local certificate if required. This certificate allows Teams to load your application from `https://localhost`. Select yes when the following dialog appears:
:::image type="content" source="../assets/images/teams-toolkit-v2/ssl-prompt.png" alt-text="Screenshot showing how the prompt to install a SSL certificate to enable Teams to load your application from localhost.":::
To build and run your app locally:
1. You may be prompted to sign in. If so, sign in with your M365 account. 1. When prompted to install the app onto Teams, press **Add**.
-Your app will now be displayed:
+Your app is now displayed:
:::image type="content" source="../assets/images/teams-toolkit-v2/react-finished-app.png" alt-text="Screenshot of the completed app":::
-You can do normal debugging activities as if this were any other web application (such as setting breakpoints). The app supports hot reloading. If you change any file within the project, the page will be reloaded.
+You can do normal debugging activities as if this were any other web application (such as setting breakpoints). The app supports hot reloading. If you change any file within the project, the page is reloaded.
<!-- markdownlint-disable MD033 --> <details>
Before deployment, the application has been running locally:
Deployment involves provisioning resources on an active Azure subscription and deploying (uploading) the backend and frontend code for the application to Azure. 1. The backend (if configured) uses a variety of Azure services, including Azure App Service and Azure Storage.
-1. The frontend application will be deployed to an Azure Storage account configured for static web hosting.
+1. The frontend application is deployed to an Azure Storage account configured for static web hosting.
</details>
-## Next steps
+## See also
-Learn about other methods for creating Teams apps:
--- [Create a Teams app with Blazor](first-app-blazor.md) - [Create a Teams app as a SharePoint Web Part](first-app-spfx.md) (Azure not required) - [Create a conversational bot app](first-app-bot.md) - [Create a messaging extension](first-message-extension.md)+
+## Next step
+
+> [!div class="nextstepaction"]
+> [Create a Teams app with Blazor](first-app-blazor.md)
platform First App Spfx https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/get-started/first-app-spfx.md
Open the Teams application (or sign in at `https://teams.microsoft.com`). Press
:::image type="content" source="../assets/images/teams-toolkit-v2/spfx-app-in-teams.png" alt-text="Screenshot showing the app within Teams":::
-## Next steps
-
-Learn about other methods for creating Teams apps:
+## See also
- [Create a Teams app with React](first-app-react.md) - [Create a Teams app with Blazor](first-app-blazor.md)-- [Create a conversational bot app](first-app-bot.md) - [Create a messaging extension](first-message-extension.md)+
+## Next step
+
+> [!div class="nextstepaction"]
+> [Create a conversational bot app](first-app-bot.md)
platform First Message Extension https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/get-started/first-message-extension.md
The Teams Search Auth Config for sample projects on GitHub, demonstrate how to c
> [!div class="nextstepaction"] > [View more Bot Framework Samples on GitHub](https://github.com/OfficeDev/microsoft-teams-samples#messaging-extensions-samples-using-the-v4-sdk)
-## Next steps
-
-Learn about other methods for creating Teams apps:
+## See also
- [Create a Teams app with React](first-app-react.md) - [Create a Teams app with Blazor](first-app-blazor.md)
platform Prerequisites https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/get-started/prerequisites.md
Before your create your first Teams app, you must install a few tools and set up
Some of the tools you need depend on how you you prefer to build your Teams app: -- [Node.js](https://nodejs.org/en/download/) (use the latest v14 LTS release)
+- [Node.js](https://nodejs.org/en/download/) (use the latest v14 LTS release)
- A browser with developer tools - such as [Microsoft Edge](https://www.microsoft.com/edge) (recommended) or [Google Chrome](https://www.google.com/chrome/)-- If you're developing with JavaScript, TypeScript, or the SharePoint Framework (SPFx), install [Visual Studio Code](https://code.visualstudio.com/download), version 1.55 or later. -- If you're developing with .NET, install [Visual Studio 2019](https://visualstudio.com/download). Ensure you install the **ASP.NET and web development** or **.NET Core cross-platform development** workload.
+- If you are developing with JavaScript, TypeScript, or the SharePoint Framework (SPFx), install [Visual Studio Code](https://code.visualstudio.com/download), version 1.55 or later.
+- If you are developing with .NET, install [Visual Studio 2019](https://visualstudio.com/download). Ensure you install the **ASP.NET and web development** or **.NET Core cross-platform development** workload.
> [!WARNING] > There are known issues with `npm@7`, packaged with Node v15 and later. If you have problems running `npm install`, ensure you're using Node v14 (LTS)
The Teams Toolkit helps simplify the development process with tools to provision
1. Open Visual Studio Code. 1. Select the Extensions view (**Ctrl+Shift+X** / **⌘⇧-X** or **View > Extensions**).
-1. In the search box, enter _Teams Toolkit_.
-1. Select on the green install button next to the Teams Toolkit.
+1. In the search box, enter **Teams Toolkit**.
+1. Select the green install button next to the Teams Toolkit.
You also can find the Teams Toolkit on the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension).
-The following tools will be installed by the Visual Studio Code extension when they are needed. If already installed, the installed version will be used instead. If using Linux (including WSL), you must install these tools before use:
+The following tools can be installed by the Visual Studio Code extension when they are needed. If already installed, the installed version can be used instead. If using Linux including WSL, you must install these tools before use:
- [Azure Functions Core Tools](/azure/azure-functions/functions-run-local)
- Azure Functions Core Tools is used to run any backend components locally during a local debug run, including the authentication helpers required when running your services in Azure. It is installed within the project directory (using the npm `devDependencies`).
+ Azure Functions Core Tools is used to run any backend components locally during a local debug run, including the authentication helpers required when running your services in Azure. It is installed within the project directory (using the npm `devDependencies`).
- [.NET SDK](/dotnet/core/install/)
- The .NET SDK is used to install customized bindings for local debugging and Azure Functions app deployments. If you have not installed the .NET 3.1 (or later) SDK globally, the portable version will be installed.
+ The .NET SDK is used to install customized bindings for local debugging and Azure Functions app deployments. If you have not installed the .NET 3.1 (or later) SDK globally, the portable version can be installed.
- [ngrok](https://ngrok.com/download)
- Some Teams app features (conversational bots, messaging extensions, and incoming webhooks) require inbound connections. You need to expose your development system to Teams through a tunnel. A tunnel is not required for apps that only include tabs. This package is installed within the project directory (using npm `devDependencies`).
+ Some Teams app features (conversational bots, messaging extensions, and incoming webhooks) require inbound connections. You need to expose your development system to Teams through a tunnel. A tunnel is not required for apps that only include tabs. This package is installed within the project directory (using npm `devDependencies`).
# [Visual Studio 2019](#tab/vs)
-You can use Visual Studio 2019 to develop Teams apps with Blazor Server in .NET. If you're not intending to develop Teams apps in .NET, install the Visual Studio Code version of Teams Toolkit.
+You can use Visual Studio 2019 to develop Teams apps with Blazor Server in .NET. If you are not intending to develop Teams apps in .NET, install the Visual Studio Code version of Teams Toolkit.
To install the Teams Toolkit extension: 1. Open Visual Studio 2019. 1. Select **Extensions** > **Manage Extensions**.
-1. In the search box, enter _Teams Toolkit_.
+1. In the search box, enter **Teams Toolkit**.
1. Select the Teams Toolkit extension and select **Download**.
-The extension will be downloaded. Close Visual Studio 2019 to install the extension.
+The extension can be downloaded. Close Visual Studio 2019 to install the extension.
# [Command line](#tab/cli)
sudo npm install -g --unsafe-perm @microsoft/teamsfx-cli
This is more common on Linux and macOS systems.
-Ensure you add the npm global cache to your PATH. This is normally done as part of the Node.js installer.
+Ensure you add the npm global cache to your PATH. This is normally done as part of the Node.js installer.
-You can use the CLI with the `teamsfx` command. Verify that the command is working by running `teamsfx -h`.
+You can use the CLI with the `teamsfx` command. Verify that the command is working by running `teamsfx -h`.
> [!CAUTION]
-> Before you can run TeamsFx in PowerShell terminals, you need to enable the "remote signed" execution policy for PowerShell. For more information, refer to the [PowerShell documentation](/powershell/module/microsoft.powershell.core/about/about_signing).
+> Before you can run TeamsFx in PowerShell terminals, you must enable the "remote signed" execution policy for PowerShell. For more information, refer to the [PowerShell documentation](/powershell/module/microsoft.powershell.core/about/about_signing).
If you work with Microsoft Graph data, you should learn about and bookmark the M
- [Microsoft Graph Explorer](https://developer.microsoft.com/graph/graph-explorer)
-With the Developer Portal for Teams, you can configure, manage, and distribute your Teams app (including to your org or the Teams store).
+With the Developer Portal for Teams, you can configure, manage, and distribute your Teams app including to your organization or the Teams store.
- [Developer Portal for Teams](https://dev.teams.microsoft.com/) ## Enable sideloading
-During development, you will need to load your app within Teams without distributing it. This is known as "sideloading".
+During development, you must load your app within Teams without distributing it. This is known as "sideloading".
1. If you have a Teams account, verify if you can sideload apps in Teams:
During development, you will need to load your app within Teams without distribu
:::image type="content" source="~/assets/images/teams-toolkit-v2/upload-custom-app-closeup.png" alt-text="Illustration showing where in Teams you can upload a custom app."::: > [!NOTE]
-> If you still can't sideload apps, talk to your Teams administrator. See [enable custom Teams apps and turn on custom app uploading](~/concepts/build-and-test/prepare-your-o365-tenant.md#enable-custom-teams-apps-and-turn-on-custom-app-uploading) for details.
+> If you still cannot sideload apps, talk to your Teams administrator. See [enable custom Teams apps and turn on custom app uploading](~/concepts/build-and-test/prepare-your-o365-tenant.md#enable-custom-teams-apps-and-turn-on-custom-app-uploading) for details.
## Get a free Teams developer tenant (optional)
-If you cannot see the sideload option, or you don't have a Teams account, you can get a free Teams developer account by joining the M365 developer program. The registration process takes approximately two minutes.
+If you cannot see the sideload option, or you do not have a Teams account, you can get a free Teams developer account by joining the M365 developer program. The registration process takes approximately two minutes.
1. Go to the [Microsoft 365 developer program](https://developer.microsoft.com/microsoft-365/dev-program). 1. Select **Join Now** and follow the onscreen instructions.
If you cannot see the sideload option, or you don't have a Teams account, you ca
:::image type="content" source="~/assets/images/build-your-first-app/dev-program-subscription.png" alt-text="Example of what you see after signing up for the Microsoft 365 developer program.":::
-1. Log in to Teams using the administrator account you just set up.
+1. Sign in to Teams using the administrator account you just set up.
1. Verify if you now have the **Upload a custom app** option. ## Get a free Azure account
-If you wish to host your app or access resources within Azure, you will need an Azure subscription. You can [create a free account](https://azure.microsoft.com/free/) before you begin.
+If you wish to host your app or access resources within Azure, you must have an Azure subscription. You can [create a free account](https://azure.microsoft.com/free/) before you begin.
## Sign in to your Microsoft 365 and Azure accounts
-You will need access to two accounts:
+You must have access to two accounts:
- Your Microsoft 365 account credentials. This is the account that you use to sign in to Teams. If you're using an Microsoft 365 developer program tenant, this is the admin account you set up when you registered for the program.
You will need access to two accounts:
:::image type="content" source="~/assets/images/teams-toolkit-v2/account-commands.png" alt-text="Location of the Accounts section used to sign-in.":::
-1. The sign-in process will start using your normal web browser. Complete the sign-in process for your M365 account. You will be prompted when you can close the browser and return to Visual Studio Code.
+1. The sign-in process starts using your normal web browser. Complete the sign-in process for your M365 account. You are prompted when you can close the browser and return to Visual Studio Code.
1. Return to the Teams Toolkit within Visual Studio Code. 1. Select **Sign in to Azure**. > [!TIP]
- > If you have the Azure Account extension installed and are using the same account, you can skip this step. You will automatically use the same account as you are using in other extensions.
+ > If you have the Azure Account extension installed and are using the same account, you can skip this step. Use the same account as you are using in other extensions.
-1. The sign-in process will start using your normal web browser. Complete the sign-in process for your Azure account. You will be prompted when you can close the browser and return to Visual Studio Code.
+1. The sign-in process starts using your normal web browser. Complete the sign-in process for your Azure account. You are prompted when you can close the browser and return to Visual Studio Code.
-When complete, the **ACCOUNTS** section of the sidebar will show the two accounts separately, together with the number of usable Azure subscriptions available to you. Ensure you have at least one usable Azure subscription available. If not, sign out and use a different account.
+When complete, the **ACCOUNTS** section of the sidebar shows the two accounts separately, together with the number of usable Azure subscriptions available to you. Ensure you have at least one usable Azure subscription available. If not, sign out and use a different account.
# [Visual Studio 2019](#tab/vs)
-Visual Studio 2019 will prompt you to log in to each service as it is needed. You do not need to sign in to your M365 and Azure accounts in advance.
+Visual Studio 2019 prompts you to log in to each service as required. You do not need to sign in to your M365 and Azure accounts in advance.
# [Command line](#tab/cli)
Visual Studio 2019 will prompt you to log in to each service as it is needed. Y
teamsfx account login m365 ```
- The sign-in process will start using your normal web browser. Complete the sign-in process for your M365 account. You will be prompted when you can close the browser.
+ The sign-in process starts using your normal web browser. Complete the sign-in process for your M365 account. You are prompted when you can close the browser.
2. Sign in to Azure with the TeamsFx CLI:
Visual Studio 2019 will prompt you to log in to each service as it is needed. Y
teamsfx account login azure ```
- The sign-in process will start using your normal web browser. Complete the sign-in process for your Azure account. You will be prompted when you can close the browser.
+ The sign-in process starts using your normal web browser. Complete the sign-in process for your Azure account. You are prompted when you can close the browser.
The account logins are shared between Visual Studio Code and the TeamsFx CLI.
-## Next steps
- Now that your development environment is configured, you can create, build, and deploy your first Teams app. -- [Create your first Teams app using React](first-app-react.md)
+## See also
+ - [Create your first Teams app with Blazor](first-app-blazor.md) - [Create your first Teams app using SharePoint Framework (SPFx)](first-app-spfx.md) - [Create a conversational bot app](first-app-bot.md) - [Create a messaging extension](first-message-extension.md)+
+## Next step
+
+> [!div class="nextstepaction"]
+> [Create your first Teams app using React](first-app-react.md)
platform Resource Specific Consent https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/graph-api/rsc/resource-specific-consent.md
keywords: teams authorization OAuth SSO AAD rsc Graph
# Resource-specific consent (RSC)
-Resource-specific consent (RSC) is a Microsoft Teams and Microsoft Graph API integration that enables your app to use API endpoints to manage specific teams within an organization. The resource-specific consent (RSC) permissions model enables *team owners* to grant consent for an application to access and/or modify a team's data. The granular, Teams-specific, RSC permissions define what an application can do within a specific team:
+Resource-specific consent (RSC) is a Microsoft Teams and Microsoft Graph API integration that enables your app to use API endpoints to manage specific resourcesΓÇöeither teams or chatsΓÇöwithin an organization. The resource-specific consent (RSC) permissions model enables *team owners* and *chat owners* to grant consent for an application to access and/or modify a team's data and a chat's data, respectively. The granular, Teams-specific, RSC permissions define what an application can do within a specific resource:
## Resource-specific permissions
+### Resource-specific permissions for a team
|Application permission| Action | | -- | -- |
-|TeamSettings.Read.Group | Get the settings for this team.|
-|TeamSettings.ReadWrite.Group|Update the settings for this team.|
-|ChannelSettings.Read.Group|Get the channel names, channel descriptions, and channel settings for this teamΓÇï.|
-|ChannelSettings.ReadWrite.Group|Update the channel names, channel descriptions, and channel settings for this team.ΓÇï|
+|TeamSettings.Read.Group | Get this team's settings.|
+|TeamSettings.ReadWrite.Group|Update this team's settings.|
+|ChannelSettings.Read.Group|Get this team's channel names, channel descriptions, and channel settingsΓÇï.|
+|ChannelSettings.ReadWrite.Group|Update this team's channel names, channel descriptions, and channel settings.ΓÇï|
|Channel.Create.Group|Create channels in this team.ΓÇï| |Channel.Delete.Group|Delete channels in this team.ΓÇï| |ChannelMessage.Read.Group |Get this team's channel messages.ΓÇï|
Resource-specific consent (RSC) is a Microsoft Teams and Microsoft Graph API int
|TeamsTab.Delete.Group|Delete this team's tabs.ΓÇï| |TeamMember.Read.Group|Get this team's members.ΓÇï|
+For more details, see [Teams resource-specific consent permissions](/graph/permissions-reference#teams-resource-specific-consent-permissions).
+
+### Resource-specific permissions for a chat
+|Application permission| Action |
+| -- | -- |
+| ChatSettings.Read.Chat | Get this chat's settings. |
+| ChatSettings.ReadWrite.Chat | Update this chat's settings. |
+| ChatMessage.Read.Chat | Get this chat's messages. |
+| ChatMember.Read.Chat | Get this chat's members. |
+| Chat.Manage.Chat | Manage this chat. |
+| TeamsTab.Read.Chat | Get this chat's tabs. |
+| TeamsTab.Create.Chat | Create tabs in this chat. |
+| TeamsTab.Delete.Chat | Delete this chat's tabs. |
+| TeamsTab.ReadWrite.Chat | Manage this chat's tabs. |
+| TeamsAppInstallation.Read.Chat | Get which apps are installed in this chat. |
+| OnlineMeeting.ReadBasic.Chat | Get basic propertiesΓÇösuch as name, schedule, organizer, and join linkΓÇöof a meeting associated with this chat. |
+
+For more details, see [Chat resource-specific consent permissions](/graph/permissions-reference#chat-resource-specific-consent-permissions).
+ >[!NOTE] >Resource-specific permissions are only available to Teams apps installed on the Teams client and are currently not part of the Azure Active Directory portal.
Resource-specific consent (RSC) is a Microsoft Teams and Microsoft Graph API int
The steps for enabling RSC in your application are as follows:
-1. [Configure group owner consent settings in the Azure Active Directory portal](#configure-group-owner-consent-settings-in-the-azure-ad-portal).
+1. [Configure consent settings in the Azure Active Directory portal](#configure-consent-settings-in-the-azure-ad-portal).
+ 1. [Configure group owner consent settings for RSC in a team](#configure-group-owner-consent-settings-for-rsc-in-a-team).
+ 1. [Configure user consent settings for RSC in a chat](#configure-user-consent-settings-for-rsc-in-a-chat).
1. [Register your app with Microsoft identity platform via the Azure AD portal](#register-your-app-with-microsoft-identity-platform-via-the-azure-ad-portal). 1. [Review your application permissions in the Azure AD portal](#review-your-application-permissions-in-the-azure-ad-portal). 1. [Obtain an access token from the Microsoft Identity platform](#obtain-an-access-token-from-the-microsoft-identity-platform). 1. [Update your Teams app manifest](#update-your-teams-app-manifest). 1. [Install your app directly in Teams](#sideload-your-app-in-teams). 1. [Check your app for added RSC permissions](#check-your-app-for-added-rsc-permissions).
+ 1. [Check your app for added RSC permissions in a team](#check-your-app-for-added-rsc-permissions-in-a-team).
+ 1. [Check your app for added RSC permissions in a chat](#check-your-app-for-added-rsc-permissions-in-a-chat).
+
+## Configure consent settings in the Azure AD portal
-## Configure group owner consent settings in the Azure AD portal
+### Configure group owner consent settings for RSC in a team
You can enable or disable [group owner consent](/azure/active-directory/manage-apps/configure-user-consent-groups?tabs=azure-portal) directly within the Azure portal:
You can enable or disable [group owner consent](/azure/active-directory/manage-a
> - [Select](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ConsentPoliciesMenuBlade/UserSettings) **Azure Active Directory** => **Enterprise applications** => **Consent and permissions** => **User consent settings**. > - Enable, disable, or limit user consent with the control labeled **Group owner consent for apps accessing data** (The default is **Allow group owner consent for all group owners**). For a team owner to install an app using RSC, group owner consent must be enabled for that user.
-![azure rsc configuration](../../assets/images/azure-rsc-configuration.png)
+![azure rsc team configuration](../../assets/images/azure-rsc-team-configuration.png)
To enable or disable group owner consent using PowerShell, follow the steps outlined in [Configure group owner consent using PowerShell](/azure/active-directory/manage-apps/configure-user-consent-groups?tabs=azure-powershell).
+### Configure user consent settings for RSC in a chat
+
+You can enable or disable [user consent](/azure/active-directory/manage-apps/configure-user-consent?tabs=azure-portal) directly within the Azure portal:
+
+> [!div class="checklist"]
+>
+>- Sign in to the [Azure portal](https://portal.azure.com) as a [Global Administrator/Company Administrator](/azure/active-directory/roles/permissions-reference#global-administrator&preserve-view=true).
+ > - [Select](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ConsentPoliciesMenuBlade/UserSettings) **Azure Active Directory** => **Enterprise applications** => **Consent and permissions** => **User consent settings**.
+> - Enable, disable, or limit user consent with the control labeled **User consent for applications** (The default is **Allow user consent for apps**). For a chat member to install an app using RSC, user consent must be enabled for that user.
+
+![azure rsc chat configuration](../../assets/images/azure-rsc-chat-configuration.png)
+
+To enable or disable user consent using PowerShell, follow the steps outlined in [Configure user consent using PowerShell](/azure/active-directory/manage-apps/configure-user-consent?tabs=azure-powershell).
++ ## Register your app with Microsoft identity platform via the Azure AD portal The Azure Active Directory portal provides a central platform for you to register and configure your apps. Your app must be registered in the Azure AD portal to integrate with the Microsoft identity platform and call Microsoft Graph APIs. For more information, see [Register an application with the Microsoft identity platform](/graph/auth-register-app-v2). >[!WARNING]
->Do not register multiple Teams apps to the same Azure AD app id. The app id must be unique for each app. Attempts to install multiple apps to the same app id will fail.
+>An Azure AD app ID should not be shared across multiple Teams apps. There should be a 1:1 mapping between a Teams App and an Azure AD app. Attempts to install multiple Teams apps which are associated with the same Azure AD app ID will cause installation/runtime failures.
## Review your application permissions in the Azure AD portal Navigate to the **Home** => **App registrations** page and select your RSC app. Choose **API permissions** from the left nav bar and examine the list of configured permissions for your app. If your app will only make RSC Graph API calls, delete all the permission on that page. If your app will also make non-RSC calls, keep those permissions as needed. >[!IMPORTANT]
->The Azure AD portal cannot be used to request RSC permissions. RSC permissions are currently exclusive to Teams applications installed in the Teams client and are declared in the app manifest (JSON) file.
+>The Azure AD portal cannot be used to request RSC permissions. RSC permissions are currently exclusive to Teams applications installed in the Teams client and are declared in the Teams app manifest (JSON) file.
## Obtain an access token from the Microsoft identity platform
The RSC permissions are declared in your app manifest (JSON) file. Add a [webAp
> [!div class="checklist"] >
-> - **id** ΓÇö your Azure AD app id. For more information, see [Register your app in the Azure AD portal](resource-specific-consent.md#register-your-app-with-microsoft-identity-platform-via-the-azure-ad-portal).
+> - **id** ΓÇö your Azure AD app ID. For more information, see [Register your app in the Azure AD portal](resource-specific-consent.md#register-your-app-with-microsoft-identity-platform-via-the-azure-ad-portal).
> - **resource** ΓÇö any string. This field has no operation in RSC, but must be added and have a value to avoid an error response; any string will do. > - **application permissions** ΓÇö RSC permissions for your app. For more information, see [Resource-specific Permissions](resource-specific-consent.md#resource-specific-permissions).
The RSC permissions are declared in your app manifest (JSON) file. Add a [webAp
> Non-RSC permissions are stored in the Azure portal. Do not add them to the app manifest. >
+### Example for RSC in a team
```json "webApplicationInfo": { "id": "XXxxXXXXX-XxXX-xXXX-XXxx-XXXXXXXxxxXX",
The RSC permissions are declared in your app manifest (JSON) file. Add a [webAp
} ```
+### Example for RSC in a chat
+```json
+"webApplicationInfo": {
+ "id": "XXxxXXXXX-XxXX-xXXX-XXxx-XXXXXXXxxxXX",
+ "resource": "https://RscBasedStoreApp",
+ "applicationPermissions": [
+ "ChatSettings.Read.Chat",
+ "ChatSettings.ReadWrite.Chat",
+ "ChatMessage.Read.Chat",
+ "ChatMember.Read.Chat",
+ "Chat.Manage.Chat",
+ "TeamsTab.Read.Chat",
+ "TeamsTab.Create.Chat",
+ "TeamsTab.Delete.Chat",
+ "TeamsTab.ReadWrite.Chat",
+ "TeamsAppInstallation.Read.Chat",
+ "OnlineMeeting.ReadBasic.Chat"
+ ]
+ }
+```
+
+>[!NOTE]
+>If the app is meant to support installation in both team and chat scopes, then both team and chat permissions can be specified in the same manifest under `applicationPermissions`.
+ ## Sideload your app in Teams
-If your Teams admin allows custom app uploads, you can [sideload your app](~/concepts/deploy-and-publish/apps-upload.md) directly to a specific team.
+If your Teams admin allows custom app uploads, you can [sideload your app](~/concepts/deploy-and-publish/apps-upload.md) directly to a specific team or chat.
## Check your app for added RSC permissions >[!IMPORTANT]
->The RSC permissions are not attributed to a user. Calls are made with app permissions, not user delegated permissions. Thus, the app may be allowed to perform actions that the user cannot, such as creating a channel or deleting a tab. You should review the team owner's intent for your use case prior to making RSC API calls. For more information, see [Microsoft Teams API overview](/graph/teams-concept-overview).
+>The RSC permissions are not attributed to a user. Calls are made with app permissions, not user delegated permissions. Thus, the app may be allowed to perform actions that the user cannot, such as deleting a tab. You should review the team owner's or chat owner's intent for your use case prior to making RSC API calls. For more information, see [Microsoft Teams API overview](/graph/teams-concept-overview).
-Once the app has been installed to a team, you can use [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer) to view the permissions that have been granted to the app in a team:
+Once the app has been installed to a resource, you can use [Graph Explorer](https://developer.microsoft.com/graph/graph-explorer) to view the permissions that have been granted to the app in the resource:
+
+### Check your app for added RSC permissions in a team
> [!div class="checklist"] >
Once the app has been installed to a team, you can use [Graph Explorer](https://
> - Select **Get link to team**. > - Copy and save the **groupId** value from the string. > - Log into **Graph Explorer**.
-> - Make a **GET** call to the following endpoint: `https://graph.microsoft.com/beta/groups/{teamGroupId}/permissionGrants`. The clientAppId field in the response will map to the appId specified in the Teams app manifest.
- ![Graph explorer response to GET call.](../../assets/images/graph-permissions.png)
+> - Make a **GET** call to the following endpoint: `https://graph.microsoft.com/beta/teams/{teamGroupId}/permissionGrants`. The `clientAppId` field in the response will map to the `webApplicationInfo.id` specified in the Teams app manifest.
+ ![Graph explorer response to GET call for team RSC permissions.](../../assets/images/team-graph-permissions.png)
+
+For information about how to get details about apps installed in a specific team, see [Get the names and other details of apps installed in the specified team](/graph/api/team-list-installedapps#example-2-get-the-names-and-other-details-of-installed-apps).
+
+### Check your app for added RSC permissions in a chat
+
+> [!div class="checklist"]
+>
+>- Get the chat thread ID from the Teams *web* client.
+> - In the Teams web client, select **Chat** from the far left nav bar.
+> - Select the chat where the app is installed from the drop-down menu.
+> - Copy the web URL and save the chat thread ID from the string.
+![Chat thread id from web URL.](../../assets/images/chat-thread-id.png)
+> - Log into **Graph Explorer**.
+> - Make a **GET** call to the following endpoint: `https://graph.microsoft.com/beta/chats/{chatId}/permissionGrants`. The `clientAppId` field in the response will map to the `webApplicationInfo.id` specified in the Teams app manifest.
+ ![Graph explorer response to GET call for chat RSC permissions.](../../assets/images/chat-graph-permissions.png)
+
+For information about how to get details about apps installed in a specific chat, see [Get the names and other details of apps installed in the specified chat](/graph/api/chat-list-installedapps#example-2-get-the-names-and-other-details-of-apps-installed-in-the-specified-chat).
## Code sample | **Sample name** | **Description** | **.NET** |**Node.js** |
platform Test Chat Rsc Json File https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/graph-api/rsc/test-chat-rsc-json-file.md
+
+ Title: Test resource-specific consent for a chat in Teams
+description: How to test resource-specific consent for a chat in Teams using Postman
+localization_priority: Normal
+++
+keywords: teams authorization OAuth SSO AAD rsc Postman Graph
++
+# Test chat RSC Postman collection for JSON
+
+```json
+{
+ "info": {
+ "_postman_id": "36d695ea-3ce2-4b2d-a1ac-b1721d2d46f1",
+ "name": "Test-ChatRSC",
+ "description": "Collection to test RSC.",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+ },
+ "item": [
+ {
+ "name": "Teams client app installation flow",
+ "item": [
+ {
+ "name": "Chat - Create App Context Token",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "\r",
+ " // Set the app_context access token\r",
+ " const { access_token } = pm.response.json();\r",
+ " pm.environment.set(\"appContextToken\", access_token);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "type": "text",
+ "value": "application/x-www-form-urlencoded",
+ "disabled": true
+ }
+ ],
+ "body": {
+ "mode": "urlencoded",
+ "urlencoded": [
+ {
+ "key": "grant_type",
+ "value": "client_credentials",
+ "type": "text"
+ },
+ {
+ "key": "client_id",
+ "value": "{{azureADAppId}}",
+ "type": "text"
+ },
+ {
+ "key": "client_secret",
+ "value": "{{azureADAppSecret}}",
+ "type": "text"
+ },
+ {
+ "key": "scope",
+ "value": "{{token_scope}}",
+ "type": "text"
+ }
+ ]
+ },
+ "url": {
+ "raw": "https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token",
+ "protocol": "https",
+ "host": [
+ "login",
+ "microsoftonline",
+ "com"
+ ],
+ "path": [
+ "{{tenantId}}",
+ "oauth2",
+ "v2.0",
+ "token"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Chat",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200)\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/chats/{{chatId}}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "chats",
+ "{{chatId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Chat Members",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200)\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/chats/{{chatId}}/members",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "chats",
+ "{{chatId}}",
+ "members"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Chat Messages",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200)\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/chats/{{chatId}}/messages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "chats",
+ "{{chatId}}",
+ "messages"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Tabs",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "\r",
+ " const { internalId } = pm.response.json();\r",
+ " pm.environment.set(\"generalChannelId\", internalId);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/chats/{{chatId}}/tabs",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "chats",
+ "{{chatId}}",
+ "tabs"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get PermissionGrants",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200)\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/chats/{{chatId}}/permissionGrants",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "chats",
+ "{{chatId}}",
+ "permissionGrants"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get InstalledApps",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "\r",
+ " const { internalId } = pm.response.json();\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "Bearer {{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/chats/{{chatId}}/installedApps?$expand=teamsApp",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "chats",
+ "{{chatId}}",
+ "installedApps"
+ ],
+ "query": [
+ {
+ "key": "$expand",
+ "value": "teamsApp"
+ }
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ }
+ ]
+}
+```
platform Test Resource Specific Consent https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/graph-api/rsc/test-resource-specific-consent.md
keywords: teams authorization OAuth SSO AAD rsc Postman Graph
# Test resource-specific consent permissions in Teams
-Resource-specific consent (RSC) is a Microsoft Teams and Graph API integration that enables your app to use API endpoints to manage specific teams within an organization. For more information, see [Resource-specific consent (RSC) ΓÇö Microsoft Teams Graph API](resource-specific-consent.md).
+Resource-specific consent (RSC) is a Microsoft Teams and Graph API integration that enables your app to use API endpoints to manage specific resourcesΓÇöeither teams or chatsΓÇöwithin an organization. For more information, see [Resource-specific consent (RSC) ΓÇö Microsoft Teams Graph API](resource-specific-consent.md).
> [!NOTE] > To test the RSC permissions, your Teams app manifest file must include a **webApplicationInfo** key populated with the following fields:
Resource-specific consent (RSC) is a Microsoft Teams and Graph API integration t
> - **resource**: Any string, see the note in [Update your Teams app manifest](resource-specific-consent.md#update-your-teams-app-manifest). > - **application permissions**: RSC permissions for your app, see [Resource-specific Permissions](resource-specific-consent.md#resource-specific-permissions).
+## Example for a team
```json "webApplicationInfo":{ "id":"XXxxXXXXX-XxXX-xXXX-XXxx-XXXXXXXxxxXX",
Resource-specific consent (RSC) is a Microsoft Teams and Graph API integration t
} ```
+## Example for a chat
+```json
+"webApplicationInfo":{
+ "id":"XXxxXXXXX-XxXX-xXXX-XXxx-XXXXXXXxxxXX",
+ "resource":"https://AnyString",
+ "applicationPermissions":[
+ "ChatSettings.Read.Chat",
+ "ChatSettings.ReadWrite.Chat",
+ "ChatMessage.Read.Chat",
+ "ChatMember.Read.Chat",
+ "Chat.Manage.Chat",
+ "TeamsTab.Read.Chat",
+ "TeamsTab.Create.Chat",
+ "TeamsTab.Delete.Chat",
+ "TeamsTab.ReadWrite.Chat",
+ "TeamsAppInstallation.Read.Chat",
+ "OnlineMeeting.ReadBasic.Chat"
+ ]
+ }
+```
+ > [!IMPORTANT] > In your app manifest, only include the RSC permissions that you want your app to have.
-## Test added RSC permissions using the Postman app
+>[!NOTE]
+>If the app is meant to support installation in both team and chat scopes, then both team and chat permissions can be specified in the same manifest under `applicationPermissions`.
-To check whether the RSC permissions are being honored by the API request payload, you need to copy the [RSC JSON test code](test-rsc-json-file.md) into your local environment and update the following values:
+### Test added RSC permissions to a team using the Postman app
+
+To check whether the RSC permissions are being honored by the API request payload, you need to copy the [RSC JSON test code for team](test-team-rsc-json-file.md) into your local environment and update the following values:
* `azureADAppId`: Your app's Azure AD app ID. * `azureADAppSecret`: Your Azure AD app password.
To check whether the RSC permissions are being honored by the API request payloa
4. Select **Get link to team**. 5. Copy and save the **groupId** value from the string.
+## Test added RSC permissions to a chat using the Postman app
+
+To check whether the RSC permissions are being honored by the API request payload, you need to copy the [RSC JSON test code for chats](test-chat-rsc-json-file.md) into your local environment and update the following values:
+
+* `azureADAppId`: Your app's Azure AD app ID.
+* `azureADAppSecret`: Your Azure AD app password.
+* `token_scope`: The scope is required to get a token. set the value to https://graph.microsoft.com/.default.
+* `tenantId`: The name or the AAD Object ID of your tenant.
+* `chatId`: You can get the chat thread id from the Teams *web* client as follows:
+
+ 1. In the Teams web client, select **Chat** from the far left navigation bar.
+ 2. Select the chat where the app is installed from the dropdown menu.
+ 3. Copy the web URL and save the chat thread id from the string.
+![Chat thread id from web URL.](../../assets/images/chat-thread-id.png)
+ ### Use Postman 1. Open the [Postman](https://www.postman.com) app.
Execute the entire permissions collection for each API call. The permissions tha
## Test revoked RSC permissions using [Postman](https://www.postman.com/)
-1. Uninstall the app from the specific team.
-2. Follow the steps for [Test added RSC permissions using Postman](#test-added-rsc-permissions-using-the-postman-app).
-3. Check all the response status codes to confirm that the specific API calls, **succeeded, have failed with an HTTP 403 status code**.
+1. Uninstall the app from the specific resource.
+2. Follow the steps for either chat or team:
+ 1. [Test added RSC permissions to a team using Postman](#test-added-rsc-permissions-to-a-team-using-the-postman-app).
+ 2. [Test added RSC permissions to a chat using Postman](#test-added-rsc-permissions-to-a-chat-using-the-postman-app).
+3. Check all the response status codes to confirm that the specific API calls **have failed with an HTTP 403 status code**.
## See also
platform Test Team Rsc Json File https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/graph-api/rsc/test-team-rsc-json-file.md
+
+ Title: Test resource-specific consent for a team in Teams
+description: How to test resource-specific consent for a team in Teams using Postman
+localization_priority: Normal
+++
+keywords: teams authorization OAuth SSO AAD rsc Postman Graph
++
+# Test team RSC Postman collection JSON
+
+```json
+{
+ "info": {
+ "_postman_id": "57dc5f09-d719-4d48-a50d-6b09053cc7a7",
+ "name": "Test-RSC",
+ "description": "Collection to test RSC.",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+ },
+ "item": [
+ {
+ "name": "Create App Context Token",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "1e0d2bb5-8d0d-47a1-a42e-fcd8d58bb8a3",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "\r",
+ " // Set the app_context access token\r",
+ " const { access_token } = pm.response.json();\r",
+ " pm.environment.set(\"appContextToken\", access_token);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "type": "text",
+ "value": "application/x-www-form-urlencoded",
+ "disabled": true
+ }
+ ],
+ "body": {
+ "mode": "urlencoded",
+ "urlencoded": [
+ {
+ "key": "grant_type",
+ "value": "client_credentials",
+ "type": "text"
+ },
+ {
+ "key": "client_id",
+ "value": "{{azureADAppId}}",
+ "type": "text"
+ },
+ {
+ "key": "client_secret",
+ "value": "{{azureADAppSecret}}",
+ "type": "text"
+ },
+ {
+ "key": "scope",
+ "value": "{{token_scope}}",
+ "type": "text"
+ }
+ ]
+ },
+ "url": {
+ "raw": "https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token",
+ "protocol": "https",
+ "host": [
+ "login",
+ "microsoftonline",
+ "com"
+ ],
+ "path": [
+ "{{tenantId}}",
+ "oauth2",
+ "v2.0",
+ "token"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Team",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "92ae0b6b-859c-4210-b9ee-d7e76b1bb523",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "\r",
+ " const { internalId } = pm.response.json();\r",
+ " pm.environment.set(\"generalChannelId\", internalId);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "{{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Edit Team",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "f4fcb689-366e-4d28-9113-45adf84495a5",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(204);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "{{appContextToken}}",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{ \r\n \"funSettings\": {\r\n \"allowGiphy\": true,\r\n \"giphyContentRating\": \"strict\"\r\n },\r\n}"
+ },
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Channels",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "5acf1e2a-e4bb-4146-a4a7-d8677a3356be",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "{{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}/channels",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}",
+ "channels"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Specific Channel",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "da816d2b-97d6-4cd6-b243-2eb5257cce7c",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "{{appContextToken}}"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}/channels/{{generalChannelId}}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}",
+ "channels",
+ "{{generalChannelId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Channel Messages",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "c511c14f-a193-4387-84d1-94d05f12ee67",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "type": "text",
+ "value": "{{appContextToken}}"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}/channels/{{generalChannelId}}/messages",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}",
+ "channels",
+ "{{generalChannelId}}",
+ "messages"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Create Channel",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "6e58c6b2-7dd5-4746-b9cb-3b0b1d3b80e7",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "\r",
+ "pm.test(\"Status Code 201 or 400\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.expect(pm.response.code).to.be.oneOf([201, 400]); //400 means that at least the permission check \r",
+ "});\r",
+ "\r",
+ "// pm.test(\"Status Code 201\", () => {\r",
+ "// // Need to validate the request succeeded. \r",
+ "// pm.response.to.have.status(201);\r",
+ "// });\r",
+ "\r",
+ "\r",
+ "// pm.test(\"Successful POST request\", function () {\r",
+ "// pm.expect(pm.response.code).to.be.oneOf([201, 400]); //400 means that at least the permission check passed\r",
+ "// });"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "{{appContextToken}}",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\r\n \"displayName\": \"ChannelCreatedThruRsc\",\r\n \"description\": \"This channel was created using RSC\",\r\n \"membershipType\": \"standard\"\r\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}/channels",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}",
+ "channels"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Tabs",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "aeafd689-f2b5-48b7-8f44-4d53f070b46e",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "{{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}/channels/{{generalChannelId}}/tabs",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}",
+ "channels",
+ "{{generalChannelId}}",
+ "tabs"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Add Tab",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "0a7cae52-c103-403f-a016-d22c9fe1a477",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 201\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(201);\r",
+ "\r",
+ " const { id } = pm.response.json();\r",
+ " pm.environment.set(\"createdTabId\", id);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "{{appContextToken}}",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n\t\"teamsApp@odata.bind\":\"https://graph.microsoft.com/beta/appCatalogs/teamsApps/com.microsoft.teamspace.tab.powerbi\",\n\t\"displayName\":\"TabCreatedThroughRsc\"\n}"
+ },
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}/channels/{{generalChannelId}}/tabs",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}",
+ "channels",
+ "{{generalChannelId}}",
+ "tabs"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Edit Tab",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "70276fd7-6d40-4305-9628-735170a6e749",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "PATCH",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "{{appContextToken}}",
+ "type": "text"
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n\"displayName\":\"UpdatedTabName\"\n}"
+ },
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}/channels/{{generalChannelId}}/tabs/{{createdTabId}}",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}",
+ "channels",
+ "{{generalChannelId}}",
+ "tabs",
+ "{{createdTabId}}"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get InstalledApps",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "14554c18-68b8-45ec-b1fb-33049b72ff95",
+ "exec": [
+ "console.log(\"responseHeaders: \" + JSON.stringify(pm.response.headers));\r",
+ "console.log(\"responseBody: \" + JSON.stringify(pm.response.text()));\r",
+ "\r",
+ "pm.test(\"Status Code 200\", () => {\r",
+ " // Need to validate the request succeeded. \r",
+ " pm.response.to.have.status(200);\r",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "Authorization",
+ "value": "{{appContextToken}}",
+ "type": "text"
+ }
+ ],
+ "url": {
+ "raw": "https://graph.microsoft.com/beta/teams/{{teamGroupId}}/installedApps?$expand=teamsApp",
+ "protocol": "https",
+ "host": [
+ "graph",
+ "microsoft",
+ "com"
+ ],
+ "path": [
+ "beta",
+ "teams",
+ "{{teamGroupId}}",
+ "installedApps"
+ ],
+ "query": [
+ {
+ "key": "$expand",
+ "value": "teamsApp"
+ }
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "protocolProfileBehavior": {}
+}
+```
platform Azure Provisioning Instructions https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/includes/get-started/azure-provisioning-instructions.md
Deployment consists of two steps. First, necessary cloud resources are created
:::image type="content" source="~/assets/images/teams-toolkit-v2/provision-warning.png" alt-text="Screenshot of the provisioning dialog.":::
- The provisioning process will create resources in the Azure cloud. This will take some time. You can monitor the progress by watching the dialogs in the bottom right corner. After a few minutes, you will see the following notice:
+ The provisioning process creates resources in the Azure cloud. This takes some time. You can monitor the progress by watching the dialogs in the bottom right corner. After a few minutes, you see the following notice:
:::image type="content" source="~/assets/images/teams-toolkit-v2/provision-complete.png" alt-text="Screenshot showing the provisioning complete dialog.":::
-1. Once provisioning is complete, select **Deploy to the Cloud**. As with provisioning, this process takes some time. You can monitor the process by watching the dialogs in the bottom right corner. After a few minutes, you will see a completion notice.
+1. Once provisioning is complete, select **Deploy to the Cloud**. As with provisioning, this process takes some time. You can monitor the process by watching the dialogs in the bottom right corner. After a few minutes, you see a completion notice.
# [Command Line](#tab/cli)
In your terminal window:
teamsfx provision ```
- You may be prompted to log in to your Azure subscription. If required, you will be prompted to select an Azure subscription to use for the Azure resources.
+ You may be prompted to log in to your Azure subscription. If required, you are prompted to select an Azure subscription to use for the Azure resources.
> [!NOTE] > There are always some Azure resources used for hosting your app.
In your terminal window:
> [!NOTE] > **What's the difference between Provision and Deploy?** >
-> The **Provision** step will create resources in Azure and M365 for your app, but no code (HTML, CSS, JavaScript, etc.) is copied to the resources. The **Deploy** step will copy the code for your app to the resources you created during the provision step. It is common to deploy multiple times without provisioning new resources. Since the provision step can take some time to complete, it is separate from the deployment step.
+> The **Provision** step creates resources in Azure and M365 for your app, but no code (HTML, CSS, JavaScript, etc.) is copied to the resources. The **Deploy** step copies the code for your app to the resources you created during the provision step. It is common to deploy multiple times without provisioning new resources. Since the provision step can take some time to complete, it is separate from the deployment step.
Once the provisioning and deployment steps are finished:
platform Teams Low Code Solutions https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/samples/teams-low-code-solutions.md
Microsoft Teams is extensible and adaptive. This means that you can build custom applications for Teams that meet the distinct needs of your users. The low code custom apps save time, provide speedy solutions and meet the demand than the apps created from scratch. This document gives an overview of Microsoft Power Platform, Power Virtual Agents chatbot, and Virtual Assistant.
-Low code platforms provide an intuitive approach to software development and require little or no coding to build applications and processes. They allow the developers without experience, to build custom apps easily with little or no coding, and professional developers to develop and deploy the app quickly. These platforms consist of a visual interface, connectors to backend services, and a built-in app lifecycle management system to build, debug, deploy, and maintain applications. Microsoft Power Platform is the innovative gateway to rapidly build Teams compatible apps using low code attributes.
+Low code platforms provide an intuitive approach to software development with minimum or no coding to build applications and processes. They allow the developers without experience, to build custom apps easily with little or no coding, and professional developers to develop and deploy the app quickly. These platforms consist of a visual interface, connectors to backend services, and a built-in app lifecycle management system to build, debug, deploy, and maintain applications. Microsoft Power Platform is the innovative gateway to rapidly build Teams compatible apps using low code attributes.
## Teams and Microsoft Power Platform
platform Using Teams Client Sdk https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/tabs/how-to/using-teams-client-sdk.md
See the following tables to understand commonly used SDK functions. The [SDK ref
|`microsoftTeams.authentication.authenticate(authenticateParameters?: AuthenticateParameters)`|Initiates an authentication request that opens a new window with the parameters provided by the caller. Optional input values are defined by the **AuthenticateParameters** object.|[function](/javascript/api/@microsoft/teams-js/microsoftteams.authentication?view=msteams-client-js-latest&preserve-view=true)<br/>[auth obj](/javascript/api/@microsoft/teams-js/microsoftteams.authentication.authenticateparameters?view=msteams-client-js-latest&preserve-view=true)| |`microsoftTeams.authentication.notifySuccess(result?: string, callbackUrl?: string)`|Notifies the frame that initiated the authentication request that the request was successful and closes the authentication window|[function](/javascript/api/@microsoft/teams-js/microsoftteams.authentication?view=msteams-client-js-latest&preserve-view=true)| |`microsoftTeams.authentication.notifyFailure(reason?: string, callbackUrl?: string)`|Notifies the frame that initiated the authentication request that the request failed and closes the authentication window.|[function](/javascript/api/@microsoft/teams-js/microsoftteams.authentication?view=msteams-client-js-latest&preserve-view=true)|
+|`microsoftTeams.authentication.getAuthToken(authTokenRequest: AuthTokenRequest)`|Send request to issue Azure AD token on behalf of the app. The token can be acquired from the cache, if it has not expired. Otherwise, a request is sent to Azure AD to obtain a new token.|[function](/javascript/api/@microsoft/teams-js/microsoftteams.authentication?view=msteams-client-js-latest#getAuthToken_AuthTokenRequest_&preserve-view=true)|
### Settings namespace
platform Cards Format https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/task-modules-and-cards/cards/cards-format.md
Use the information masking property to mask specific information, such as passw
> [!NOTE] > The feature only supports client side information masking, the masked input text is sent as clear text to the https endpoint address that was specified during [bot configuration](../../build-your-first-app/build-bot.md).
-> [!NOTE]
-> The information masking property is currently available in the developer preview only.
- #### Sample Adaptive card with masking property ```json
platform Cards Reference https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/task-modules-and-cards/cards/cards-reference.md
An adaptive card is a customizable card that can contain any combination of text
> [!NOTE] > * Teams platform supports v1.2 or earlier of adaptive card features.
-> * Media elements are currently not supported in adaptive card v1.2 on the Teams platform.
+> * Positive or destructive action styling is not supported in Adaptive Cards on the Teams platform.
+> * Media elements are currently not supported in Adaptive Cards on the Teams platform.
### Example of an adaptive card
platform Visual Studio Code Overview https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/toolkit/visual-studio-code-overview.md
You also can use the toolkit with Visual Studio or as a CLI (called `teamsfx`).
You also can find the Teams Toolkit on the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension).
-The following tools will be installed by the Visual Studio Code extension when they are needed. If already installed, the installed version will be used instead. If using Linux (including WSL), you must install these tools before use:
+The following tools are installed by the Visual Studio Code extension when they are needed. If already installed, the installed version is used instead. If using Linux (including WSL), you must install these tools before use:
- [Azure Functions Core Tools](/azure/azure-functions/functions-run-local)
- Azure Functions Core Tools is used to run any backend components locally during a local debug run, including the authentication helpers required when running your services in Azure. It is installed within the project directory (using the npm `devDependencies`).
+ Azure Functions Core Tools is used to run any backend components locally during a local debug run, including the authentication helpers required when running your services in Azure. It is installed within the project directory using the npm `devDependencies`.
- [.NET SDK](/dotnet/core/install/)
- The .NET SDK is used to install customized bindings for local debugging and Azure Functions app deployments. If you have not installed the .NET 3.1 (or later) SDK globally, the portable version will be installed.
+ The .NET SDK is used to install customized bindings for local debugging and Azure Functions app deployments. If you have not installed the .NET 3.1 or later SDK globally, the portable version is installed.
- [ngrok](https://ngrok.com/download)
- Some Teams app features (conversational bots, messaging extensions, and incoming webhooks) require inbound connections. You need to expose your development system to Teams through a tunnel. A tunnel is not required for apps that only include tabs. This package is installed within the project directory (using npm `devDependencies`).
+ Some Teams app features (conversational bots, messaging extensions, and incoming webhooks) require inbound connections. You need to expose your development system to Teams through a tunnel. A tunnel is not required for apps that only include tabs. This package is installed within the project directory (using npm `devDependencies`).
## Use the Teams Toolkit for Visual Studio Code
The following tools will be installed by the Visual Studio Code extension when t
## Set up a new Teams project
-The Teams Toolkit can create React apps that will be hosted in Azure or SPFx web parts that will be hosted on your M365 SharePoint environment. To create a new React app to be hosted on Azure:
+The Teams Toolkit can create React apps that are hosted in Azure or SPFx web parts that are hosted on your M365 SharePoint environment. To create a new React app to be hosted on Azure:
1. Open Visual Studio code. 1. Open the Teams Toolkit by selecting the Teams icon in the sidebar:
The Teams Toolkit can create React apps that will be hosted in Azure or SPFx web
:::image type="content" source="../assets/images/teams-toolkit-v2/create-new-project-intro.png" alt-text="Wizard start for Create New Project":::
-1. On the **Select capabilities** step, the **Tab** capability will already be selected. You can also optionally select **Bot** and **Messaging Extension**. Press **OK**.
+1. On the **Select capabilities** step, the **Tab** capability is already selected. You can also optionally select **Bot** and **Messaging Extension**. Press **OK**.
:::image type="content" source="../assets/images/teams-toolkit-v2/create-project-capabilities.png" alt-text="Screenshot showing how to add capabilities to your new app.":::
The Teams Toolkit can create React apps that will be hosted in Azure or SPFx web
:::image type="content" source="../assets/images/teams-toolkit-v2/create-project-hosting.png" alt-text="Screenshot showing how to select hosting for your new app.":::
-1. (Optional) On the **Cloud resources** step, select cloud resources that your application will use. You can select CRUD (create, read, update, delete) access to a SQL table or an API:
+1. Optionally, on the **Cloud resources** step, select cloud resources that your application uses. You can select CRUD (create, read, update, and delete) access to a SQL table or an API:
:::image type="content" source="../assets/images/teams-toolkit-v2/create-project-cloud-resources.png" alt-text="Screenshot showing how to add cloud resources for your new app.":::
The Teams Toolkit can create React apps that will be hosted in Azure or SPFx web
:::image type="content" source="../assets/images/teams-toolkit-v2/create-project-programming-languages.png" alt-text="Screenshot showing how to select the programming language.":::
-1. Select a workspace folder. A folder will be created within your workspace folder for the project you are creating.
+1. Select a workspace folder. A folder is created within your workspace folder for the project you are creating.
-1. Enter a suitable name for your app, like `helloworld`. The name of the app must consist only of alphanumeric characters. Press **Enter** to continue.
+1. Enter a suitable name for your app, like `helloworld`. The name of the app must consist only of alphanumeric characters. Press **Enter** to continue.
-Your Teams app will be created within a few seconds. The scaffolded app contains code to handle single sign-on with Azure Active Directory and access to the Microsoft Graph. If you selected Azure resources, then the code for those resources will also be available.
+Your Teams app is created within a few seconds. The scaffolded app contains code to handle single sign-on with Azure Active Directory and access to the Microsoft Graph. If you selected Azure resources, then the code for those resources is also available.
For a walk-through of the SPFx creation and publication process, see the [SPFx tutorial](../get-started/first-app-spfx.md).
For a walk-through of the SPFx creation and publication process, see the [SPFx t
At its core, the Teams app embraces three components: 1. The Microsoft Teams client (web, desktop or mobile) where users interact with your app.
- 1. A server that responds to requests for content that will be displayed in Teams. For example, HTML tab content or a bot adaptive card.
+ 1. A server that responds to requests for content that is displayed in Teams. For example, HTML tab content or a bot Adaptive Card.
1. A Teams app package consists of three files: > [!div class="checklist"]
The manifest and icons are stored in the `.fx` folder of your project prior to b
1. To configure your app, navigate to the **Teams Toolkit** tab in Visual Studio Code. 1. Select **Manifest Editor** in the **Project** section.
-Editing the fields in the App details page updates the contents of the manifest.json file that will ultimately ship as part of the app package.
+Editing the fields in the App details page updates the contents of the manifest.json file that is ultimately shipped as part of the app package.
## Install and run your app locally
To build and run your app locally:
> When you run the app for the first time, all dependencies are downloaded and the app is built. A browser window automatically opens when the build is complete. This can take 3-5 minutes to complete.
- The toolkit will prompt you to install a local certificate if needed. This certificate allows Teams to load your application from `https://localhost`. Select yes when the following dialog appears:
+ The toolkit prompts you to install a local certificate if required. This certificate allows Teams to load your application from `https://localhost`. Select yes when the following dialog appears:
:::image type="content" source="../assets/images/teams-toolkit-v2/ssl-prompt.png" alt-text="Screenshot showing how the prompt to install a SSL certificate to enable Teams to load your application from localhost.":::
To build and run your app locally:
:::image type="content" source="../assets/images/teams-toolkit-v2/launch-web-browser-and-pick-webapp.png" alt-text="Screenshot showing how to pick the web version of teams when launched":::
-1. You may be prompted to sign in. If so, sign in with your M365 account.
+1. You may be prompted to sign in. If so, sign in with your M365 account.
1. When prompted to install the app onto Teams, press **Add**. Both the backend and frontend are hooked into the Visual Studio Code debugger. This allows you to set breakpoints anywhere in your code and inspect state. You can also use any frontend debugging tools (such as the React Developer Tools) within the browser. For more information about debugging in Visual Studio Code, review [the documentation](https://code.visualstudio.com/Docs/editor/debugging).
platform Whats New https://github.com/MicrosoftDocs/msteams-docs/commits/master/msteams-platform/whats-new.md
Discover Microsoft Teams platform features that are introduced in Microsoft Buil
| **Date** | **Features** | **Changed topics** | | -- | | |
+|06/16/2021| Resource-specific consent for chats. |[Resource-specific consent](graph-api/rsc/resource-specific-consent.md), [Test resouce-specific consent permissions in Teams](graph-api/rsc/test-resource-specific-consent.md)|
|05/26/2021| Build tabs with Adaptive Cards. |[Build tabs](tabs/how-to/build-adaptive-card-tabs.md)| |05/25/2021| Updated Teams Toolkit for [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) and [Visual Studio](https://marketplace.visualstudio.com/items?itemName=msft-vsteamstoolkit.vsteamstoolkit&ssr=false#overview). | [Get started with Teams app development](~/get-started/prerequisites.md) | |05/25/2021| New Developer Portal for Teams introduced for managing your Teams apps. | [Developer Portal for Teams](concepts/build-and-test/teams-developer-portal.md) |
Microsoft Teams platform features that are available to all app developers.
|03/05/2021|Notice: Tabs will no longer have margins surrounding their experiences. Tab developers should review and update their apps. | [Removing tab margins](resources/removing-tab-margins.md) | |03/05/2021|Default install scope and group capability.| [Default install scope and group capability](concepts/deploy-and-publish/add-default-install-scope.md) | |03/05/2021|Reorder personal app tabs.|[Reorder the chat tab in personal apps](tabs/how-to/create-tab-pages/content-page.md#reorder-static-personal-tabs)|
-|03/04/2021|Information masking in Adaptive cards.| [Information masking in Adaptive cards](task-modules-and-cards/cards/cards-format.md#information-masking-in-adaptive-cards) |
+|03/04/2021|Information masking in Adaptive Cards.| [Information masking in Adaptive Cards](task-modules-and-cards/cards/cards-format.md#information-masking-in-adaptive-cards) |
|02/19/2021|Added location capabilities. <br/> Location capabilities information is added in the device capabilities overview, native device permissions, integrate media capabilities, and QR or barcode scanner capability files.|[Overview](concepts/device-capabilities/device-capabilities-overview.md), [Request device permissions](concepts/device-capabilities/native-device-permissions.md), [Integrate media capabilities](concepts/device-capabilities/mobile-camera-image-permissions.md), [Integrate QR or barcode scanner capability](concepts/device-capabilities/qr-barcode-scanner-capability.md), [Integrate location capabilities](concepts/device-capabilities/location-capability.md) | |02/18/2021|Added QR or barcode scanner capability. <br/> QR or barcode scanner capability information is added in the device capabilities overview, native device permissions, and integrate media capabilities files.|[Overview](concepts/device-capabilities/device-capabilities-overview.md), [Request device permissions](concepts/device-capabilities/native-device-permissions.md), [Integrate media capabilities](concepts/device-capabilities/mobile-camera-image-permissions.md), [Integrate QR or barcode scanner capability](concepts/device-capabilities/qr-barcode-scanner-capability.md) | |02/09/2021|Added device capabilities overview. <br/> Microphone capability information is added in the native device permissions and integrate media capabilities files.|[Overview](concepts/device-capabilities/device-capabilities-overview.md), [Request device permissions](concepts/device-capabilities/native-device-permissions.md), [Integrate media capabilities](concepts/device-capabilities/mobile-camera-image-permissions.md)|