Updates from: 02/10/2023 02:52:40
Service Microsoft Docs article Related commit history on GitHub Change details
platform Build Apps For Anonymous User https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/build-apps-for-anonymous-user.md
ms.localizationpriority: medium
# Build apps for anonymous users
-You can build bots, messaging extensions, cards and task modules in your app to engage with anonymous meeting participants.
+Anonymous users don't have an Azure Active Directory (Azure AD) identity and aren't federated with a tenant. The anonymous participants are like external users but their identity isn't shown in the meeting. An anonymous user can be a presenter or an attendee but can't be an organizer. You can build bots, messaging extensions, and cards and task modules in your app to engage with anonymous meeting participants.
-To test your app's experience for anonymous users, select the URL in the meeting invite and join the meeting from a private browser window.
+For anonymous users to interact with the apps in Teams meetings, ensure the following:
+
+1. Update your [app manifest](#app-manifest-update-for-anonymous-users).
+2. Enable the [anonymous user app interaction](#admin-setting-for-anonymous-user-app-interaction) in Teams admin center.
+
+## App manifest update for anonymous users
+
+To allow anonymous users to interact with the tab app, update the `supportsAnonymousGuestUsers` property to `true` in your app manifest schema v1.16 or later. Following is an example of the manifest:
+
+```json
+
+ "meetingExtensionDefinition": {
+ "supportsAnonymousGuestUsers": true
+ }
+
+```
+
+For more information, see [app manifest schema.](~/resources/schem#meetingextensiondefinition)
+
+## Anonymous user authentication flow
+
+Anonymous users can't be authenticated through Azure AD authentication or `getAuthToken` from the client SDK as they aren't Azure AD accounts. `getAuthToken` fails for anonymous users by returning the error `useGetAuthToken: Failed with error - User is not authenticated`. If you need to authenticate anonymous users, your app must identify anonymous users and provide an alternative authentication experience in the meetings. You can determine if a user is anonymous by validating [user's context](#in-meeting-getcontext-from-teams-client-library).
## Admin setting for anonymous user app interaction
-Teams admins can use the admin portal to enable or disable anonymous user app interaction for the entire tenant. This setting is enabled by default. For more information, see [allow anonymous users to interact with apps in meetings](/microsoftteams/meeting-settings-in-teams).
+Teams admins can use the Teams admin center to enable or disable anonymous user app interaction for the entire tenant. If your app needs to be accessed by anonymous users, ensure that the tenant admins enable the anonymous user app interaction. This setting is enabled by default. For more information, see [allow anonymous users to interact with apps in meetings](/microsoftteams/meeting-settings-in-teams).
+
+To test your apps experience for anonymous users, select the URL in the meeting invite and join the meeting from a private browser window.
## In-Meeting getContext from Teams client library
-Apps receive the following info for an anonymous user when they call the `getContext` API from the shared app stage. You can recognize anonymous users by checking for a `userLicenseType` value of **Unknown**.
+Apps receive the following information for an anonymous user when they call the `getContext` API from the [shared app stage](~/apps-in-teams-meetings/build-apps-for-teams-meeting-stage.md). You can recognize anonymous users by checking for a `userLicenseType` value of `Anonymous`.
+
+> [!NOTE]
+> The Live Share SDK isn't supported for anonymous users.
+
+# [JavaScript](#tab/javascript)
+
+```javascript
+
+microsoftTeams.app.getContext().then((context) => {
+ if (context.user.licenseType === "Anonymous")
+ {
+ // Add your custom logic here
+ }
+});
+
+```
+
+# [JSON](#tab/json)
+
+```json
+
+{
+ "app": {
+ "locale": "en-us",
+ "sessionId": "e0024c2a-067f-4f43-8423-6acac718b7a0",
+ "theme": "dark",
+ "parentMessageId": "",
+ "userClickTime": 1675776700117,
+ "host": {
+ "name": "Teams",
+ "clientType": "web",
+ "sessionId": "",
+ "ringId": "general"
+ }
+ },
+ "page": {
+ "frameContext": "meetingStage",
+ "subPageId": "",
+ "isMultiWindow": false,
+ "sourceOrigin": ""
+ },
+ "user": {
+ "id": "",
+ "licenseType": "Anonymous",
+ "loginHint": "",
+ "userPrincipalName": ""
+ },
+ "chat": {
+ "id": "19:meeting_ZmMyNWZjMzEtMWU0Mi00NDNmLWJhMmYtNjM4OTY0YmM0NWM2@thread.v2"
+ },
+ "meeting": {
+ "id": "MCMxOTptZWV0aW5nX1ptTXlOV1pqTXpFdE1XVTBNaTAwTkRObUxXSmhNbVl0TmpNNE9UWTBZbU0wTldNMkB0aHJlYWQudjIjMA=="
+ }
+}
-```csharp
-"userObjectId": "8:anon:<GUID1>",
-"userLicenseType": "Unknown",
-"loginHint": "8:teamsvisitor:<ID>",
-"userPrincipalName": "8:teamsvisitor:<ID>",
-"tid": "<meeting organizer tenant ID>"
``` ++ | **Property name** | **Description** | | | |
-| `userObjectId` | Unique generated value for the anonymous user. This value cannot be used in calls to Graph APIs. |
-| `userLicenseType` | `Unknown`, represents anonymous user. |
-| `loginHint` | Unique generated value. This value cannot be used as a hint in login flows. |
-| `userPrincipalName` | Unique generated value. This value cannot be used in calls to Graph APIs. |
-| `tid` | Tenant ID of the meeting organizer. |
+| `userObjectId` | Empty string for anonymous user. |
+| `userLicenseType` | `Anonymous` represents anonymous user. |
+| `loginHint` | Empty string for anonymous user. |
+| `userPrincipalName` | Empty string for anonymous user. |
-> [!NOTE]
-> When an anonymous user joins a meeting, a new user ID is generated. Whenever the anonymous user re-joins a meeting, a different user ID is generated.
+For more information on `getContext`, see [get context by using the Microsoft Teams JavaScript library.](~/tabs/how-to/access-teams-context.md#get-context-by-using-the-microsoft-teams-javascript-library)
## Bot activities and APIs
-With a few differences, the activities sent to your bot, and the responses that it receives from bot APIs, are consistent between anonymous and non-anonymous meeting participants. In general:
-
-* The user ID is a generated value that is different each time the anonymous user joins the meeting.
-* The `aadObjectId` property is omitted.
-* The `userRole` property is set to **anonymous**.
-* The provided tenant ID is set to the tenant ID of the meeting organizer.
+With a few differences, the activities sent to your bot and the responses that it receives from bot APIs are consistent between anonymous and non-anonymous meeting participants.
### Get members and get single member APIs
The [get members](/microsoftteams/platform/bots/how-to/get-teams-context#fetch-t
"name": "<AnonTest (Guest)>", "tenantId": "<GUID2>", "userRole": "anonymous"
-}
+}
``` | **Property name** | **Description** | | | | | `id` | Unique generated value for the anonymous user. | | `name` | Name provided by the anonymous user when joining the meeting. |
+| `userRole` | `Anonymous` represents anonymous user. |
| `tenantId` | Tenant ID of the meeting organizer. | | `userRole` | `anonymous`, represents anonymous user. |
-> [!NOTE]
-> The ID received from the bot APIs and the Microsoft Teams JavaScript client library (TeamsJS) API are not the same.
- ### ConversationUpdate activity MembersAdded and MembersRemoved
+`MembersAdded`
+ ```csharp
-{
- "membersAdded": [
- {
- "id": "<GUID1>"
- }
- ],
- "type": "conversationUpdate",
- "timestamp": "<timestamp>",
- "id": "<event unique identifier>",
- "channelId": "msteams",
- "serviceUrl": "<serviceURL>",
- "from": {
- "id": "<GUID2>"
- },
- "conversation": {
- "isGroup": true,
- "tenantId": "<tenant id>",
- "id": "<conversation id>"
- },
- "recipient": {
- "id": "<bot id>",
- "name": "<bot name>"
- },
- "channelData": {
- "tenant": {
- "id": "<tenant id>"
- },
- "source": null,
- "meeting": {
- "id": "<meeting id>"
- }
- }
-}
+protected override async Task OnTeamsMembersAddedAsync(IList<TeamsChannelAccount> membersAdded, TeamInfo teamInfo, ITurnContext<IConversationUpdateActivity> turnContext, CancellationToken cancellationToken)
+ {
+ foreach (var teamMember in membersAdded)
+ {
+ // If UserRole == "anonymous", it indicates an anonymous user
+ if (teamMember.UserRole == "anonymous" )
+ {
+ // Add your custom logic here
+ }
+ else
+ {
+ // Add your custom logic here
+ }
+ }
+ }
```
-| **Property name** | **Description** |
-| | |
-| `membersAdded.id` | Anonymous user ID. |
-| `from.id` | Meeting organizer ID. |
-| `conversation.tenantId` | Tenant ID of the meeting organizer. |
-| `conversation.id` | Conversation ID of the meeting chat. |
-| `tenant.id` | Tenant ID of the meeting organizer. |
+`MembersRemoved`
-Similar changes apply to the `membersRemoved` activity payload.
+```csharp
+protected override async Task OnTeamsMembersRemovedAsync(IList<TeamsChannelAccount> membersRemoved, TeamInfo teamInfo, ITurnContext<IConversationUpdateActivity> turnContext, CancellationToken cancellationToken)
+ foreach (var member in membersRemoved)
+ {
+ // If AadObjectId is null, it indicates an anonymous user
+ if (member.AadObjectId == null)
+ {
+ // Add your custom logic here
+ }
+ else
+ {
+ // Add your custom logic here
+ }
+ }
+```
> [!NOTE] >
-> When an anonymous user joins or leaves a meeting, the `from` object in the payload always has the id of the meeting organizer, even if the action was taken by someone else.
+> When an anonymous user joins or leaves a meeting, the `from` object in the payload always has the ID of the meeting organizer, even if the action was taken by someone else.
### Create Conversation API
-Bots are not allowed to initiate a One-on-One conversation with an anonymous user. If a bot calls the Create Conversation API with the user ID of an anonymous user, it will receive a `400` Bad Request status code and the following error response:
+Bots aren't allowed to initiate a one-on-one conversation with an anonymous user. If a bot calls the [Create Conversation API](/dotnet/api/microsoft.bot.builder.botframeworkadapter.createconversationasync) with the user ID of an anonymous user, it will receive a `400` Bad Request status code and the following error response:
```csharp
+var conversationParameters = new ConversationParameters
+ {
+ IsGroup = false,
+ Bot = turnContext.Activity.Recipient,
+ Members = new ChannelAccount[] { teamMember },
+ TenantId = turnContext.Activity.Conversation.TenantId,
+ };
+
+ await ((CloudAdapter)turnContext.Adapter).CreateConversationAsync(
+ conversationParameters,
+ async (t1, c1) =>
+ {
+ conversationReference = t1.Activity.GetConversationReference();
+ await ((CloudAdapter)turnContext.Adapter).ContinueConversationAsync(
+ _appId,
+ conversationReference,
+ async (t2, c2) =>
+ {
+ await t2.SendActivityAsync(proactiveMessage, c2);
+ },
+ cancellationToken);
+ },
+cancellationToken);
+```
+
+```json
{ "error": { "code": "BadArgument",
Bots are not allowed to initiate a One-on-One conversation with an anonymous use
} ```
-### Adaptive cards
+### Adaptive Cards
-Anonymous users can view and interact with Adaptive Cards in the meeting chat. Adaptive card actions behave the same way for anonymous and non-anonymous users. For more information, see [Card actions](/microsoftteams/platform/task-modules-and-cards/cards/cards-actions?tabs=json).
+Anonymous users can view and interact with Adaptive Cards in the meeting chat. Adaptive Card actions behave the same way for anonymous and non-anonymous users. For more information, see [Card actions](/microsoftteams/platform/task-modules-and-cards/cards/cards-actions?tabs=json).
## Known issues and limitations
Anonymous users can view and interact with Adaptive Cards in the meeting chat. A
* For an anonymous user, the user ID from `getContext` and the user ID received by the bot are different. It's not possible to correlate the two directly. If you need to track the user's identity between your tab and bot, you must prompt the user to authenticate with an external identity provider.
-* Anonymous users will see a generic app icon on bot messages and cards, instead of the app's actual icon. For example:
+* Anonymous users will see a generic app icon on bot messages and cards, instead of the app's actual icon.
+
+ :::image type="content" source="../assets/images/apps-in-meetings/app-icon.png" alt-text="Screenshot shows how the app icon displays for anonymous user.":::
+
+## Code sample
- :::image type="content" source="../assets/images/apps-in-meetings/app-icon.png" alt-text="This screenshot shows you how the app icon displays for anonymous user.":::
+|Sample name | Description | .NET | Manifest |
+|-|--|--|--|
+| Anonymous user support | Sample app to show anonymous user support in meeting apps. | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-anonymous-users/csharp) | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-anonymous-users/csharp/demo-manifest) |
## Next step
platform Build Apps For Teams Meeting Stage https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/build-apps-for-teams-meeting-stage.md
The following table includes the query parameters:
|Value|Type|Required|Description| |||-||
-|**callback**| String | Yes | Callback contains two parameters, error and result. The *error* can either contain an error of type *SdkError* or null when share is successful. The *result* can either contain a true value if there's a successful share or null when the share fails. |
+|**callback**| String | Yes | Callback contains two parameters, error and result. The *error* can contain either an error of type *SdkError* or null when share is successful. The *result* can contain either a true value if there's a successful share or null when the share fails. |
|**appContentURL**| String | Yes | The URL that will be shared on to the stage. | ### Example
The following table includes the query parameter:
|Value|Type|Required|Description| |||-||
-|**callback**| String | Yes | Callback contains two parameters, error and result. The *error* can either contain an error of type *SdkError* in case of an error or null when share is successful. The *result* can either contain an `IAppContentStageSharingState` object when share is successful or null in case of an error.|
+|**callback**| String | Yes | Callback contains two parameters, error and result. The *error* can contain either an error of type *SdkError* in case of an error or null when share is successful. The *result* can contain either an `IAppContentStageSharingState` object when share is successful or null in case of an error.|
### Example
The following table includes the query parameter:
|Value|Type|Required|Description| |||-||
-|**callback**| String | Yes | Callback contains two parameters, error and result. The *error* can either contain an error of type *SdkError* or null when share is successful. The result can either contain an `IAppContentStageSharingCapabilities` object, when share is successful or null in case of an error.|
+|**callback**| String | Yes | Callback contains two parameters, error and result. The *error* can contain either an error of type *SdkError* or null when share is successful. The result can contain either an `IAppContentStageSharingCapabilities` object, when share is successful or null in case of an error.|
### Example
You can build an in-meeting app for enabling meeting participants to sign docume
You can use an in-meeting signing app to:
-* Add documents to be reviewed during a meeting
-* Share documents to be reviewed to main stage
-* Sign documents using the signerΓÇÖs identity
+* Add documents to be reviewed during a meeting.
+* Share documents to be reviewed to main stage.
+* Sign documents using the signerΓÇÖs identity.
The participants can review and sign documents, such as purchase agreements and purchase orders. The following participant roles may be involved during the meeting:
The following table provides the user types and lists the features that each use
| User type | Scheduled meeting or Instant calendar meeting | One-on-one call | Group call | Scheduled channel meeting | | :-- | :-- | :-- | :-- | :-- |
-| In-tenant | Presenter or organizer can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with app on meeting stage. <br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. |
-| Guest | Presenter or organizer can start, view and interact with app on meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. |
-| Federated or External | Presenter can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. | Not available | Not available | Presenter can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. |
-| Anonymous | Not available | Not available | Not available | Not available |
+| In-tenant | Presenter or organizer can start, view, and interact with the app in the meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with the app on meeting stage. <br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with the app on meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with the app on meeting stage.<br><br> Attendee can only view and interact. |
+| Guest | Presenter or organizer can start, view and interact with the app in the meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with the app on meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with the app on meeting stage.<br><br> Attendee can only view and interact. | Presenter or organizer can start, view, and interact with the app on meeting stage.<br><br> Attendee can only view and interact. |
+| Federated or External | Presenter can start, view, and interact with the app in the meeting stage.<br><br> Attendee can only view and interact. | Not available | Not available | Presenter can start, view, and interact with app on meeting stage.<br><br> Attendee can only view and interact. |
+| Anonymous |Presenter can start, view, and interact with the app on meeting stage.<br><br> Attendee can only view and interact. | Not available | Not available | Not available |
## Code sample
platform Build Extensible Conversation For Meeting Chat https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/build-extensible-conversation-for-meeting-chat.md
The following table provides the user types and lists the features that each use
| :-- | :-- | :-- | :-- | :-- | | In-tenant | Can view messages, interact with the content, and invoke the bot. | Available | Available | Available | | Guest, part of the tenant Azure AD | Can view messages, interact with the content, and invoke the bot. | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. |
-| Federated users, for more information, see [non-standard users](/microsoftteams/non-standard-users). |Can view messages, interact with the content, and invoke the bot. | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. |
-| Anonymous | Can view messages and interact with the bot. | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. |
+| Federated, for more information, see [non-standard users](/microsoftteams/non-standard-users). |Can view messages, interact with the content, and invoke the bot. | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. |
+| Anonymous | Can view and interact with the messages sent by the bot. Can't invoke the bot. | Not available | Interactions in the meeting chat are allowed. | Interactions in the meeting chat from Adaptive Card are allowed. |
## See also
platform Build Tabs For Meeting https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/build-tabs-for-meeting.md
Every team has a different way of communicating and collaborating tasks. To achi
Tabs allow the meeting participants to access services and content in a specific space within a meeting. If you're new to Microsoft Teams tab development, see [build tabs for Teams](/microsoftteams/platform/tabs/what-are-tabs).
-Before creating a meeting tab, it's important to learn about the surfaces that are available to target the meeting chat view, meeting details view, meeting side panel view and meeting stage view.
+Before creating a meeting tab, it's important to learn about the surfaces that are available to target the meeting chat view, meeting details view, meeting side panel view, and meeting stage view.
### Meeting details view 1. In your calendar, select a meeting to which you want to add a tab. 1. Select the **Details** tab and select :::image type="icon" source="../assets/icons/add-icon.png" Border = "false":::. The app gallery appears.
- :::image type="content" source="~/assets/images/apps-in-meetings/Pre-Meeting-002.png" alt-text="This screenshot shows the pre-meeting app experience in Teams meeting.":::
+ :::image type="content" source="~/assets/images/apps-in-meetings/pre-meeting-002.png" alt-text="This screenshot shows the pre-meeting app experience in Teams meeting.":::
1. In the app gallery, select the app that you want to add and follow the steps as required. The tab is added to the meeting details page.
Before creating a meeting tab, it's important to learn about the surfaces that a
The following image shows a tab added to the meeting details page in the Teams desktop client:
- :::image type="content" source="~/assets/images/apps-in-meetings/PreMeetingTab.png" alt-text="The screenshot shows desktop Teams tabs in the meeting details view in the Teams meeting.":::
+ :::image type="content" source="~/assets/images/apps-in-meetings/premeetingtab.png" alt-text="The screenshot shows desktop Teams tabs in the meeting details view in the Teams meeting.":::
# [Mobile](#tab/mobile) The following image shows a tab added to the meeting details page in the Teams mobile client:
- :::image type="content" source="../assets/images/mobile-tab.png" alt-text="The screenshot shows mobile Teams tabs in the meeting details view in the Teams meeting.":::
+ :::image type="content" source="../assets/images/mobile-tab.png" alt-text="Screenshot shows mobile Teams tabs in the meeting details view in the Teams meeting.":::
The following image shows a tab added to the meeting details page in the Teams m
1. During a meeting, you can select :::image type="icon" source="../assets/icons/add-icon.png" Border = "false"::: **Apps** from Teams meeting window to add apps to the meeting.
- :::image type="content" source="../assets/images/apps-in-meetings/add-app.png" alt-text="This screenshot shows how to add an app in Teams meeting window.":::
+ :::image type="content" source="../assets/images/apps-in-meetings/add-app.png" alt-text="Screenshot shows how to add an app in Teams meeting window.":::
1. In the app gallery, select the app that you want to add and follow the steps as required. The app is added to the meeting side panel.
- :::image type="content" source="../assets/images/side-panel-view.png" alt-text="This screenshot shows side panel view with the list of apps.":::
+ :::image type="content" source="../assets/images/side-panel-view.png" alt-text="Screenshot shows side panel view with the list of apps.":::
### Meeting stage view
However, the tab instances in a channel meeting are separate from the tabs in th
In public scheduled channel meetings, after a meeting tab is added, you can select the meeting object in the meeting details page to access the tab. > [!NOTE] > On mobile, anonymous users can't access apps in scheduled public channel meetings. ### App manifest settings for Tabs in meeting
-Update your [app manifest](/microsoftteams/platform/resources/schema/manifest-schema) with relevant context property to configure the different tab views. The meetings app capabilities are declared in your app manifest using the scopes and context arrays under the configurableTabs section.
+Update your [app manifest](/microsoftteams/platform/resources/schema/manifest-schema) with relevant context property to configure the different tab views. The meetings app capabilities are declared in your app manifest using the scopes and context arrays under the `configurableTabs` section.
#### Scope
The `context` property determines if the app is available in specific view after
||| | **channelTab** | A tab in the header of a team channel. | | **privateChatTab** | A tab in the header of a group chat between a set of users, not in the context of a team or meeting. |
-| **meetingChatTab** | A tab in the header of a group chat between a set of users for a scheduled meeting. You can specify either **meetingChatTab** or **meetingDetailsTab** to ensure the apps work in mobile. |
-| **meetingDetailsTab** | A tab in the header of the meeting details view of the calendar. You can specify either **meetingChatTab** or **meetingDetailsTab** to ensure the apps work in mobile. |
+| **meetingChatTab** | A tab in the header of a group chat between a set of users for a scheduled meeting. You can specify either `meetingChatTab` or `meetingDetailsTab` to ensure the apps work in mobile. |
+| **meetingDetailsTab** | A tab in the header of the meeting details view of the calendar. You can specify either `meetingChatTab` or `meetingDetailsTab` to ensure the apps work in mobile. |
| **meetingSidePanel** | An in-meeting panel opened through the unified bar (U-bar). | | **meetingStage** | An app from the `meetingSidePanel` can be shared to the meeting stage. You can't use this app in Teams room clients. | #### Configure tab app for a meeting
-Apps in meetings can use the following contexts: `meetingChatTab`, `meetingDetailsTab`, `meetingSidePanel` and `meetingStage`. After a meeting participant installs an app and configures the tab in meeting, all the targeted other contexts of the app for the given meeting starts to render the tab.
+Apps in meetings can use the following contexts: `meetingChatTab`, `meetingDetailsTab`, `meetingSidePanel`, and `meetingStage`. After a meeting participant installs an app and configures the tab in meeting, all the targeted other contexts of the app for the given meeting starts to render the tab.
The following code snippet is an example of a configurable tab used in an app for Teams meetings:
For in-meeting side panel experience only:ΓÇ»
### Advanced tab APIs
-TeamsJS is a rich library used to create Tabs using JavaScript. Use the latest TeamsJS (V.2.0 or later) to work in Teams, Microsoft 365 app, and Outlook. For more information, see [Teams JavaScript client library](/microsoftteams/platform/tabs/how-to/using-teams-client-library).
+TeamsJS is a rich library used to create Tabs using JavaScript. Use the latest TeamsJS (v2.0 or later) to work in Teams, Microsoft 365 app, and Outlook. For more information, see [Teams JavaScript client library](/microsoftteams/platform/tabs/how-to/using-teams-client-library).
### Frame context
-Microsoft Teams JavaScript library exposes the frameContext in which your meeting tab URL is loaded in the getContext API. The possible values of frameContext are content, task, setting, remove, sidePanel, and meetingStage. This allows you to build customized experiences based on where the app renders. For example, showing a specific collaboration focused UI when in the `meetingStage` and a different meeting preparation UI in the chat tab (`content`). For more information, see [getContext API](/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=teamsjs-v2).
+Microsoft Teams JavaScript library exposes the `frameContext` in which your meeting tab URL is loaded in the `getContext` API. The possible values of `frameContext` are content, task, setting, remove, sidePanel, and meetingStage. This allows you to build customized experiences based on where the app renders. For example, showing a specific collaboration focused UI when in the `meetingStage` and a different meeting preparation UI in the chat tab (`content`). For more information, see [getContext API](/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=teamsjs-v2).
## App caching
The following table provides the user types and lists the features that each use
| User type | Scheduled meeting or Instant calendar meeting | One-on-one call | Group call | Scheduled channel meeting | | :-- | :-- | :-- | :-- | :-- | | In-tenant | Interaction allowed for all roles.<br><br> Create, update, or delete is allowed for all except the Attendees. | Interaction and create, update, or delete allowed. <br><br> In-tenant users in call with federated users can't interact and create, update, or delete. | Interaction and create, update, or delete allowed.<br><br> In-tenant users in call with federated users can't interact and create, update, or delete. | Interaction and create, update, or delete allowed for all roles except for attendees. |
-| Guest | Can interact only | Can interact only | Can interact only | Can interact only. |
+| Guest | Can interact only | Can interact only | Can interact only | Can interact only |
| Federated or External | Can interact only | Not available | Not available | Can interact only |
-| Anonymous | Not available | Not available | Not available | Not available |
+| Anonymous | Can interact only | Not available | Not available | Not available |
## Code sample
The following table provides the user types and lists the features that each use
| In-meeting document signing | Demonstrates how to implement a document signing Teams app. Includes sharing specific app content to stage, Teams SSO, and user specific stage view. | [View](https://github.com/officedev/microsoft-teams-samples/tree/main/samples/meetings-share-to-stage-signing/csharp) | NA | | App caching | Sample app to show how app caching works in the meeting side panel. | NA | [View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-cache-meetings/nodejs) | + > [!NOTE] > > * Meeting apps (side panel and meeting stage) are supported in Teams desktop and mobile clients.
platform In Meeting Notification For Meeting https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/in-meeting-notification-for-meeting.md
You can also add the Teams display picture and people card of the user to in-mee
} ``` ## Feature compatibility by user types
The following table provides the user types and lists the features that each use
| In-tenant | Available | Available | Available | Available | | Guest | Available | Available | Available | Available | | Federated or External | Available | Not available | Not available | Available |
-| Anonymous | Not available | Not available | Not available | Not available |
+| Anonymous | Available | Not available | Not available | Not available |
## Targeted in-meeting notification
platform Teams Apps In Meetings https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/teams-apps-in-meetings.md
Title: Apps for Teams meetings
-description: In this article, learn how apps works in Microsoft Teams meetings based on participant and user role and app extensibility.
+description: Learn how apps works in Microsoft Teams meetings based on participant and user role and app extensibility.
ms.localizationpriority: medium
Last updated 04/07/2022
# Apps for Teams meetings and calls
-Meetings enable collaboration, partnership, informed communication, and shared feedback. The meeting space can deliver a user experience for each stage of the meeting lifecycle. The following illustration gives you an idea of the meeting app extensibility features:
+Meetings enable collaboration, partnership, informed communication, and shared feedback. The meeting space can deliver a user experience for each stage of the meeting lifecycle.
<!-- :::row:::
Teams supports access to apps during meeting for the following meeting types:
* [**Scheduled meetings**](https://support.microsoft.com/office/schedule-a-meeting-in-teams-943507a9-8583-4c58-b5d2-8ec8265e04e5#ID0EFBD=Desktop): Meetings scheduled through Teams calendar. * [**Scheduled channel meetings**](https://support.microsoft.com/office/schedule-a-meeting-in-teams-943507a9-8583-4c58-b5d2-8ec8265e04e5#ID0EFBD=Desktop): Meetings scheduled through Teams public channels.
-* [**One-on-one calls**](https://support.microsoft.com/office/start-a-call-from-a-chat-in-teams-f5138c9d-df4c-43d8-9cf6-53400c1a7798): Calls initiated in one-on-one chat.
-* [**Group calls**](https://support.microsoft.com/office/start-a-call-from-a-chat-in-teams-f5138c9d-df4c-43d8-9cf6-53400c1a7798): Calls initiated in group chat.
+* [**One-on-one calls**](https://support.microsoft.com/office/start-a-call-from-a-chat-in-teams-f5138c9d-df4c-43d8-9cf6-53400c1a7798): Calls initiated in a one-on-one chat.
+* [**Group calls**](https://support.microsoft.com/office/start-a-call-from-a-chat-in-teams-f5138c9d-df4c-43d8-9cf6-53400c1a7798): Calls initiated in a group chat.
* [**Instant meetings**](https://support.microsoft.com/office/start-an-instant-meeting-in-teams-ff95e53f-8231-4739-87fa-00b9723f4ef5): Meetings initiated through **Meet now** button in Teams calendar. * [**Webinar**](https://support.microsoft.com/office/get-started-with-teams-webinars-42f3f874-22dc-4289-b53f-bbc1a69013e3): Webinar initiated through **Webinar** button under **New Meeting** dropdown.
-Learn more about [Teams meetings, expiration and policies](/microsoftteams/meeting-expiration) and [meetings, webinars, and live events](/microsoftteams/quick-start-meetings-live-events).
+Learn more about [Teams meetings, expiration, and policies](/microsoftteams/meeting-expiration) and [meetings, webinars, and live events](/microsoftteams/quick-start-meetings-live-events).
> [!NOTE] > > * Apps for scheduled public channel meetings are available only in [public developer preview](../resources/dev-preview/developer-preview-intro.md).
A meeting lifecycle includes pre-meeting, in-meeting, and post-meeting app exper
## User types in Teams
-Teams supports user types, such as in-tenant, guest, federated or external user in a Teams meeting. Each user type can have one of the [user roles in Teams meeting](#user-roles-in-teams-meeting).
+Teams supports user types, such as in-tenant, guest, federated or external, and anonymous users in a Teams meeting. Each user type can have one of the [user roles in Teams meeting](#user-roles-in-teams-meeting).
> [!NOTE] >
-> Currently when a third person is added to a one-on-one call, the call is elevated to a group call that means a new session starts. Apps added to the one-on-one call are not available in the group call. However, they can be added again.
+> When a third person is added to a one-on-one call, the call is elevated to a group call , which starts a new session. Apps added to the one-on-one call aren't available in the group call. However, they can be added again.
The following list details the various user types along with their accessibility:
-* **In-tenant**: In-tenant users belong to the organization and have credentials in Azure Active Directory (AAD) for the tenant. They're full-time, onsite, or remote employees. An in-tenant user can be an organizer, presenter, or attendee.
+* **In-tenant**: In-tenant users belong to the organization and have credentials in Azure Active Directory (Azure AD) for the tenant. They're full-time, onsite, or remote employees and can be an organizer, presenter, or attendee.
* **Guest**: A guest is a participant from another organization invited to access Teams or other resources in the organization's tenant. Guests are added to the organizationΓÇÖs Azure AD and have same Teams capabilities as a native team member. They have access to team chats, meetings, and files. A guest can be an organizer, presenter, or attendee. For more information, see [guest access in Teams](/microsoftteams/guest-access). * **Federated or external**: A federated or an external user is a Teams user from another organization who has been invited to join a meeting. Federated users have valid credentials with federated partners and are authorized by Teams. They don't have access to your Teams or other shared resources from your organization. Guest access is a better option for external users to have access to Teams and channels. For more information, see [manage external access in Teams](/microsoftteams/manage-external-access). > [!NOTE]
- > Teams users can add apps when they host meetings or chats with other organizations. When an external users share apps to the meeting, all the user can access the app. The host organization's data policies and data sharing practices of the third-party apps shared by that user's organization, will be in effect.
+ > Teams users can add apps when they host meetings or chats with other organizations. When an external user shares an app to the meeting, all the users can access the app. The host organization's data policies and data sharing practices of the third-party apps shared by that user's organization will be in effect.
-* **Anonymous**: Anonymous users don't have an Azure AD identity and aren't federated with a tenant. The anonymous participants are like external users, but their identity isn't shown in the meeting. Anonymous users can't access apps in a meeting window. An anonymous user can't view the bot logo in the meeting chat. An anonymous user can be a presenter or an attendee, but can't be an organizer.
+* **Anonymous**: Anonymous users don't have an Azure AD identity and aren't federated with a tenant. The anonymous participants are like external users but their identity isn't shown in the meeting. Anonymous users can access apps in a meeting window. An anonymous user can be a presenter or an attendee but can't be an organizer.
> [!NOTE] > Anonymous users inherit the global default user-level app permission policy. For more information, see [manage apps](/microsoftteams/non-standard-users#anonymous-user-in-meetings-access).
The following are the user roles in a Teams meeting:
* **Organizer**: The organizer schedules a meeting, sets the meeting options, assigns meeting roles, controls attendee permissions, and starts the meeting. Only users with a Microsoft 365 account and Teams license can be the organizer. A meeting organizer can change the settings for a specific meeting from the [**meeting options**](https://support.microsoft.com/en-us/office/change-participant-settings-for-a-teams-meeting-53261366-dbd5-45f9-aae9-a70e6354f88e).
-* **Presenter**: Presenters in a meeting have similar capabilities as the organizer, with the exception of removing an organizer from the session and modifying meeting options for the session.
+* **Presenter**: Presenters in a meeting have similar capabilities as the organizer, except for removing an organizer from the session and modifying meeting options for the session.
* **Attendee**: An attendee is a user who is invited to attend the meeting. Attendees have limited capabilities during the meeting.
For more information, see [roles in a Teams meeting](https://support.microsoft.c
> > * The [default participant settings](/microsoftteams/meeting-policies-participants-and-guests) are determined by an organization's IT administrator. As per default settings, participants joining a meeting have the presenter role. > * Presenter role isn't available in one-on-one calls.
-> * A user who starts the group call from a chat is considered as organizer.
+> * A user who starts the group call from a chat is considered as an organizer.
> [!IMPORTANT] >
-> * Currently, third-party apps are available in Government Community Cloud (GCC) but are not available for GCC-High and Department of Defense (DOD) tenants.
+> * Currently, third-party apps are available in Government Community Cloud (GCC) but aren't available for GCC-High and Department of Defense (DOD) tenants.
> * Third-party apps are turned off by default for GCC. To turn on third-party apps for GCC, see [manage app permission policies](/microsoftteams/teams-app-permission-policies) and [manage apps](/microsoftteams/manage-apps). ## See also
platform Teams Live Share Capabilities https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/teams-live-share-capabilities.md
That's all it took to setup your container and join the meeting's session. Now,
## Fluid distributed data structures
-The Live Share SDK supports any [distributed data structure](https://fluidframework.com/docs/data-structures/overview/) included in Fluid Framework. Here's a quick overview of a few of the different types of objects available:
+The Live Share SDK supports any [distributed data structure](https://fluidframework.com/docs/data-structures/overview/) included in Fluid Framework. These features serve as a set of primitives you can use to build robust collaborative scenarios, such as real-time updates of a task list or co-authoring text within an HTML `<textarea>`.
+
+Following are the different types of objects available:
| Shared Object | Description | | -- | | | [SharedMap](https://fluidframework.com/docs/data-structures/map/) | A distributed key-value store. Set any JSON-serializable object for a given key to synchronize that object for everyone in the session. | | [SharedSegmentSequence](https://fluidframework.com/docs/data-structures/sequences/) | A list-like data structure for storing a set of items (called segments) at set positions. |
-| [SharedString](https://fluidframework.com/docs/data-structures/string/) | Distributed-string sequence optimized for editing document text editing. |
+| [SharedString](https://fluidframework.com/docs/data-structures/string/) | Distributed-string sequence optimized for editing the text of documents or text areas. |
Let's see how `SharedMap` works. In this example, we've used `SharedMap` to build a playlist feature.
function onClickAddToPlaylist(video: IVideo) {
## Live Share data structures
-The Live Share SDK includes a set of new Live Share `SharedObject` classes, which provide stateful and stateless objects that aren't stored in the Fluid container. For example, if you want to create a laser-pointer feature into your app, such as the popular PowerPoint Live integration, you can use our `LiveEvent` or `LiveState` objects.
+The Live Share SDK includes a set of new distributed-data structures that extend Fluid's `SharedObject` class, providing new types of stateful and stateless objects. Unlike Fluid data structures, Live Share's `SharedObject` classes donΓÇÖt write changes to the Fluid container, enabling faster synchronization. Further, these classes were designed from the ground up for common meeting scenarios in Teams meetings. Common scenarios include synchronizing what content the presenter is viewing, displaying metadata for each user in the meeting, or displaying a countdown timer.
-| Live Object | Description |
-| | |
+| Live Object | Description |
+| -- | |
| `LivePresence` | See which users are online, set custom properties for each user, and broadcast changes to their presence. |
-| `LiveEvent` | Broadcast individual events with any custom data attributes in the payload. |
-| `LiveState` | Similar to SharedMap, a distributed key-value store that allows for restricted state changes based on role, for example, the presenter. |
-| `LiveTimer` | Synchronize a countdown timer for a given interval. |
+| `LiveEvent` | Broadcast individual events with any custom data attributes in the payload. |
+| `LiveState` | Similar to SharedMap, a distributed key-value store that allows for restricted state changes based on role, for example, the presenter. |
+| `LiveTimer` | Synchronize a countdown timer for a given interval. |
### LivePresence example :::image type="content" source="../assets/images/teams-live-share/live-share-presence.png" alt-text="Screenshot shows an example of showing people who available in a sessionTeams using Live Share presence.":::
-The `LivePresence` class makes tracking who is in the session easier than ever. When calling the `.initialize()` or `.updatePresence()` methods, you can assign custom metadata for that user, such as name or profile picture. By listening to `presenceChanged` events, each client receives the latest `LivePresenceUser` object, collapsing all presence updates into a single record for each unique `userId`.
+The `LivePresence` class makes tracking who is in the session easier than ever. When calling the `.initialize()` or `.updatePresence()` methods, you can assign custom metadata for that user, such as name, profile picture, or the identifier for content they are viewing. By listening to `presenceChanged` events, each client receives the latest `LivePresenceUser` object, collapsing all presence updates into a single record for each unique `userId`.
+
+The following are a few examples in which `LivePresence` can be used in your application:
+
+- Displaying profile pictures and names of each user connected to the session.
+- Synchronizing the coordinates in a 3D scene where each user's avatar is located.
+- Reporting each user's cursor position in a text document.
+- Posting each user's answer to an ice-breaker question during a group activity.
> [!NOTE] > The default `userId` assigned to each `LivePresenceUser` is a random UUID and is not directly tied to an AAD identity. You can override this by setting a custom `userId` to be the primary key, as shown in the example below.
-Example:
- # [JavaScript](#tab/javascript) ```javascript
function onUserDidLogIn(userName: string, profilePicture: string) {
:::image type="content" source="../assets/images/teams-live-share/live-share-event.png" alt-text="Screenshot shows an example of Teams client displaying notification when there's a change in the event.":::
-`LiveEvent` is a great way to send simple events to other clients in a meeting. It's useful for scenarios like sending session notifications.
+`LiveEvent` is a great way to send simple events to other clients in a meeting that are only needed at the time of delivery. It's useful for scenarios like sending session notifications or implementing custom reactions.
# [JavaScript](#tab/javascript)
notifications.sendEvent({
:::image type="content" source="../assets/images/teams-live-share/live-share-timer.png" alt-text="Screenshot shows an example of a count down timer with 9 seconds remaining.":::
-`LiveTimer` enables scenarios that have a time limit, such as a group meditation timer or a round timer for a game.
+`LiveTimer` provides a simple countdown timer that is synchronized for everyone in a meeting. ItΓÇÖs useful for scenarios that have a time limit, such as a group meditation timer or a round timer for a game.
# [JavaScript](#tab/javascript)
timer.play();
+### LiveState example
++
+The `LiveState` class enables synchronizing simple application state for everyone in a meeting. `LiveState` synchronizes two values: a `state` string and a corresponding `data` object, which allows you to build an ephemeral distributed-state machine.
+
+The following are a few examples in which `LiveState` can be used in your application:
+
+- Tracking the user identifier of the current presenter to build a **take control** feature.
+- Maintaining the content identifier that the current presenter is viewing. For example, an `taskId` on a task board.
+- Synchronizing the current step in a multi-round group activity. For example, the guessing phase during the Agile Poker game.
+
+> [!NOTE]
+> Unlike `SharedMap`, the `state` and `data` values in `LiveState` will be reset after all the users disconnect from a session.
+
+Example:
+
+# [JavaScript](#tab/javascript)
+
+```javascript
+import { LiveShareClient, LiveState } from "@microsoft/live-share";
+import { LiveShareHost } from "@microsoft/teams-js";
+
+// Join the Fluid container
+const host = LiveShareHost.create();
+const liveShare = new LiveShareClient(host);
+const schema = {
+ initialObjects: { appState: LiveState },
+};
+const { container } = await liveShare.joinContainer(schema);
+const { appState } = container.initialObjects;
+
+// Register listener for changes to state and corresponding custom data
+appState.on("stateChanged", (state, data, local) => {
+ if (state === "planet-viewer") {
+ const planetName = data?.planetName;
+ // Update app to display an image of the selected planet for the selected solar system
+ } else {
+ // No planet is yet selected
+ }
+});
+
+// Set roles who can change state and start listening for changes
+appState.initialize();
+
+function onSelectPlanet(planetName) {
+ appState.changeState("planet-viewer", {
+ planetName,
+ });
+}
+```
+
+# [TypeScript](#tab/typescript)
+
+```TypeScript
+import { LiveShareClient, LiveState } from "@microsoft/live-share";
+import { LiveShareHost } from "@microsoft/teams-js";
+
+enum PlanetName {
+ MERCURY = "Mercury",
+ VENUS = "Venus",
+ EARTH = "Earth",
+ MARS = "Mars",
+ JUPITER = "Jupiter",
+ SATURN = "Saturn",
+ URANUS = "Uranus",
+ NEPTUNE = "Neptune",
+}
+
+// Declare interface for type of custom data for user
+interface ICustomState {
+ planetName: PlanetName;
+}
+
+// Join the Fluid container
+const host = LiveShareHost.create();
+const liveShare = new LiveShareClient(host);
+const schema = {
+ initialObjects: {
+ appState: LiveState<ICustomState>,
+ },
+};
+const { container } = await liveShare.joinContainer(schema);
+const appState = container.initialObjects.appState as LiveState<ICustomState>;
+
+// Register listener for changes to state and corresponding custom data
+appState.on("stateChanged", (state: string, data: ICustomState | undefined, local: boolean) => {
+ if (state === "planet-viewer") {
+ const planetName = data?.planetName;
+ // Update app to display an image of the selected planet for the selected solar system
+ } else {
+ // No planet is yet selected
+ }
+});
+
+// Set roles who can change state and start listening for changes
+appState.initialize();
+
+function onSelectPlanet(planetName: PlanetName) {
+ appState.changeState("planet-viewer", {
+ planetName,
+ });
+}
+```
+++ ## Role verification for live data structures
-Meetings in Teams can range from one-on-one calls to all-hands meetings, and may include members across organizations. Live objects are designed to support role verification, allowing you to define the roles that are allowed to send messages for each individual live object. For example, you could choose that only meeting presenters and organizers can control video playback, but still allow guests and attendees to request videos to watch next.
+Meetings in Teams include calls, all-hands meetings, and online classrooms. Meeting participants might span across organizations, have different privileges, or simply have different goals. Hence, itΓÇÖs important to respect the privileges of different user roles during meetings. Live objects are designed to support role verification, allowing you to define the roles that are allowed to send messages for each individual live object. For example, you could choose that only meeting presenters and organizers can control video playback, but still allow guests and attendees to request videos to watch next.
> [!NOTE] > The `LivePresence` class doesn't support role verification. The `LivePresenceUser` object has a `getRoles` method, which returns the meeting roles for a given user.
-Example using `LiveState`:
+In the following example where only presenters and organizers can take control, `LiveState` is used to synchronize which user is the active presenter.
# [JavaScript](#tab/javascript) ```javascript
-import { LiveShareClient, LiveState, UserMeetingRole } from "@microsoft/live-share";
+import {
+ LiveShareClient,
+ LiveState,
+ UserMeetingRole,
+} from "@microsoft/live-share";
import { LiveShareHost } from "@microsoft/teams-js"; // Join the Fluid container
function onSelectPresentMode(documentId: string) {
Listen to your customers to understand their scenarios before implementing role verification into your app, particularly for the **Organizer** role. There's no guarantee that a meeting organizer be present in the meeting. As a general rule of thumb, all users will be either **Organizer** or **Presenter** when collaborating within an organization. If a user is an **Attendee**, it's usually an intentional decision on behalf of a meeting organizer.
-> [!NOTE]
-> Currently, Live Share doesn't support channel meetings.
- ## Code samples | Sample name | Description | JavaScript |
platform Teams Live Share Faq https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/teams-live-share-faq.md
Any data sent or stored through Fluid containers created by Live Share's hosted
<summary><b>What meeting types does Live Share support?</b></summary>
-Scheduled meetings, one-on-one calls, group calls, and meet now are supported. Channel meetings aren't yet supported.
+Scheduled meetings, one-on-one calls, group calls, meet now, and channel meetings are supported.
<br>
platform Teams Live Share Overview https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/apps-in-teams-meetings/teams-live-share-overview.md
Sometimes screen sharing just isn't enough, which is why Microsoft built tools l
> [Get started](teams-live-share-quick-start.md) > [!NOTE]
->
> Live Share SDK is available only in [public developer preview](../resources/dev-preview/developer-preview-intro.md). ## Feature overview
platform Share To Teams Overview https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/build-and-test/share-to-teams-overview.md
Share to Teams is a button enabled on any web app, personal app, or tab that all
You can also decide the placement of the Share to Teams button on the app. Users can pin the crucial content and refer to it while collaborating with Teams. You can enable this feature on the following:
You can enable this feature on the following:
## Share to Teams from web apps
-You can embed Share to Teams button on the web apps that allows users to share the content from the web apps to any chat, group chat, or channel in Teams, without switching the context.
+You can embed the Share to Teams button on the web apps that allows users to share the content from the web apps to any chat, group chat, or channel in Teams, without switching the context.
For more information, see [Share to Teams from web apps](share-to-teams-from-web-apps.md). ## Share to Teams from personal app or tab
-You can embed Share to Teams button in the personal app or tab hosted inside Teams that allows users to share the content from the personal app or tab to any chat, group chat, or channel in Teams without switching the context.
+You can embed the Share to Teams button in the personal app or tab hosted inside Teams that allows users to share the content from the personal app or tab to any chat, group chat, or channel in Teams, without switching the context.
For more information, see [Share to Teams from personal app or tab](share-to-teams-from-personal-app-or-tab.md). ## See also
-* [Integrate web apps](../../samples/integrate-web-apps-overview.md)
-* [Share to Teams developer page](https://developer.microsoft.com/microsoft-teams/share-to-teams#/)
+[Integrate web apps](../../samples/integrate-web-apps-overview.md)
platform Update Apple Store Team Connect Id https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/concepts/deploy-and-publish/appsource/prepare/update-apple-store-team-connect-id.md
-# Update Apple App Store Connect Team ID on Partner Center
+# Update Apple App Store Connect Team ID
To enable end-users to install your app on the Teams iOS platform, update your Apple App Store Connect Team ID in the Microsoft Partner Center. The Apple App Store Connect Team ID is shared with Apple. To update your Apple App Store Connect Team ID, follow these steps:
platform Manifest Schema https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/resources/schema/manifest-schema.md
ms.localizationpriority: high
# App manifest schema for Teams
-The Microsoft Teams app manifest describes how your app integrates into the Microsoft Teams product. Your app manifest must conform to the schema hosted at [`https://developer.microsoft.com/json-schemas/teams/v1.15/MicrosoftTeams.schema.json`]( https://developer.microsoft.com/json-schemas/teams/v1.15/MicrosoftTeams.schema.json). Previous versions 1.0, 1.1,...,1.14, and the current version is 1.15 are each supported (using "v1.x" in the URL).
+The Microsoft Teams app manifest describes how your app integrates into the Microsoft Teams product. Your app manifest must conform to the schema hosted at [`https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json`](https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json). Previous versions 1.0, 1.1,...,1.15, and the current version is 1.16 are each supported (using "v1.x" in the URL).
For more information on the changes made in each version, see [manifest change log](https://github.com/OfficeDev/microsoft-teams-app-schema/releases). The following table lists TeamsJS version and app manifest versions as per different app scenarios:
The following schema sample shows all extensibility options:
```json {
- "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.15/MicrosoftTeams.schema.json",
- "manifestVersion": "1.15",
+ "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
+ "manifestVersion": "1.16",
"version": "1.0.0", "id": "%MICROSOFT-APP-ID%", "localizationInfo": {
The name of your app experience, displayed to users in the Teams experience. For
|Name| Maximum size | Required | Description| ||||| |`short`|30 characters|✔️|The short display name for the app.|
-|`full`|100 characters||The full name of the app, used if the full app name exceeds 30 characters.|
+|`full`|100 characters|✔️|The full name of the app, used if the full app name exceeds 30 characters.|
## description
Specify meeting extension definition. For more information, see [custom Together
|||||| |`scenes`|array of objects| 5 items||Meeting supported scenes.| |`supportsStreaming`|Boolean|||A value that indicates whether an app can stream the meeting's audio and video content to a real-time meeting protocol (RTMP) endpoint. The default value is **false**.|
+|`supportsAnonymousGuestUsers`|Boolean|||A value that indicates whether an app supports access for anonymous users. The default value is **false**.|
### meetingExtensionDefinition.scenes
platform Tab Sso Overview https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/tabs/how-to/authentication/tab-sso-overview.md
ms.localizationpriority: high
# Enable SSO for tab app
-With SSO in Teams, app users have the advantage of using Teams to access tab apps. After logging into Teams using Microsoft or Microsoft 365 account, app users can use your app without needing to sign in again. Your app is available to app users on any device with access granted through Azure AD.
+With single sign-on (SSO) in Teams, app users have the advantage of using Teams to access tab apps. After logging in to Teams using Microsoft or Microsoft 365 account, app users can use your app without the need to sign in again. Your app is available to app users on any device with the access granted through Azure Active Directory (Azure AD).
Here's what you'll learn in this section:
-1. **SSO user experience**: Teams offers your app users a true SSO experience. App users can use your app without signing in again.
+1. **SSO user experience**: Teams offers your app users a true SSO experience. The app users can use your app without signing in again.
2. **SSO in Teams at runtime**: Your tab app interacts with Azure AD at runtime for one-time authentication and authorization for your app users.
-3. **Enable SSO for your tab app**: Implement the tasks involved to implement SSO in your tab app.
+3. **Enable SSO for your tab app**: Implement the tasks involved to enable SSO in your tab app.
## SSO user experience in Teams
-App users sign in to Teams using either personal Microsoft account or Microsoft 365 account. You can take advantage of this account, and use SSO to authenticate and authorize the app users.
+The app users sign in to Teams using either personal Microsoft account or Microsoft 365 account. You can take advantage of this account and use SSO to authenticate and authorize the app users.
-&nbsp;&nbsp;&nbsp;&nbsp; :::image type="content" source="../../../assets/images/authentication/teams-sso-tabs/teams-sso-ux.png" alt-text="SSO user experience in a Teams tab app":::
- Teams authenticates and stores the identity of its app user. - Your tab app uses the stored identity of the app user who is already validated by Teams.-- The app user needs to give consent to Teams for using the identity to access for using your tab app.
+- The app user needs to give consent to Teams for using the identity to access your tab app.
- The app user can access the app on web, desktop, or mobile client. You can view here an example of user experience with SSO in a tab app: ### Enhance user experience with SSO Here's what your app users get with SSO experience: -- Teams gets the access token for the current app user from Azure AD. This interaction with Azure AD is invisible to the app user. It translates to getting app access without having to leave Teams environment.
+- Teams gets the access token for the current app user from Azure AD. This interaction with Azure AD is invisible to the app user. It translates to get the app access without having to leave the Teams environment.
- An app user needs to consent only in a multi-tenant environment. If the app user and the app reside in the same tenant, the app user doesn't need to give consent for using the app. - After consenting to Teams the first time, the app user can use your app with no further need of consent, even on any other device. For this reason, it offers a better user experience.
- - Alternatively, the tenant administrator can grant consent on behalf of the app users. In this scenario, when the tenant administrator consents for app users in the tenant, the app users don't need to be prompted for consent at all. It means that the app users don't see the consent dialogs, and can access the app seamlessly.
-- The access token is pre-fetched by Teams to improve performance and load time of the app in Teams environment.-- App users don't need to memorize or record several passwords to access and use apps in Teams environment.
+ - Alternatively, the tenant administrator can grant consent on behalf of the app users. In this scenario, when the tenant administrator consents for the app users in the tenant, the app users don't need to be prompted for consent at all. It means that the app users don't see the consent dialogs and can access the app seamlessly.
+- The access token is pre-fetched by Teams to improve performance and load time of the app in the Teams environment.
+- The app users don't need to memorize or record several passwords to access and use apps in Teams environment.
> [!NOTE]
-> App users can't give permission to some permission scopes, such as `Sites.ReadWrite.All`, which allows the app user to read and write to all SharePoint and OneDrive assets in the tenant. For such scopes, only the tenant administrator than grant consent on an app user's behalf.
+> App users can't give permission to some permission scopes, such as `Sites.ReadWrite.All`, which allows the app user to read and write to all SharePoint and OneDrive assets in the tenant. For such scopes, only the tenant administrator can grant consent on an app user's behalf.
Now, let's see what happens at the backend during runtime to achieve SSO experience within Teams.
Achieve SSO in a tab app by obtaining access token for the Teams app user who's
The following image shows how SSO works when a Teams app user attempts to access the tab app: | # | Interaction | What's going on | | | | |
The following image shows how SSO works when a Teams app user attempts to access
| 3 | Azure AD → Consent form | If the current app user is using your tab app for the first time, Teams displays request prompt to consent, if the app needs to access some protected data. The app user (or the administrator) must give consent to Teams for using the app user's Teams identity to obtain access token from Azure AD. <br> Alternately, there's a request prompt to handle step-up authentication such as two-factor authentication. | | 4 | Azure AD → Teams Client | Azure AD sends the access token to the Teams Client. The token is a JSON Web Token (JWT), and its validation works just like token validation in most standard OAuth flows. Teams caches the token on your behalf so that future calls to `getAuthToken()` return the cached token. | | 5 | Teams Client → Tab app client | Teams sends the access token to the tab app as part of the result object returned by the `getAuthToken()` call. |
-| 6 | Tab app (between client & server) | The tab app parses the access token using JavaScript to extract required information, such as the app user's email address. The token returned to the tab app is both an access token and an identity token. |
+| 6 | Tab app (between client and server) | The tab app parses the access token using JavaScript to extract required information, such as the app user's email address. The token returned to the tab app is both an access token and an identity token. |
For more information, see [Add code to enable SSO in a tab app](tab-sso-code.md) and [Add code to enable SSO in your bot app](../../../bots/how-to/authentication/bot-sso-code.md). > [!IMPORTANT]
-> The `getAuthToken()` is valid only for consenting to a limited set of user-level APIs, such as email, profile, offline_access, and OpenId. It isn't used for other Graph scopes such as `User.Read` or `Mail.Read`. For suggested workarounds, see [Extend your app with Microsoft Graph permissions](tab-sso-graph-api.md).
+>
+> - The `getAuthToken()` is valid only for consenting to a limited set of user-level APIs, such as email, profile, offline_access, and OpenId. It isn't used for other Graph scopes such as `User.Read` or `Mail.Read`. For suggested workarounds, see [Extend your app with Microsoft Graph permissions](tab-sso-graph-api.md).
+> - The `getAuthToken` fails for anonymous users as they aren't Azure AD accounts.
-Tabs are Teams-aware web pages. To enable SSO in a web-page hosted inside a tab app, add [Teams Javascript client library](/javascript/api/overview/msteams-client?), and call `microsoftTeams.initialize()`. After initialization, call `microsoftTeams.getAuthToken()` to get the access token for your app.
+Tabs are Teams-aware web pages. To enable SSO in a webpage hosted inside a tab app, add [Teams Javascript client library](/javascript/api/overview/msteams-client?) and call `microsoftTeams.initialize()`. After initialization, call `microsoftTeams.getAuthToken()` to get the access token for your app.
### Use cases for enabling SSO
This section describes the tasks involved in implementing SSO for a Teams app. T
To enable SSO for a Teams tab app:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :::image type="content" source="../../../assets/images/authentication/teams-sso-tabs/enable-sso.png" alt-text="Steps to enable SSO for tab" lightbox="../../../assets/images/authentication/teams-sso-tabs/enable-sso.png":::
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :::image type="content" source="../../../assets/images/authentication/teams-sso-tabs/enable-sso.png" alt-text="Screenshot shows the steps to enable SSO for tab." lightbox="../../../assets/images/authentication/teams-sso-tabs/enable-sso.png":::
-1. **Configure app with Azure AD**: Create an Azure AD app to generate an app ID and application ID URI. For generating access token, you configure scopes and authorize trusted client applications.
-2. **Add code**: Add the code to handle access token, sending this token to your app's server code in the Authorization header, and validating the access token when it's received.
-3. **Update Teams app manifest**: Update your Teams Client app manifest with the app ID and application ID URI generated on Azure AD to allow Teams to request access tokens on behalf of your app.
+1. **Configure app with Azure AD**: Create an Azure AD app to generate an app ID and application ID URI. For generating access token, configure scopes and authorize trusted client applications.
+2. **Add code**: Add the code to handle access token, send this token to your app's server code in the Authorization header, and validate the access token when it's received.
+3. **Update Teams app manifest**: Update your Teams client app manifest with the app ID and application ID URI generated on Azure AD to allow Teams to request access tokens on behalf of your app.
## Third-party cookies on iOS
Use the following step-by-step guides for enabling SSO for Teams app:
Here's a list of best practices: - **Call access token only when you need it**: Call `getAuthToken()` only when you need an access token. You can call it when an app user accesses your tab app, or for using a particular function that requires app user validation.-- **Don't store access token on client-side code**: DonΓÇÖt cache or store the access token in your app's client-side code. Teams Client caches the access token (or request a new one if it expires). This ensures that there's no accidental leak of your token from your web app.
+- **Don't store access token on client-side code**: DonΓÇÖt cache or store the access token in your app's client-side code. Teams client caches the access token (or request a new one if it expires). This ensures that there's no accidental leak of your token from your web app.
- **Use server-side code for Microsoft Graph calls**: Always use the server-side code to make Microsoft Graph calls, or other calls that require passing an access token. Never return the OBO token to the client to enable the client to make direct calls to Microsoft Graph. This helps protect the token from being intercepted or leaked. For more information, see [Extend tab app with Microsoft Graph permissions and scope](tab-sso-graph-api.md). ## Known limitations - Currently, SSO in Teams supports only OAuth 2.0 token. It doesn't support SAML token.-- Multiple domains per app are not supported. For more information, see [LOB apps](tab-sso-register-aad.md#before-you-configure-your-app).
+- Multiple domains per app aren't supported. For more information, see [LOB apps](tab-sso-register-aad.md#before-you-configure-your-app).
## Next step
platform Install Teams Toolkit https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/toolkit/install-Teams-Toolkit.md
You can install Teams Toolkit using **Extensions** in Visual Studio Code, or ins
# [Visual Studio Code](#tab/vscode) 1. Launch **Visual Studio Code**.
-1. Open **Extensions** by selecting **View > Extensions** or **Ctrl+Shift+X**.
+1. Open **Extensions** by selecting **View > Extensions** or **Ctrl+Shift+X**. You can also open extensions by selecting the extensions :::image type="icon" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/vsc-ext-icon.png" border="false"::: icon from the Visual Studio Code activity bar.
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/install toolkit-1_2.png" alt-text="Screenshot shows how to install.":::
You can install Teams Toolkit using **Extensions** in Visual Studio Code, or ins
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/install-toolkit-2_2_1.png" alt-text="Screenshot show the Toolkit.":::
-1. Select **Install**.
+ Teams Toolkit appears in the search result list.
+
+1. Select **Teams Toolkit**, and then from the Teams Toolkit extension page that appears in the right pane, select **Install**.
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/select-install-ttk_2.png" alt-text="Screenshot shows install toolkit 4.0.0.":::
- After successful installation of Teams Toolkit in Visual Studio Code, a Teams Toolkit icon appears in the Visual Studio Code activity bar.
+ After successful installation of Teams Toolkit in Visual Studio Code, the Teams Toolkit icon appears in the Visual Studio Code activity bar.
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/after-install_2.png" alt-text="Screenshot shows after install view.":::
You can install Teams Toolkit using **Extensions** in Visual Studio Code, or ins
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/Install-ttk_1.png" alt-text="Screenshot shows how to install TTK.":::
-1. In the pop-up window that appears, select **Open** to launch Visual Studio Code.
+1. In the pop-up window that appears, select **Open**.
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/select-open_1.png" alt-text="Screenshot shows to select the open.":::
- The Teams Toolkit extension page appears in Visual Studio Code.
+ Visual Studio Code opens with the Teams Toolkit extension page.
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/ttk-in-vsc_1.png" alt-text="Screenshot shows how to select TTK in VSC." lightbox="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/ttk-in-vsc_1.png":::
By default, Visual Studio Code automatically keeps Teams Toolkit up-to-date. If
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/TeamsToolkit-search.png" alt-text="Search for Teams Toolkit.":::
-3. Select Teams Toolkit.
+3. Select **Teams Toolkit**.
-4. On the Teams Toolkit page, select the dropdown next to the **Uninstall** button.
+4. On the **Teams Toolkit** page, select the dropdown next to the **Uninstall** button.
5. Select **Install Another Version...** from the dropdown.
By default, Visual Studio Code automatically keeps Teams Toolkit up-to-date. If
:::image type="content" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/Olderversions of VS Code.png" alt-text="Other then the latest version of VS code.":::
+ Teams Toolkit installs the version youΓÇÖve selected.
+ ## Install a pre-release version The Teams Toolkit for Visual Studio Code extension is available on GitHub. To download pre-releases, go to the [releases page on GitHub](https://github.com/OfficeDev/TeamsFx/releases) and look for extension downloads marked as :::image type="icon" source="../assets/images/teams-toolkit-v2/teams toolkit fundamentals/Pre-release icon.PNG" border="false"::: icon.
The Teams Toolkit for Visual Studio Code extension is available on GitHub. To do
1. Download the [Visual Studio installer](https://aka.ms/VSDownload), or open it if already installed. 2. Select **Install** or select **Modify** if Visual Studio is already installed.
-3. Select the **Workloads** tab, then select the **ASP.NET and web development** workload.
-4. On the right, select the **Microsoft Teams development tools** in the Optional section of the **Installation details** panel.
-5. Select **Install**.
+
+ Visual Studio installer shows all workloads, whether installed or available for installation.
:::image type="content" source="../assets/images/teams-toolkit-overview/visual-studio-install_1_2.png" alt-text="Screenshot shows how to install Visual studio.":::
+ Select the following options to install Teams Toolkit:
+ 1. Select the **Workloads** tab, then select the **ASP.NET and web development** workload.
+ 1. On the right, select the **Microsoft Teams development tools** in the **Optional** section of the **Installation details** panel.
+ 1. Select **Install**.
+ 6. After the installation completes, select **Launch** to open Visual Studio. :::image type="content" source="../assets/images/teams-toolkit-overview/visual-studio-launch_1_2.png" alt-text="Screenshot shows how to launch visual studio.":::
+Teams Toolkit menu options are available in Visual Studio only when an app project created using Teams Toolkit is open.
++ ::: zone-end ## Next steps
platform Provision https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/toolkit/provision.md
zone_pivot_groups: teams-app-platform
TeamsFx integrates with Azure and the Microsoft 365 cloud, which allows to place your app in Azure with a single command. TeamsFx integrates with Azure Resource Manager (ARM), which enables to provision Azure resources that your application needs for code approach.
+> [!NOTE]
+> Teams toolkit doesn't provide support to deploy resources to other cloud platforms except Azure, however, the user can deploy manually.
+ ::: zone pivot="visual-studio-code" ## Provision using Teams Toolkit in Microsoft Visual Studio Code
To ensure the TeamsFx tool functions properly, customize ARM template that satis
* Ensure that the folder structure and file name remain unchanged. The tool may append new content to the existing files when you add more resources or capabilities to your project. * Ensure that the names of the auto-generated parameters and its property names remain unchanged. The auto-generated parameters may be used when you add more resources or capabilities to your project.
-* Ensure that the output of the auto-generated ARM template remain unchanged. You can add more outputs to the ARM template. The output is `.fx\states\state.{env}.json` and can be used in other features, such as deploy and validate manifest file.
+* Ensure that the output of the auto-generated ARM template remains unchanged. You can add more outputs to the ARM template. The output is `.fx\states\state.{env}.json` and can be used in other features, such as deploy and validate manifest file.
### Customize Teams apps
platform Whats New https://github.com/MicrosoftDocs/msteams-docs/commits/main/msteams-platform/whats-new.md
Discover Microsoft Teams platform features that are generally available (GA). Yo
Teams platform features that are available to all app developers.
-**2023 January**
+**2023 February**
-***January 31, 2023***: [Introducing update and soft delete event notifications in bot](bots/how-to/conversations/conversation-messages.md#update-message).
+***February 09, 2023***: [Apps for Teams meetings support anonymous users.](apps-in-teams-meetings/build-apps-for-anonymous-user.md)
:::column-end::: :::row-end::: <br>
+<details>
+<summary><b>2023</b></summary>
+
+| **Date** | **Update** | **Find here** |
+| -- | | -|
+|31/01/2023| Introducing update and soft delete event notifications in bot | Build bots > Bot conversations > [Messages in bot conversations](bots/how-to/conversations/conversation-messages.md#update-message) |
+
+</details>
+</br>
+ <details> <summary><b>2022</b></summary> | **Date** | **Update** | **Find here** | | -- | | -|
+|31/01/2023| Introducing update and soft delete event notifications in bot | Build bots > Bot conversations > [Messages in bot conversations](bots/how-to/conversations/conversation-messages.md#update-message) |
| 08/12/2022 | Introducing Teams developer documentation FAQs. | [Teams developer documentation FAQs](teams-faq.md) | | 07/12/2022 | Introducing notification bot in Teams. | Build bots > Bot conversations > [Notification bot in Teams](bots/how-to/conversations/notification-bot-in-teams.md) | | 07/12/2022 | Introducing command bot in Teams. | Build bots > Bot conversations > [Command bot in Teams](bots/how-to/conversations/command-bot-in-teams.md) |