From 6317c324e7a64d6121a96303457c4f1ef8f7a5d1 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 6 Aug 2025 14:56:07 +0530 Subject: [PATCH 01/45] Updated the document --- .../build-and-test/shared-channels.md | 244 ++++++++++++++++-- 1 file changed, 224 insertions(+), 20 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index e5c9bb96c5f..2cdc6b920ee 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -8,9 +8,11 @@ ms.topic: conceptual ms.date: 04/09/2025 --- -# Microsoft Teams Connect shared channels +# Adapting Microsoft Teams App for Shared and Private Channels -Microsoft Teams Connect shared channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: +Microsoft Teams apps need to adapt to Shared and Private channels, which bring new collaboration patterns. This guide helps developers understand the changes required so their apps work smoothly across all channel types. + +Microsoft Teams Connect Shared and Private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a Shared channel with: * Members of another team within the same organization. * Individuals within the same organization. @@ -18,16 +20,92 @@ Microsoft Teams Connect shared channels allow members of a channel to collaborat > [!NOTE] > -> * Tab apps in shared channels are available in [Government Community Cloud (GCC), GCC High, Department of Defense (DoD)](../cloud-overview.md#teams-app-capabilities), and [Teams operated by 21Vianet](../sovereign-cloud.md) environments. -> * SharePoint and the SharePoint pages apps aren't supported for shared channels in GCC, GCC High, DoD, and Teams operated by 21Vianet environments. +> * Tab apps in Shared channels are available in [Government Community Cloud (GCC), GCC High, Department of Defense (DoD)](../cloud-overview.md#teams-app-capabilities), and [Teams operated by 21Vianet](../sovereign-cloud.md) environments. +> * SharePoint and the SharePoint pages apps aren't supported for Shared channels in GCC, GCC High, DoD, and Teams operated by 21Vianet environments. + +Teams Connect Shared channels facilitate secure collaboration seamlessly. Allow external users outside of your organization to collaborate with internal users in Teams without changing their user context. Enhance user experience unlike using guest accounts, for example, the members must sign out of Teams and sign in again using a guest account. Teams applications extend the powerful collaboration space. + +:::image type="content" source="~/assets/images/app-fundamentals/shared-channels-teams.png" alt-text="Diagram shows Team B from organization A and Team C from organization B collaborating in a Shared channel as Team A."::: + +## Understanding Shared and Private Channels in Microsoft Teams + +### Shared Channel + +Shared channels in Microsoft Teams let you collaborate with people who aren’t part of your team. Only those who are added as owners or members of the Shared channel can access it. Regular guest accounts (via Microsoft Entra) can’t be added to Shared channels. However, you can still invite people from outside your organization using Microsoft Entra B2B direct connect, which allows secure external collaboration without needing to add them as guests. More details [here](https://learn.microsoft.com/en-us/microsoftteams/shared-channels). + +### Private Channel + +Private channels in Microsoft Teams are special spaces for focused collaboration within a team. Only the people who are added as owners or members of the private channel can access it. You can include guests (users with Microsoft Entra guest accounts) in a private channel, but only if they are already part of the host team. + +### Feature Differences between Shared and Private Channels + +| Features | Standard Channel | Shared Channel | Private Channel | +|---------------------|------------------------|-----------------------------------------------------|--------------------------------------------------| +| People can be added to channel without adding to team | No | Yes | No | +|Channel membership can be limited to a subset of the team | No | Yes | Yes | +|Channel can be shared directly with other teams | No | Yes | No | +|Channel can be shared directly with its parent team | NA | Yes | No | +|Guests can participate in the channel |Yes | No | Yes | +|External participants (Direct Connect) can participate in channel |No | Yes | No | +|Each channel has a dedicated SharePoint site |No | Yes | Yes | + +Standard and private channels help team members collaborate within their own group. Shared channels, however, allow collaboration with people outside the team without needing to add them to the team. This opens up new ways of working but also requires apps to work differently in these shared spaces. + +## Reimagining App's Functionality for Shared and Private Channels + +As an app developer, it's important to rethink how your app works within Shared and Private channels in Microsoft Teams. These channels offer new ways for users to collaborate, so your app should be adapted to support their unique features. By making the right changes, you can improve both the app’s functionality and the user experience. + +## Why you should Adapt Apps to Shared and Private Channels + +As a developer, it's important to rethink how your app works in Microsoft Teams' Shared and Private channels. These channels offer new ways for users to collaborate—across teams and even across organizations—so your app needs to be flexible and aware of these environments. + +Why Adapting Your App Matters: + +1. Beyond Standard Channels: Without updates, your app won’t appear or function in Shared or Private channels. Some changes are mandatory for compatibility. +2. Wider Collaboration: Shared channels allow external users to join via Microsoft Entra B2B Direct Connect. Your app can support broader collaboration if properly configured. +3. Tailored Functionalities: You can highlight or build features that support cross-team workflows, like role-based permissions or scoped notifications. +4. Future-Proofing: These channels are the future of collaboration in Teams. Updating your app now ensures it remains relevant and competitive. + +## A Strategic Approach to Change + +Microsoft Teams is evolving with Shared and Private channels, and that means apps need to evolve too. To keep your app working smoothly across all channel types—standard, Shared, and Private—you need a clear strategy. + +### Mandatory Changes -Teams Connect shared channels facilitate secure collaboration seamlessly. Allow external users outside of your organization to collaborate with internal users in Teams without changing their user context. Enhance user experience unlike using guest accounts, for example, the members must sign out of Teams and sign in again using a guest account. Teams applications extend the powerful collaboration space. +If the app isn’t updated to support Shared and Private channels in Microsoft Teams, it might not work properly in those spaces. These changes are essential to avoid broken experiences for users. -:::image type="content" source="~/assets/images/app-fundamentals/shared-channels-teams.png" alt-text="Diagram shows Team B from organization A and Team C from organization B collaborating in a shared channel as Team A."::: +Note: Assess your app first and if it doesn’t depend on any of the following requirement, you can Mark your app is supported in Shared and Private channels in the app manifest and do functional changes later. -## Enable your app for shared channels +| Requirement | Description | Examples | +|------------------------|-----------------------------------------------------|--------------------------------------------------| +| Getting members of channel in which app will function | All members of team are also part of standard channels. But in Shared or Private channels it is flexible depending on the channel owner's choice. So make sure you use channel specific members APIs rather than using team members APIs, else your app can work unexpectedly for members outside the channel and leak content. | In a project management app that assigns tasks to members in a group, when working inside a Shared channel, you would need to get all members of the channel instead of members of team to correctly address the target users. | +|Accessing and storing data in Shared & Private channels | All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app will break and can leak data across channels. | For an app like a document management system that typically stores documents in team’s SharePoint site when working in standard channels, it will make changes to save and retrieve documents from the SharePoint sites dedicatedly linked to Shared or Private channels and not access team’s SharePoint site when working inside these channels. | +|Limit content access based on channels | As Shared and Private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you do not cross-post or cross-access data across channels and think carefully on your app scenarios | A summarization app can summarize non-confidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels. | +|Make your app available for Teams users in Shared and Private channels | After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app will not be discoverable in these channels anymore. **This is a Must-Do step for all apps.** -SupportedChannelTypes is an optional property that enables your app in non-standard channels. If your app supports the team scope and the property is defined, Teams enables your app in each channel type accordingly. Private and shared channels are supported. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). +### Optional Enhancements to Improve User Experience + +These updates are not required, but they can make your app work better in Shared and Private channels: + +| Requirement | Description | Examples | +|------------------------|-----------------------------------------------------|--------------------------------------------------| +| Privacy & Access Controls for app features | Implement conditional privacy & access controls within your app modules to cater to mix of internal and external users, protecting sensitive information as warranted for your app use-case. | For app which is used to conduct polls/surveys, while internal members might have the ability to create and analyse polls, external members in Shared channels or guests in private channels can be limited to have a 'respond-only' level of interaction and not allowed to create polls or view results of past polls.| +|Collaboration | Enhance features that facilitate smooth collaboration among diverse set of membership, like Shared task lists that provide clear visibility & editing permissions based on whether user is from host team, other team, or external to organization or is an in-tenant guest. | Whiteboarding apps could introduce a feature that allows external users in Shared channels or guests in private channels to add to the canvas, but these users cannot erase or edit internal members' contributions to the whiteboard. | +|Notification / Nudges | Refine your app's notification systems to avoid overloading users with irrelevant updates, possibly segmenting alerts by user group or channel type. | Helpdesk app used in a Shared channel, internal IT staff might receive immediate alerts for high-priority tickets or infrastructure issues, whereas external vendors might only receive notifications for tickets assigned to them or for maintenance schedules affecting their services. | + +## Technical Changes for App Compatibility with Shared and Private Channels + +With an enhanced understanding of of how users interact in Shared and Private channels, you can now focus on the technical steps to update your app. Microsoft Teams offers APIs specifically designed to work with these channels. + +### Identify Channels + +When your app runs inside Microsoft Teams, it needs to know what kind of channel it’s operating in. This helps the app adjust its functionality accordingly: + +| Tabs | Bots | +|--------------------------------------|----------------------------------------| +|When content UX is loaded in a Shared channel, use data received from [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call
For Shared channel, channel.membershipType == “Shared”,
For private channel channel.membershipType == “Private”, | Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for Shared channel activities [(Bot activity handlers - Teams Microsoft Learn)](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/bot-concepts?tabs=csharp%2Cdotnet), to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private Channel turnContext.activity.channelData.channel.type == “private” | + +SupportedChannelTypes is an optional property that enables your app in non-standard channels. If your app supports the team scope and the property is defined, Teams enables your app in each channel type accordingly. Private and Shared channels are supported. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). ```JSON "supportedChannelTypes": [ @@ -41,25 +119,59 @@ SupportedChannelTypes is an optional property that enables your app in non-stand > * If your app supports the team scope, it functions in standard channels, regardless of what values are defined in this property. > * Your app might need to account for the unique properties of each of these channel types in order to function properly. -## Get context for shared channels +### Get Context for Shared Channels -When the content UX is loaded in a shared channel, use the data received from `getContext` call for shared channel changes. `getContext` call publishes two new properties, `hostTeamGroupID` and `hostTenantID`, which are used to retrieve channel membership using Microsoft Graph APIs. `hostTeam` is the team that creates the shared channel. +When the content UX is loaded in a Shared or private channel, use the data received from `getContext` call for Shared or private channel changes. `getContext` call publishes two new properties, `hostTeamGroupID` and `hostTenantID`, which are used to retrieve channel membership using Microsoft Graph APIs. `hostTeam` is the team that creates the Shared channel. For more information to enable your tab, see: -* [Get context for your tab for private channels](../../tabs/how-to/access-teams-context.md#retrieve-context-in-private-channels) +* [Get context for your tab for Private channels](../../tabs/how-to/access-teams-context.md#retrieve-context-in-private-channels) * [Get context in shared channels](../../tabs/how-to/access-teams-context.md#get-context-in-shared-channels) -## Apps and permissions in shared channels +### Managing Channel Members and Permissions in Microsoft Teams Apps + +To ensure your app functions correctly in Shared and Private Channels, you must use channel-specific APIs to gather accurate member information. This is important because: + +Team membership APIs is not equal to Shared or Private Channel membership +Shared and Private Channels have their own membership models, which are not the same as the parent team’s membership. + +Each channel has its own SharePoint site and permissions +Apps must respect these boundaries to avoid data leakage or access errors. + +### Get Host Team Group ID & Channel ID + +| Tabs | Bots | +|--------------------------------------|----------------------------------------| +|You can use below mentioned parameters received in getContext call to get host team ID and channel ID required for any Graph calls
1. JSv1 : hostTeamGroupID and channelId
2. JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
Get host team group Id from: turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
Get channel Id from: turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. + +Note: Do not store these parameters, as these values can change when host team of a Shared channel is modified by the channel owner. Recommended to always fetch these dynamically when needed. + +Then, call respective APIs listed below based on your app requirements: + +### Get All Members of a Private or Shared Channel + +If you are using Graph + +Pass the teamID and channelID fetched above in GET teams/{team-id}/channels/{channel-id}/allMembers to get all members of a Shared or a private channel. + +If you are using Bots SDK + +Pass the channel ID you received above in [getConversationMembers](https://learn.microsoft.com/en-us/microsoftteams/platform/resources/team-chat-member-api-changes) API to get all members of a Shared or private channel. -You can collaborate with external members outside of your organization using shared channels. App permissions in shared channels follow the host team's app roster and host tenant's app policy. +Note: Next set of APIs are only required if you need to create any specific permissions or app experience based on type of member of a Shared channel, else you can skip these + +## Apps and permissions in Shared Channels + +You can collaborate with external members outside of your organization using Shared channels. App permissions in Shared channels follow the host team's app roster and host tenant's app policy. > [!NOTE] -> The [activity feed notification API](/graph/teams-send-activityfeednotifications) doesn't support cross-tenant notifications for apps in a shared channel. +> The [activity feed notification API](/graph/teams-send-activityfeednotifications) doesn't support cross-tenant notifications for apps in a Shared channel. + +### Get Shared Channel Membership -## Get shared channel membership +You can get direct Shared channel membership by using the `hostTeamGroupID` from `getContext` and following these steps: -You can get direct shared channel membership by using the `hostTeamGroupID` from `getContext` and following these steps: +Note: This returns both internal and external users added to the Shared channel 1. Get direct members with [GET channel members API](/graph/api/channel-list-members?view=graph-rest-beta&tabs=http&preserve-view=true) API. @@ -78,8 +190,21 @@ You can get direct shared channel membership by using the `hostTeamGroupID` from ```http GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/members ``` +## Retrieve Members of a Shared Channel in Microsoft Teams + +In Microsoft Teams, when a channel is shared with another team, its members are inherited from that team. These users are not directly added to the shared channel—they become members because the channel was shared with their team. + +Get each shared team with GET sharedWithTeams API. +GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams -## Classify members in the shared channel as in-tenant or out-tenant +Use GET members of each shared team (Team X) with GET sharedWithTeams API. +GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/members + +With this information, structure your app to interpret member details and apply appropriate permissions as per your app use-case. + +For instance, Once your app identifies the channel type (standard, private, or shared) and retrieves member details using Microsoft Graph or Bot APIs, you can ensure that features like editing and task creation are selectively enabled based on user roles (Owners vs members vs External participants) determined through the preceding API responses. + +## Classify Members in the Shared channel as In-tenant or Out-tenant You can classify members as in-tenant or out-tenant by comparing `tenantID` of the member or team with `hostTeamTenantID` as follows: @@ -93,7 +218,43 @@ You can classify members as in-tenant or out-tenant by comparing `tenantID` of t -## Microsoft Entra native identity +## Handling External Users (B2B Direct connect) in Shared Channels + +When building Microsoft Teams app, especially for Shared channels, it is important to understand external users (people from outside your organization) who are part of Shared channel through B2B Direct Connect. + +For this, perform the following steps: + +Step 1: Identify External Users +To do this, get tenant ID of the channel in which your app is operating inside. + +| Tabs | Bots | +|--------------------------------------|----------------------------------------| +|You can use below mentioned parameters received in [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call to get host team ID and channel ID required for any Graph calls
•JSv1 : hostTeamGroupID and channelId
•JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
•Get host team group Id from turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
•Get channel Id from turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. + +Then, identify external users from direct members list you received for Shared channel. + +Get members of a Shared or a Private channel. +GET /teams/{host-team-group-id}/channels/{channel-id}/members + +Compare tenantID of each member with the hostTenantID property from above to classify member as out-of-tenant if TenantIds don’t match. + +## Authenticate External Users to Access your App Content in SharePoint + +Note: This step is only required when requesting the SharePoint token, i.e your app stores content in SharePoint service of the tenant in which channel is hosted. + + | Tabs | Bots | +|--------------------------------------|----------------------------------------| +|Save host tenant ID of Shared channel where tab is configured. You can get host tenant ID from channel.ownerTenantId for JSv2 or hostTenantId for JSv1 received under getContext call. | For any event payload or action payload received for a bot, use Get hostTenant ID, from turnContext.activity.conversation.tenantId| + +Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to allow cross-tenant users to access content hosted inside Sharepoint site attached to the Shared channel. + +## Identify Guest Users (B2B Guests) in Private Channels + +You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](https://learn.microsoft.com/en-us/graph/api/resources/conversationmember?view=graph-rest-1.0) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/en-us/graph/api/channel-list-members?view=graph-rest-1.0&tabs=http) response. + +For guests, “roles” = “guest” + +## Microsoft Entra Native Identity Apps must function cross-tenants in installation and usage. The following table lists the channel types and their corresponding group IDs: @@ -102,7 +263,49 @@ Apps must function cross-tenants in installation and usage. The following table |Regular | Team Microsoft Entra group ID | Team Microsoft Entra group ID | |Shared | Empty | Host Team Microsoft Entra group ID | -## Apps in federated group chats with external users +## Access SharePoint Data in Shared and Private Channels + +If you're building an app using [SharePoint](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each Private channel has its own SPO site that is only accessible to members of that specific Shared or Private channel. + +Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or Private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/en-us/graph/api/channel-get-filesfolder?view=graph-rest-1.0&tabs=http). + +## Declare your App Works in Shared and Private Channels + +After making all the preceding changes, you need to declare your app’s manifest to declare that your app works in Shared and Private channels. + +This declaration will make your app visible to users in Shared and Private channels. Else, your app will not be discoverable to users in those channels. This is a mandatory update. + +supportsChannelFeatures is an optional property that enables your app in non-standard channels along with standard channels. + +Put supportsChannelFeatures as “level2” For more information, see . + +JSONCopy + +"supportsChannelFeatures": [ + + "Tier1"] + +Note: If your app supports team scope, it functions in standard channels, regardless of what values are defined in this property. + +Note: + +- When you declare support for "Tier1" in your app manifest. + - You are assuming the channel's roster matches the parent team. + - To get the full list of users with access—including direct and transitive members—use the API:GET /teams/{team-id}/channels/{channel-id}/allMembers + - This is the only API that returns everyone who can access the channel. Check the official documentation for more details. + +- Do not assume the type of users (e.g., guest, external, internal) in a channel’s roster. + - a. When using the GET /teams/{team-id}/channels/{channel-id}/allMembers API: + - Check the "roles" property to identify if the user is a guest. + - Check the "tenantId" property to determine if the user is:
*From the same tenant (intra-tenant), or
*From a different tenant (cross-tenant). + - This API returns both direct and transitive members—ensuring a complete view of channel access. + +- Do not assume that a channel’s storage location is the same as its parent team’s SharePoint site. + - Instead, always use the Microsoft Graph API endpoint: +GET /teams/{team-id}/channels/{channel-id}/filesFolder + - This API call returns the current and correct SharePoint document library location for the specified channel—especially important for Shared and Private channels, which have their own dedicated SharePoint sites. + +## Apps in Federated Group Chats with External Users > [!NOTE] > @@ -122,7 +325,7 @@ If you're developing an app for use in federated group chats with external users ## Code sample | Sample name | Description | Node.js | -|-------------|-------------|------|----| +|-------------|-------------|------| | Teams Conversation Bot | This sample app displays the names of the members in a federated group chat with external users. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-feed-members/nodejs/)| ## See also @@ -134,3 +337,4 @@ If you're developing an app for use in federated group chats with external users * [Retention policy for Teams locations](/microsoft-365/compliance/create-retention-policies) * [Use guest access and external access to collaborate with people outside your organization](/microsoftteams/communicate-with-users-from-other-organizations) * [Manage external meetings and chat with people and organizations using Microsoft identities](/microsoftteams/trusted-organizations-external-meetings-chat?tabs=organization-settings) + From 7815409181f388be9e7ee6feb89587319cea73ae Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 6 Aug 2025 18:53:57 +0530 Subject: [PATCH 02/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 2cdc6b920ee..de1deb9457c 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -10,8 +10,6 @@ ms.date: 04/09/2025 # Adapting Microsoft Teams App for Shared and Private Channels -Microsoft Teams apps need to adapt to Shared and Private channels, which bring new collaboration patterns. This guide helps developers understand the changes required so their apps work smoothly across all channel types. - Microsoft Teams Connect Shared and Private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a Shared channel with: * Members of another team within the same organization. From b24de9c1a6e8002300d738dbaa132c0f205ccf42 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 7 Aug 2025 11:27:03 +0530 Subject: [PATCH 03/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index de1deb9457c..c4b0dc33fb2 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -10,11 +10,12 @@ ms.date: 04/09/2025 # Adapting Microsoft Teams App for Shared and Private Channels -Microsoft Teams Connect Shared and Private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a Shared channel with: +Microsoft Teams apps need to adapt to shared and private channels, which bring new collaboration patterns. This guide helps developers in understanding the changes required so that their apps work smoothly across all channel types. + +Microsoft Teams Connects shared and private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: * Members of another team within the same organization. -* Individuals within the same organization. -* Individuals and other teams of other organizations. +* Members of teams of other organizations. > [!NOTE] > @@ -29,11 +30,11 @@ Teams Connect Shared channels facilitate secure collaboration seamlessly. Allow ### Shared Channel -Shared channels in Microsoft Teams let you collaborate with people who aren’t part of your team. Only those who are added as owners or members of the Shared channel can access it. Regular guest accounts (via Microsoft Entra) can’t be added to Shared channels. However, you can still invite people from outside your organization using Microsoft Entra B2B direct connect, which allows secure external collaboration without needing to add them as guests. More details [here](https://learn.microsoft.com/en-us/microsoftteams/shared-channels). +Shared channels in Microsoft Teams let you collaborate with people who aren’t part of your team. Only users added as owners or members can access the shared channel. You can’t add regular guest accounts (via Microsoft Entra) to shared channels. However, you can still invite people from outside your organization through Microsoft Entra B2B direct connect, which enables secure external collaboration with no need to add them as guests. More details [here](https://learn.microsoft.com/en-us/microsoftteams/shared-channels). ### Private Channel -Private channels in Microsoft Teams are special spaces for focused collaboration within a team. Only the people who are added as owners or members of the private channel can access it. You can include guests (users with Microsoft Entra guest accounts) in a private channel, but only if they are already part of the host team. +Private channels in Microsoft Teams are special spaces for focused collaboration within a team. The system allows only people added as owners or members of the private channel to access it. You can include guests (users with Microsoft Entra guest accounts) in a private channel, but only if they are already part of the host team. ### Feature Differences between Shared and Private Channels @@ -47,53 +48,51 @@ Private channels in Microsoft Teams are special spaces for focused collaboration |External participants (Direct Connect) can participate in channel |No | Yes | No | |Each channel has a dedicated SharePoint site |No | Yes | Yes | -Standard and private channels help team members collaborate within their own group. Shared channels, however, allow collaboration with people outside the team without needing to add them to the team. This opens up new ways of working but also requires apps to work differently in these shared spaces. - ## Reimagining App's Functionality for Shared and Private Channels -As an app developer, it's important to rethink how your app works within Shared and Private channels in Microsoft Teams. These channels offer new ways for users to collaborate, so your app should be adapted to support their unique features. By making the right changes, you can improve both the app’s functionality and the user experience. +As an app developer, it’s important to rethink how your app works within shared and private channels in Microsoft Teams. Since these channels provide new way for users to collaborate, your app must adapt to support their unique features. ## Why you should Adapt Apps to Shared and Private Channels -As a developer, it's important to rethink how your app works in Microsoft Teams' Shared and Private channels. These channels offer new ways for users to collaborate—across teams and even across organizations—so your app needs to be flexible and aware of these environments. +As a developer, it's important to rethink how your app works in Microsoft Teams' shared and private channels. These channels offer new ways for users to collaborate—across teams and even across organizations—so your app needs to be flexible and aware of these environments. Why Adapting Your App Matters: -1. Beyond Standard Channels: Without updates, your app won’t appear or function in Shared or Private channels. Some changes are mandatory for compatibility. +1. Beyond Standard Channels: Without updates, your app does not appear or function in shared or private channels. Some changes are mandatory for compatibility. 2. Wider Collaboration: Shared channels allow external users to join via Microsoft Entra B2B Direct Connect. Your app can support broader collaboration if properly configured. 3. Tailored Functionalities: You can highlight or build features that support cross-team workflows, like role-based permissions or scoped notifications. 4. Future-Proofing: These channels are the future of collaboration in Teams. Updating your app now ensures it remains relevant and competitive. ## A Strategic Approach to Change -Microsoft Teams is evolving with Shared and Private channels, and that means apps need to evolve too. To keep your app working smoothly across all channel types—standard, Shared, and Private—you need a clear strategy. +Microsoft Teams is developing with shared and private channels, and that means apps need to develop too. To keep your app working smoothly across all channel types—standard, shared, and private—you need a logical strategy. ### Mandatory Changes -If the app isn’t updated to support Shared and Private channels in Microsoft Teams, it might not work properly in those spaces. These changes are essential to avoid broken experiences for users. +If you don’t update the app to support shared and private channels in Microsoft Teams, it might not work properly in those spaces.   -Note: Assess your app first and if it doesn’t depend on any of the following requirement, you can Mark your app is supported in Shared and Private channels in the app manifest and do functional changes later. +Note: First assess your app, and if it does not depend on any of the following requirements, you can mark that shared and private channels support your app in the app manifest and do functional changes later. -| Requirement | Description | Examples | +|Requirement|Description|Examples| |------------------------|-----------------------------------------------------|--------------------------------------------------| -| Getting members of channel in which app will function | All members of team are also part of standard channels. But in Shared or Private channels it is flexible depending on the channel owner's choice. So make sure you use channel specific members APIs rather than using team members APIs, else your app can work unexpectedly for members outside the channel and leak content. | In a project management app that assigns tasks to members in a group, when working inside a Shared channel, you would need to get all members of the channel instead of members of team to correctly address the target users. | -|Accessing and storing data in Shared & Private channels | All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app will break and can leak data across channels. | For an app like a document management system that typically stores documents in team’s SharePoint site when working in standard channels, it will make changes to save and retrieve documents from the SharePoint sites dedicatedly linked to Shared or Private channels and not access team’s SharePoint site when working inside these channels. | -|Limit content access based on channels | As Shared and Private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you do not cross-post or cross-access data across channels and think carefully on your app scenarios | A summarization app can summarize non-confidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels. | -|Make your app available for Teams users in Shared and Private channels | After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app will not be discoverable in these channels anymore. **This is a Must-Do step for all apps.** +| Getting members of channel in which app will function|All members of team are also part of standard channels. But in Shared or Private channels it is flexible depending on the channel owner's choice. So make sure you use channel specific members APIs rather than using team members APIs, else your app can work unexpectedly for members outside the channel and leak content.| In a project management app that assigns tasks to members in a group, when working inside a Shared channel, you would need to get all members of the channel instead of members of team to correctly address the target users.| +|Accessing and storing data in Shared & Private channels|All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app will break and can leak data across channels.|For an app like a document management system that typically stores documents in team’s SharePoint site when working in standard channels, it will make changes to save and retrieve documents from the SharePoint sites dedicatedly linked to Shared or Private channels and not access team’s SharePoint site when working inside these channels.| +|Limit content access based on channels|As Shared and Private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you do not cross-post or cross-access data across channels and think carefully on your app scenarios.|A summarization app can summarize non-confidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels.| +|Make your app available for Teams users in Shared and Private channels|After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app will not be discoverable in these channels anymore. **This is a Must-Do step for all apps.** ### Optional Enhancements to Improve User Experience -These updates are not required, but they can make your app work better in Shared and Private channels: +These updates are not required, but they can make your app work better in shared and private channels: -| Requirement | Description | Examples | +|Requirement|Description|Examples| |------------------------|-----------------------------------------------------|--------------------------------------------------| -| Privacy & Access Controls for app features | Implement conditional privacy & access controls within your app modules to cater to mix of internal and external users, protecting sensitive information as warranted for your app use-case. | For app which is used to conduct polls/surveys, while internal members might have the ability to create and analyse polls, external members in Shared channels or guests in private channels can be limited to have a 'respond-only' level of interaction and not allowed to create polls or view results of past polls.| -|Collaboration | Enhance features that facilitate smooth collaboration among diverse set of membership, like Shared task lists that provide clear visibility & editing permissions based on whether user is from host team, other team, or external to organization or is an in-tenant guest. | Whiteboarding apps could introduce a feature that allows external users in Shared channels or guests in private channels to add to the canvas, but these users cannot erase or edit internal members' contributions to the whiteboard. | -|Notification / Nudges | Refine your app's notification systems to avoid overloading users with irrelevant updates, possibly segmenting alerts by user group or channel type. | Helpdesk app used in a Shared channel, internal IT staff might receive immediate alerts for high-priority tickets or infrastructure issues, whereas external vendors might only receive notifications for tickets assigned to them or for maintenance schedules affecting their services. | +|Privacy & Access Controls for app features| Implement conditional privacy & access controls within your app modules to cater to mix of internal and external users, protecting sensitive information as warranted for your app use-case.| For app which is used to conduct polls/surveys, while internal members might have the ability to create and analyse polls, external members in Shared channels or guests in private channels can be limited to have a 'respond-only' level of interaction and not allowed to create polls or view results of past polls.| +|Collaboration| Enhance features that facilitate smooth collaboration among diverse set of membership, like Shared task lists that provide clear visibility & editing permissions based on whether user is from host team, other team, or external to organization or is an in-tenant guest.| Whiteboarding apps could introduce a feature that allows external users in Shared channels or guests in private channels to add to the canvas, but these users cannot erase or edit internal members' contributions to the whiteboard.| +|Notification / Nudges| Refine your app's notification systems to avoid overloading users with irrelevant updates, possibly segmenting alerts by user group or channel type.| Helpdesk app used in a Shared channel, internal IT staff might receive immediate alerts for high-priority tickets or infrastructure issues, whereas external vendors might only receive notifications for tickets assigned to them or for maintenance schedules affecting their services.| ## Technical Changes for App Compatibility with Shared and Private Channels -With an enhanced understanding of of how users interact in Shared and Private channels, you can now focus on the technical steps to update your app. Microsoft Teams offers APIs specifically designed to work with these channels. +With an enhanced understanding of how users interact in shared and private channels, you can now focus on the technical steps to update your app. Microsoft Teams offers APIs specifically designed to work with these channels. ### Identify Channels From 367483153ff90e71c4bd0cfc2eba85ea5b4753e0 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 7 Aug 2025 13:42:39 +0530 Subject: [PATCH 04/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index c4b0dc33fb2..30c497a882f 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -30,7 +30,7 @@ Teams Connect Shared channels facilitate secure collaboration seamlessly. Allow ### Shared Channel -Shared channels in Microsoft Teams let you collaborate with people who aren’t part of your team. Only users added as owners or members can access the shared channel. You can’t add regular guest accounts (via Microsoft Entra) to shared channels. However, you can still invite people from outside your organization through Microsoft Entra B2B direct connect, which enables secure external collaboration with no need to add them as guests. More details [here](https://learn.microsoft.com/en-us/microsoftteams/shared-channels). +Shared channels in Microsoft Teams let you collaborate with people who aren’t part of your team. Only users added as owners or members can access the shared channel. You can’t add regular guest accounts (via Microsoft Entra) to shared channels. However, you can still invite people from outside your organization through Microsoft Entra B2B direct connect, which enables secure external collaboration with no need to add them as guests. ### Private Channel @@ -96,13 +96,13 @@ With an enhanced understanding of how users interact in shared and private chann ### Identify Channels -When your app runs inside Microsoft Teams, it needs to know what kind of channel it’s operating in. This helps the app adjust its functionality accordingly: +When your app runs inside Microsoft Teams, it needs to know what kind of channel it’s operating in. This helps the app adjust its functionality accordingly. -| Tabs | Bots | +| Tabs| Bots| |--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call
For Shared channel, channel.membershipType == “Shared”,
For private channel channel.membershipType == “Private”, | Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for Shared channel activities [(Bot activity handlers - Teams Microsoft Learn)](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/bot-concepts?tabs=csharp%2Cdotnet), to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private Channel turnContext.activity.channelData.channel.type == “private” | +|When content UX is loaded in a Shared channel, use data received from [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call
For Shared channel, channel.membershipType == “Shared”,
For private channel channel.membershipType == “Private”,|Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for Shared channel activities [(Bot activity handlers - Teams Microsoft Learn)](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/bot-concepts?tabs=csharp%2Cdotnet), to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private Channel turnContext.activity.channelData.channel.type == “private”| -SupportedChannelTypes is an optional property that enables your app in non-standard channels. If your app supports the team scope and the property is defined, Teams enables your app in each channel type accordingly. Private and Shared channels are supported. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). +SupportedChannelTypes is an optional property that enables your app in non-standard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). ```JSON "supportedChannelTypes": [ @@ -113,27 +113,25 @@ SupportedChannelTypes is an optional property that enables your app in non-stand > [!NOTE] > -> * If your app supports the team scope, it functions in standard channels, regardless of what values are defined in this property. +> * If your app supports the team scope, it functions in standard channels, regardless of what this property defines. > * Your app might need to account for the unique properties of each of these channel types in order to function properly. ### Get Context for Shared Channels -When the content UX is loaded in a Shared or private channel, use the data received from `getContext` call for Shared or private channel changes. `getContext` call publishes two new properties, `hostTeamGroupID` and `hostTenantID`, which are used to retrieve channel membership using Microsoft Graph APIs. `hostTeam` is the team that creates the Shared channel. +When loading the content UX in a shared or private channel, use the data received from `getContext` call for shared or private channel changes. `getContext` call publishes two new properties, `hostTeamGroupID` and `hostTenantID`, which are used to retrieve channel membership using Microsoft Graph APIs. `hostTeam` is the team that creates the shared channel. For more information to enable your tab, see: -* [Get context for your tab for Private channels](../../tabs/how-to/access-teams-context.md#retrieve-context-in-private-channels) +* [Get context for your tab for private channels](../../tabs/how-to/access-teams-context.md#retrieve-context-in-private-channels) * [Get context in shared channels](../../tabs/how-to/access-teams-context.md#get-context-in-shared-channels) ### Managing Channel Members and Permissions in Microsoft Teams Apps -To ensure your app functions correctly in Shared and Private Channels, you must use channel-specific APIs to gather accurate member information. This is important because: +To ensure your app functions correctly in shared and private channels, you must use channel-specific APIs to gather accurate member information. This is important because: -Team membership APIs is not equal to Shared or Private Channel membership -Shared and Private Channels have their own membership models, which are not the same as the parent team’s membership. +TTeam membership APIs are not equal to shared or private Channel membershipShared and private channels have their own membership models, which are not the same as the parent team’s membership. -Each channel has its own SharePoint site and permissions -Apps must respect these boundaries to avoid data leakage or access errors. +Each channel has its own SharePointsite and permissionsApps must respect these boundaries to avoid data leakage or access errors. ### Get Host Team Group ID & Channel ID @@ -141,9 +139,9 @@ Apps must respect these boundaries to avoid data leakage or access errors. |--------------------------------------|----------------------------------------| |You can use below mentioned parameters received in getContext call to get host team ID and channel ID required for any Graph calls
1. JSv1 : hostTeamGroupID and channelId
2. JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
Get host team group Id from: turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
Get channel Id from: turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. -Note: Do not store these parameters, as these values can change when host team of a Shared channel is modified by the channel owner. Recommended to always fetch these dynamically when needed. +Note: Do not store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these dynamically when needed. -Then, call respective APIs listed below based on your app requirements: +Then, call APIs listed below based on your app requirements: ### Get All Members of a Private or Shared Channel @@ -155,7 +153,7 @@ If you are using Bots SDK Pass the channel ID you received above in [getConversationMembers](https://learn.microsoft.com/en-us/microsoftteams/platform/resources/team-chat-member-api-changes) API to get all members of a Shared or private channel. -Note: Next set of APIs are only required if you need to create any specific permissions or app experience based on type of member of a Shared channel, else you can skip these +Note: Use the following APIs only if your app needs to create specific permissions or experiences based on the member type in a shared channel. Otherwise, you can skip them. ## Apps and permissions in Shared Channels From 4360c019d2589f9c1c99cf878f8a699053281768 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 7 Aug 2025 15:36:04 +0530 Subject: [PATCH 05/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 72 ++++++++++--------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 30c497a882f..6aab783890a 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -1,5 +1,5 @@ --- -title: Teams Connect Shared Channels +title: Teams Connects Shared Channels author: surbhigupta description: Learn about Teams Connect shared channels to securely collaborate with internal and external users in a shared space without switching tenants. ms.author: surbhigupta @@ -12,7 +12,7 @@ ms.date: 04/09/2025 Microsoft Teams apps need to adapt to shared and private channels, which bring new collaboration patterns. This guide helps developers in understanding the changes required so that their apps work smoothly across all channel types. -Microsoft Teams Connects shared and private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: +Microsoft Teams Connect shared and private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: * Members of another team within the same organization. * Members of teams of other organizations. @@ -22,7 +22,7 @@ Microsoft Teams Connects shared and private channels allow members of a channel > * Tab apps in Shared channels are available in [Government Community Cloud (GCC), GCC High, Department of Defense (DoD)](../cloud-overview.md#teams-app-capabilities), and [Teams operated by 21Vianet](../sovereign-cloud.md) environments. > * SharePoint and the SharePoint pages apps aren't supported for Shared channels in GCC, GCC High, DoD, and Teams operated by 21Vianet environments. -Teams Connect Shared channels facilitate secure collaboration seamlessly. Allow external users outside of your organization to collaborate with internal users in Teams without changing their user context. Enhance user experience unlike using guest accounts, for example, the members must sign out of Teams and sign in again using a guest account. Teams applications extend the powerful collaboration space. +Teams Connects Shared channels facilitate secure collaboration seamlessly. Allow external users outside of your organization to collaborate with internal users in Teams without changing their user context. Enhance user experience unlike using guest accounts, for example, the members must sign out of Teams and sign in again using a guest account. Teams applications extend the powerful collaboration space. :::image type="content" source="~/assets/images/app-fundamentals/shared-channels-teams.png" alt-text="Diagram shows Team B from organization A and Team C from organization B collaborating in a Shared channel as Team A."::: @@ -34,7 +34,7 @@ Shared channels in Microsoft Teams let you collaborate with people who aren’t ### Private Channel -Private channels in Microsoft Teams are special spaces for focused collaboration within a team. The system allows only people added as owners or members of the private channel to access it. You can include guests (users with Microsoft Entra guest accounts) in a private channel, but only if they are already part of the host team. +Private channels in Microsoft Teams are special spaces for focused collaboration within a team. The system allows only people added as owners or members of the private channel to access it. You can include guests (users with Microsoft Entra guest accounts) in a private channel, but only if they're already part of the host team. ### Feature Differences between Shared and Private Channels @@ -58,7 +58,7 @@ As a developer, it's important to rethink how your app works in Microsoft Teams' Why Adapting Your App Matters: -1. Beyond Standard Channels: Without updates, your app does not appear or function in shared or private channels. Some changes are mandatory for compatibility. +1. Beyond Standard Channels: Without updates, your app doesn't appear or function in shared or private channels. Some changes are mandatory for compatibility. 2. Wider Collaboration: Shared channels allow external users to join via Microsoft Entra B2B Direct Connect. Your app can support broader collaboration if properly configured. 3. Tailored Functionalities: You can highlight or build features that support cross-team workflows, like role-based permissions or scoped notifications. 4. Future-Proofing: These channels are the future of collaboration in Teams. Updating your app now ensures it remains relevant and competitive. @@ -71,36 +71,40 @@ Microsoft Teams is developing with shared and private channels, and that means a If you don’t update the app to support shared and private channels in Microsoft Teams, it might not work properly in those spaces.   -Note: First assess your app, and if it does not depend on any of the following requirements, you can mark that shared and private channels support your app in the app manifest and do functional changes later. +Note- Assess whether your app relies on specific requirements. If it doesn't, enable support for shared and private channels in the app manifest. You can apply functional changes later. |Requirement|Description|Examples| |------------------------|-----------------------------------------------------|--------------------------------------------------| -| Getting members of channel in which app will function|All members of team are also part of standard channels. But in Shared or Private channels it is flexible depending on the channel owner's choice. So make sure you use channel specific members APIs rather than using team members APIs, else your app can work unexpectedly for members outside the channel and leak content.| In a project management app that assigns tasks to members in a group, when working inside a Shared channel, you would need to get all members of the channel instead of members of team to correctly address the target users.| -|Accessing and storing data in Shared & Private channels|All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app will break and can leak data across channels.|For an app like a document management system that typically stores documents in team’s SharePoint site when working in standard channels, it will make changes to save and retrieve documents from the SharePoint sites dedicatedly linked to Shared or Private channels and not access team’s SharePoint site when working inside these channels.| -|Limit content access based on channels|As Shared and Private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you do not cross-post or cross-access data across channels and think carefully on your app scenarios.|A summarization app can summarize non-confidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels.| -|Make your app available for Teams users in Shared and Private channels|After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app will not be discoverable in these channels anymore. **This is a Must-Do step for all apps.** +| Getting members of channel in which app functions|All members of team are also part of standard channels. But in Shared or private channels it's flexible depending on the channel owner's choice. So make sure you use channel specific members APIs rather than using team members APIs, else your app can work unexpectedly for members outside the channel and leak content.| In a project management app, assigning tasks in a Shared channel means targeting channel members—not the full team.| +|Accessing and storing data in Shared & private channels|All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app breaks and can leak data across channels.|A document management app typically stores files on the team’s SharePoint site when working in standard channels. Shared and private channels have their own dedicated SharePoint sites, which are separate from the team’s site. The app saves and retrieves files from the SharePoint site that is linked to the specific channel, rather than using the team’s SharePoint site when operating within Shared or private channels.| +|Limit content access based on channels|As Shared and private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you don't cross-post or cross-access data across channels and think carefully on your app scenarios.|A summarization app can summarize non-confidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels.| +|Make your app available for Teams users in Shared and private channels|After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app isn't discoverable in these channels anymore. **This is a Must-Do step for all apps.** ### Optional Enhancements to Improve User Experience -These updates are not required, but they can make your app work better in shared and private channels: +These updates are'nt required, but they can make your app work better in shared and private channels: |Requirement|Description|Examples| |------------------------|-----------------------------------------------------|--------------------------------------------------| -|Privacy & Access Controls for app features| Implement conditional privacy & access controls within your app modules to cater to mix of internal and external users, protecting sensitive information as warranted for your app use-case.| For app which is used to conduct polls/surveys, while internal members might have the ability to create and analyse polls, external members in Shared channels or guests in private channels can be limited to have a 'respond-only' level of interaction and not allowed to create polls or view results of past polls.| -|Collaboration| Enhance features that facilitate smooth collaboration among diverse set of membership, like Shared task lists that provide clear visibility & editing permissions based on whether user is from host team, other team, or external to organization or is an in-tenant guest.| Whiteboarding apps could introduce a feature that allows external users in Shared channels or guests in private channels to add to the canvas, but these users cannot erase or edit internal members' contributions to the whiteboard.| +|Privacy & Access Controls for app features| Implement conditional privacy & access controls within your app modules to cater to mix of internal and external users, protecting sensitive information as warranted for your app use-case.|In a poll or survey app, internal members create polls and view results. External members in Shared channels and guests in Private channels only respond to polls. They can't create polls or see past results.| +|Collaboration| Make it easier for people to work together in Shared channels. Add task lists that everyone can see. If they are from the host team, they can add and change tasks. If they are from another team, they may have fewer rights. Guests inside the company and people from outside can see tasks, but can't change them..| Whiteboarding apps introduce a feature that lets external users in shared channels or guests in private channels add to the canvas. These users don't erase or edit contributions made by internal members.| |Notification / Nudges| Refine your app's notification systems to avoid overloading users with irrelevant updates, possibly segmenting alerts by user group or channel type.| Helpdesk app used in a Shared channel, internal IT staff might receive immediate alerts for high-priority tickets or infrastructure issues, whereas external vendors might only receive notifications for tickets assigned to them or for maintenance schedules affecting their services.| ## Technical Changes for App Compatibility with Shared and Private Channels -With an enhanced understanding of how users interact in shared and private channels, you can now focus on the technical steps to update your app. Microsoft Teams offers APIs specifically designed to work with these channels. +With an enhanced understanding of how users interact in shared and private channels, you can now focus on the technical steps to update your app. Microsoft Teams offers APIs to work with these channels. ### Identify Channels -When your app runs inside Microsoft Teams, it needs to know what kind of channel it’s operating in. This helps the app adjust its functionality accordingly. +When your app runs inside Microsoft Teams, it needs to know what kind of channel it’s operating in. This check helps the app adjust its functionality accordingly. | Tabs| Bots| |--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call
For Shared channel, channel.membershipType == “Shared”,
For private channel channel.membershipType == “Private”,|Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for Shared channel activities [(Bot activity handlers - Teams Microsoft Learn)](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/bot-concepts?tabs=csharp%2Cdotnet), to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private Channel turnContext.activity.channelData.channel.type == “private”| +|When content UX is loaded in a Shared channel, use data received from [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call
For Shared channel, channel.membershipType == “Shared”,
For private channel channel.membershipType =="Private",|To know where your bot was used in Microsoft Teams, you can check the channel.type property from the bot's activity data. check is found at turnContext.activity.channelData.channel.type. +If the value is "shared", it means the bot was used in a Shared channel. +If the value is "private", it means the bot was used in a Private channel. +This check helps your bot understand the context of the message and respond accordingly. +You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/bot-concepts?tabs=csharp%2Cdotnet)| SupportedChannelTypes is an optional property that enables your app in non-standard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). @@ -127,27 +131,27 @@ For more information to enable your tab, see: ### Managing Channel Members and Permissions in Microsoft Teams Apps -To ensure your app functions correctly in shared and private channels, you must use channel-specific APIs to gather accurate member information. This is important because: +To ensure your app functions correctly in shared and private channels, you must use channel-specific APIs to gather accurate member information. Usage of channel-specific APIS is important because: -TTeam membership APIs are not equal to shared or private Channel membershipShared and private channels have their own membership models, which are not the same as the parent team’s membership. +Team membership APIs aren't equal to shared or private Channel membershipShared and private channels have their own membership models, which aren't the same as the parent team’s membership. -Each channel has its own SharePointsite and permissionsApps must respect these boundaries to avoid data leakage or access errors. +Each channel has its own SharePoint site with its own permissions. Apps must follow these rules to prevent data leaks or access problems. ### Get Host Team Group ID & Channel ID | Tabs | Bots | |--------------------------------------|----------------------------------------| -|You can use below mentioned parameters received in getContext call to get host team ID and channel ID required for any Graph calls
1. JSv1 : hostTeamGroupID and channelId
2. JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
Get host team group Id from: turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
Get channel Id from: turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. +|You can use below mentioned parameters received in getContext call to get host team ID and channel ID required for any Graph calls
1. JSv1: hostTeamGroupID and channelId
2. JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
Get host team group ID from: turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
Get channel ID from: turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. -Note: Do not store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these dynamically when needed. +Note: Don't store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these dynamically when needed. Then, call APIs listed below based on your app requirements: ### Get All Members of a Private or Shared Channel -If you are using Graph +If you're using Graph -Pass the teamID and channelID fetched above in GET teams/{team-id}/channels/{channel-id}/allMembers to get all members of a Shared or a private channel. +Pass the teamID and channelID fetched above in GET teams/{team-ID}/channels/{channel-ID}/allMembers to get all members of a Shared or a private channel. If you are using Bots SDK @@ -164,9 +168,9 @@ You can collaborate with external members outside of your organization using Sha ### Get Shared Channel Membership -You can get direct Shared channel membership by using the `hostTeamGroupID` from `getContext` and following these steps: +You can get direct shared channel membership by using the `hostTeamGroupID` from `getContext` and following these steps: -Note: This returns both internal and external users added to the Shared channel +Note: This returns both internal and external users added to the Shared channel. 1. Get direct members with [GET channel members API](/graph/api/channel-list-members?view=graph-rest-beta&tabs=http&preserve-view=true) API. @@ -187,7 +191,7 @@ Note: This returns both internal and external users added to the Shared channel ``` ## Retrieve Members of a Shared Channel in Microsoft Teams -In Microsoft Teams, when a channel is shared with another team, its members are inherited from that team. These users are not directly added to the shared channel—they become members because the channel was shared with their team. +In Microsoft Teams, when you share a channel with another team, the channel includes that team’s members. The system doesn’t add users directly to the shared channel; instead, it grants access through their team’s connection to the channel. Get each shared team with GET sharedWithTeams API. GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams @@ -215,7 +219,7 @@ You can classify members as in-tenant or out-tenant by comparing `tenantID` of t ## Handling External Users (B2B Direct connect) in Shared Channels -When building Microsoft Teams app, especially for Shared channels, it is important to understand external users (people from outside your organization) who are part of Shared channel through B2B Direct Connect. +Each Teams channel links to its own SharePoint site with separate permissions. When building apps, make sure to check these limits so you don’t run into access issues or cause data leaks. For this, perform the following steps: @@ -224,7 +228,7 @@ To do this, get tenant ID of the channel in which your app is operating inside. | Tabs | Bots | |--------------------------------------|----------------------------------------| -|You can use below mentioned parameters received in [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call to get host team ID and channel ID required for any Graph calls
•JSv1 : hostTeamGroupID and channelId
•JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
•Get host team group Id from turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
•Get channel Id from turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. +|You can use below mentioned parameters received in [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call to get host team ID and channel ID required for any Graph calls
•JSv1: hostTeamGroupID and channelId
•JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
•Get host team group ID from turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
•Get channel ID from turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. Then, identify external users from direct members list you received for Shared channel. @@ -235,7 +239,7 @@ Compare tenantID of each member with the hostTenantID property from above to cla ## Authenticate External Users to Access your App Content in SharePoint -Note: This step is only required when requesting the SharePoint token, i.e your app stores content in SharePoint service of the tenant in which channel is hosted. +Note: This step is only required when requesting the SharePoint token, that is your app stores content in SharePoint service of the tenant in which channel is hosted. | Tabs | Bots | |--------------------------------------|----------------------------------------| @@ -268,7 +272,7 @@ Use the Graph API to access the document library of the SharePoint Online (SPO) After making all the preceding changes, you need to declare your app’s manifest to declare that your app works in Shared and Private channels. -This declaration will make your app visible to users in Shared and Private channels. Else, your app will not be discoverable to users in those channels. This is a mandatory update. +This declaration will make your app visible to users in Shared and Private channels. Else, your app won't be discoverable to users in those channels. This is a mandatory update. supportsChannelFeatures is an optional property that enables your app in non-standard channels along with standard channels. @@ -285,12 +289,12 @@ Note: If your app supports team scope, it functions in standard channels, regard Note: - When you declare support for "Tier1" in your app manifest. - - You are assuming the channel's roster matches the parent team. - - To get the full list of users with access—including direct and transitive members—use the API:GET /teams/{team-id}/channels/{channel-id}/allMembers + - You're assuming the channel's roster matches the parent team. + - To get the full list of users with access—including direct and transitive members—use the API: GET/teams/{team-id}/channels/{channel-id}/allMembers - This is the only API that returns everyone who can access the channel. Check the official documentation for more details. -- Do not assume the type of users (e.g., guest, external, internal) in a channel’s roster. - - a. When using the GET /teams/{team-id}/channels/{channel-id}/allMembers API: +- Don't assume the type of users (e.g., guest, external, internal) in a channel’s roster. + - a. When using the GET/teams/{team-id}/channels/{channel-id}/allMembers API: - Check the "roles" property to identify if the user is a guest. - Check the "tenantId" property to determine if the user is:
*From the same tenant (intra-tenant), or
*From a different tenant (cross-tenant). - This API returns both direct and transitive members—ensuring a complete view of channel access. From fad75456ebac22f2fe38f7b855773f5f4712d298 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 7 Aug 2025 16:11:16 +0530 Subject: [PATCH 06/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 6aab783890a..3c2667752e6 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -77,17 +77,17 @@ Note- Assess whether your app relies on specific requirements. If it doesn't, en |------------------------|-----------------------------------------------------|--------------------------------------------------| | Getting members of channel in which app functions|All members of team are also part of standard channels. But in Shared or private channels it's flexible depending on the channel owner's choice. So make sure you use channel specific members APIs rather than using team members APIs, else your app can work unexpectedly for members outside the channel and leak content.| In a project management app, assigning tasks in a Shared channel means targeting channel members—not the full team.| |Accessing and storing data in Shared & private channels|All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app breaks and can leak data across channels.|A document management app typically stores files on the team’s SharePoint site when working in standard channels. Shared and private channels have their own dedicated SharePoint sites, which are separate from the team’s site. The app saves and retrieves files from the SharePoint site that is linked to the specific channel, rather than using the team’s SharePoint site when operating within Shared or private channels.| -|Limit content access based on channels|As Shared and private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you don't cross-post or cross-access data across channels and think carefully on your app scenarios.|A summarization app can summarize non-confidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels.| -|Make your app available for Teams users in Shared and private channels|After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app isn't discoverable in these channels anymore. **This is a Must-Do step for all apps.** +|Limit content access based on channels|As Shared and private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you don't cross-post or cross-access data across channels and think carefully on your app scenarios.|A summarization app can summarize nonconfidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels.| +|Make your app available for Teams users in Shared and private channels|After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app isn't discoverable in these channels anymore. **This is a Must-Do step for all apps.** ### Optional Enhancements to Improve User Experience -These updates are'nt required, but they can make your app work better in shared and private channels: +These updates aren't required, but they can make your app work better in shared and private channels: |Requirement|Description|Examples| |------------------------|-----------------------------------------------------|--------------------------------------------------| |Privacy & Access Controls for app features| Implement conditional privacy & access controls within your app modules to cater to mix of internal and external users, protecting sensitive information as warranted for your app use-case.|In a poll or survey app, internal members create polls and view results. External members in Shared channels and guests in Private channels only respond to polls. They can't create polls or see past results.| -|Collaboration| Make it easier for people to work together in Shared channels. Add task lists that everyone can see. If they are from the host team, they can add and change tasks. If they are from another team, they may have fewer rights. Guests inside the company and people from outside can see tasks, but can't change them..| Whiteboarding apps introduce a feature that lets external users in shared channels or guests in private channels add to the canvas. These users don't erase or edit contributions made by internal members.| +|Collaboration| Make it easier for people to work together in Shared channels. Add task lists that everyone can see. If they are from the host team, they can add and change tasks. If they are from another team, they may have fewer rights. Guests inside the company and people from outside can see tasks, but can't change them.| Whiteboarding apps introduce a feature that lets external users in shared channels or guests in private channels add to the canvas. These users don't erase or edit contributions made by internal members.| |Notification / Nudges| Refine your app's notification systems to avoid overloading users with irrelevant updates, possibly segmenting alerts by user group or channel type.| Helpdesk app used in a Shared channel, internal IT staff might receive immediate alerts for high-priority tickets or infrastructure issues, whereas external vendors might only receive notifications for tickets assigned to them or for maintenance schedules affecting their services.| ## Technical Changes for App Compatibility with Shared and Private Channels @@ -100,13 +100,13 @@ When your app runs inside Microsoft Teams, it needs to know what kind of channel | Tabs| Bots| |--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call
For Shared channel, channel.membershipType == “Shared”,
For private channel channel.membershipType =="Private",|To know where your bot was used in Microsoft Teams, you can check the channel.type property from the bot's activity data. check is found at turnContext.activity.channelData.channel.type. -If the value is "shared", it means the bot was used in a Shared channel. -If the value is "private", it means the bot was used in a Private channel. +|When content UX is loaded in a Shared channel, use data received from [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call
For Shared channel, channel.membershipType == “Shared”,
For private channel channel.membershipType =="Private,"|To know where your bot was used in Microsoft Teams, you can check the channel.type property from the bot's activity data. check is found at turnContext.activity.channelData.channel.type. +If the value is "shared," it means the bot was used in a Shared channel. +If the value is "private," it means the bot was used in a Private channel. This check helps your bot understand the context of the message and respond accordingly. You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/bot-concepts?tabs=csharp%2Cdotnet)| -SupportedChannelTypes is an optional property that enables your app in non-standard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). +SupportedChannelTypes is an optional property that enables your app in nonstandard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). ```JSON "supportedChannelTypes": [ @@ -118,7 +118,7 @@ SupportedChannelTypes is an optional property that enables your app in non-stand > [!NOTE] > > * If your app supports the team scope, it functions in standard channels, regardless of what this property defines. -> * Your app might need to account for the unique properties of each of these channel types in order to function properly. +> * To work well in all channel types, your app should handle the special rules and settings of each one. ### Get Context for Shared Channels @@ -274,7 +274,7 @@ After making all the preceding changes, you need to declare your app’s manifes This declaration will make your app visible to users in Shared and Private channels. Else, your app won't be discoverable to users in those channels. This is a mandatory update. -supportsChannelFeatures is an optional property that enables your app in non-standard channels along with standard channels. +supportsChannelFeatures is an optional property that enables your app in nonstandard channels along with standard channels. Put supportsChannelFeatures as “level2” For more information, see . From 1a107093594249d6866074bbf45862a63eccfaab Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 7 Aug 2025 18:17:54 +0530 Subject: [PATCH 07/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 3c2667752e6..3de83d0d112 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -76,7 +76,7 @@ Note- Assess whether your app relies on specific requirements. If it doesn't, en |Requirement|Description|Examples| |------------------------|-----------------------------------------------------|--------------------------------------------------| | Getting members of channel in which app functions|All members of team are also part of standard channels. But in Shared or private channels it's flexible depending on the channel owner's choice. So make sure you use channel specific members APIs rather than using team members APIs, else your app can work unexpectedly for members outside the channel and leak content.| In a project management app, assigning tasks in a Shared channel means targeting channel members—not the full team.| -|Accessing and storing data in Shared & private channels|All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app breaks and can leak data across channels.|A document management app typically stores files on the team’s SharePoint site when working in standard channels. Shared and private channels have their own dedicated SharePoint sites, which are separate from the team’s site. The app saves and retrieves files from the SharePoint site that is linked to the specific channel, rather than using the team’s SharePoint site when operating within Shared or private channels.| +|Accessing and storing data in Shared & private channels|All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app breaks and can leak data across channels.|A document management app typically stores files on the team’s SharePoint site when working in standard channels. Shared and private channels have their own dedicated SharePoint sites, which are separate from the team’s site. The app saves and retrieves files from the SharePoint site that is linked to the specific channel, rather than using the team’s SharePoint site when operating within Shared or private channels.| |Limit content access based on channels|As Shared and private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you don't cross-post or cross-access data across channels and think carefully on your app scenarios.|A summarization app can summarize nonconfidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels.| |Make your app available for Teams users in Shared and private channels|After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app isn't discoverable in these channels anymore. **This is a Must-Do step for all apps.** @@ -100,11 +100,11 @@ When your app runs inside Microsoft Teams, it needs to know what kind of channel | Tabs| Bots| |--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call
For Shared channel, channel.membershipType == “Shared”,
For private channel channel.membershipType =="Private,"|To know where your bot was used in Microsoft Teams, you can check the channel.type property from the bot's activity data. check is found at turnContext.activity.channelData.channel.type. +|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == “Shared,”
For private channel channel.membershipType =="Private,"|To know where your bot was used in Microsoft Teams, you can check the channel.type property from the bot's activity data. check is found at turnContext.activity.channelData.channel.type. If the value is "shared," it means the bot was used in a Shared channel. If the value is "private," it means the bot was used in a Private channel. This check helps your bot understand the context of the message and respond accordingly. -You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/bot-concepts?tabs=csharp%2Cdotnet)| +You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) SupportedChannelTypes is an optional property that enables your app in nonstandard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). @@ -226,22 +226,22 @@ For this, perform the following steps: Step 1: Identify External Users To do this, get tenant ID of the channel in which your app is operating inside. -| Tabs | Bots | +|Tabs|Bots| |--------------------------------------|----------------------------------------| |You can use below mentioned parameters received in [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call to get host team ID and channel ID required for any Graph calls
•JSv1: hostTeamGroupID and channelId
•JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
•Get host team group ID from turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
•Get channel ID from turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. Then, identify external users from direct members list you received for Shared channel. -Get members of a Shared or a Private channel. +Get members of a shared or a private channel. GET /teams/{host-team-group-id}/channels/{channel-id}/members Compare tenantID of each member with the hostTenantID property from above to classify member as out-of-tenant if TenantIds don’t match. ## Authenticate External Users to Access your App Content in SharePoint -Note: This step is only required when requesting the SharePoint token, that is your app stores content in SharePoint service of the tenant in which channel is hosted. +Note: This step is only required when requesting the SharePoint token that is your app stores content in SharePoint service of the tenant in which channel is hosted. - | Tabs | Bots | + |Tabs|Bots| |--------------------------------------|----------------------------------------| |Save host tenant ID of Shared channel where tab is configured. You can get host tenant ID from channel.ownerTenantId for JSv2 or hostTenantId for JSv1 received under getContext call. | For any event payload or action payload received for a bot, use Get hostTenant ID, from turnContext.activity.conversation.tenantId| @@ -264,15 +264,15 @@ Apps must function cross-tenants in installation and usage. The following table ## Access SharePoint Data in Shared and Private Channels -If you're building an app using [SharePoint](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each Private channel has its own SPO site that is only accessible to members of that specific Shared or Private channel. +If you're building an app using [SharePoint](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. -Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or Private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/en-us/graph/api/channel-get-filesfolder?view=graph-rest-1.0&tabs=http). +Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/en-us/graph/api/channel-get-filesfolder?view=graph-rest-1.0&tabs=http). ## Declare your App Works in Shared and Private Channels -After making all the preceding changes, you need to declare your app’s manifest to declare that your app works in Shared and Private channels. +After making all the preceding changes, you need to declare your app’s manifest to declare that your app works in Shared and private channels. -This declaration will make your app visible to users in Shared and Private channels. Else, your app won't be discoverable to users in those channels. This is a mandatory update. +This declaration will make your app visible to users in Shared and private channels. Else, your app won't be discoverable to users in those channels. This is a mandatory update. supportsChannelFeatures is an optional property that enables your app in nonstandard channels along with standard channels. @@ -302,7 +302,7 @@ Note: - Do not assume that a channel’s storage location is the same as its parent team’s SharePoint site. - Instead, always use the Microsoft Graph API endpoint: GET /teams/{team-id}/channels/{channel-id}/filesFolder - - This API call returns the current and correct SharePoint document library location for the specified channel—especially important for Shared and Private channels, which have their own dedicated SharePoint sites. + - This API call returns the current and correct SharePoint document library location for the specified channel—especially important for shared and private channels, which have their own dedicated SharePoint sites. ## Apps in Federated Group Chats with External Users @@ -323,9 +323,9 @@ If you're developing an app for use in federated group chats with external users ## Code sample -| Sample name | Description | Node.js | +|Sample name|Description|Node.js| |-------------|-------------|------| -| Teams Conversation Bot | This sample app displays the names of the members in a federated group chat with external users. |[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-feed-members/nodejs/)| +|Teams Conversation Bot|This sample app displays the names of the members in a federated group chat with external users.|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-feed-members/nodejs/)| ## See also @@ -336,4 +336,3 @@ If you're developing an app for use in federated group chats with external users * [Retention policy for Teams locations](/microsoft-365/compliance/create-retention-policies) * [Use guest access and external access to collaborate with people outside your organization](/microsoftteams/communicate-with-users-from-other-organizations) * [Manage external meetings and chat with people and organizations using Microsoft identities](/microsoftteams/trusted-organizations-external-meetings-chat?tabs=organization-settings) - From 380a5305bc11967e1fc86a8ca45347f6cd86261f Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 7 Aug 2025 23:18:11 +0530 Subject: [PATCH 08/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 3de83d0d112..e002a450738 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -98,13 +98,9 @@ With an enhanced understanding of how users interact in shared and private chann When your app runs inside Microsoft Teams, it needs to know what kind of channel it’s operating in. This check helps the app adjust its functionality accordingly. -| Tabs| Bots| +|Tabs| Bots| |--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == “Shared,”
For private channel channel.membershipType =="Private,"|To know where your bot was used in Microsoft Teams, you can check the channel.type property from the bot's activity data. check is found at turnContext.activity.channelData.channel.type. -If the value is "shared," it means the bot was used in a Shared channel. -If the value is "private," it means the bot was used in a Private channel. -This check helps your bot understand the context of the message and respond accordingly. -You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) +|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == “Shared,”
For private channel channel.membershipType =="Private,"|Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for shared channel activities, to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private ChannelturnContext.activity.channelData.channel.type == “private” You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) SupportedChannelTypes is an optional property that enables your app in nonstandard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). @@ -155,7 +151,7 @@ Pass the teamID and channelID fetched above in GET teams/{team-ID}/channels/{cha If you are using Bots SDK -Pass the channel ID you received above in [getConversationMembers](https://learn.microsoft.com/en-us/microsoftteams/platform/resources/team-chat-member-api-changes) API to get all members of a Shared or private channel. +Pass the channel ID you received above in [getConversationMembers](../../resources/team-chat-member-api-changes.md) API to get all members of a Shared or private channel. Note: Use the following APIs only if your app needs to create specific permissions or experiences based on the member type in a shared channel. Otherwise, you can skip them. @@ -228,7 +224,7 @@ To do this, get tenant ID of the channel in which your app is operating inside. |Tabs|Bots| |--------------------------------------|----------------------------------------| -|You can use below mentioned parameters received in [getContext](https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/access-teams-context?tabs=Json-v2%2Cteamsjs-v2%2Cdefault) call to get host team ID and channel ID required for any Graph calls
•JSv1: hostTeamGroupID and channelId
•JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
•Get host team group ID from turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
•Get channel ID from turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. +|You can use below mentioned parameters received in [getContext](../../tabs/how-to/access-teams-context.md) call to get host team ID and channel ID required for any Graph calls
•JSv1: hostTeamGroupID and channelId
•JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
•Get host team group ID from turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
•Get channel ID from turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. Then, identify external users from direct members list you received for Shared channel. @@ -264,9 +260,9 @@ Apps must function cross-tenants in installation and usage. The following table ## Access SharePoint Data in Shared and Private Channels -If you're building an app using [SharePoint](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. +If you're building an app using [SharePoint](../../integrate-with-teams-introduction.md) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. -Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/en-us/graph/api/channel-get-filesfolder?view=graph-rest-1.0&tabs=http). +Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](../../channel-get-filesfolder.md). ## Declare your App Works in Shared and Private Channels @@ -278,11 +274,13 @@ supportsChannelFeatures is an optional property that enables your app in nonstan Put supportsChannelFeatures as “level2” For more information, see . -JSONCopy +Json +{ + "supportsChannelFeatures": [ + "Tier1" + ] +} -"supportsChannelFeatures": [ - - "Tier1"] Note: If your app supports team scope, it functions in standard channels, regardless of what values are defined in this property. From 28b01e4eb7de2393bc87f915e3bd01fecdbc2694 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Fri, 8 Aug 2025 10:30:40 +0530 Subject: [PATCH 09/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index e002a450738..55ea47c83d2 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -100,7 +100,7 @@ When your app runs inside Microsoft Teams, it needs to know what kind of channel |Tabs| Bots| |--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == “Shared,”
For private channel channel.membershipType =="Private,"|Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for shared channel activities, to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private ChannelturnContext.activity.channelData.channel.type == “private” You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) +|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == “Shared,”
For private channel channel.membershipType =="Private,"|Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for shared channel activities, to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private ChannelturnContext.activity.channelData.channel.type == “private” You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) SupportedChannelTypes is an optional property that enables your app in nonstandard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). @@ -245,7 +245,7 @@ Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to ## Identify Guest Users (B2B Guests) in Private Channels -You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](https://learn.microsoft.com/en-us/graph/api/resources/conversationmember?view=graph-rest-1.0) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/en-us/graph/api/channel-list-members?view=graph-rest-1.0&tabs=http) response. +You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](https://learn.microsoft.com/graph/api/resources/conversationmember?view=graph-rest-1.0) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0&tabs=http) response. For guests, “roles” = “guest” @@ -260,7 +260,7 @@ Apps must function cross-tenants in installation and usage. The following table ## Access SharePoint Data in Shared and Private Channels -If you're building an app using [SharePoint](../../integrate-with-teams-introduction.md) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. +If you're building an app using [SharePoint](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](../../channel-get-filesfolder.md). From b4f28e14e4e1c05f0f530159b60977c0cb56c417 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Fri, 8 Aug 2025 11:33:02 +0530 Subject: [PATCH 10/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 55ea47c83d2..e9efe7a7350 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -12,7 +12,7 @@ ms.date: 04/09/2025 Microsoft Teams apps need to adapt to shared and private channels, which bring new collaboration patterns. This guide helps developers in understanding the changes required so that their apps work smoothly across all channel types. -Microsoft Teams Connect shared and private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: +Microsoft Teams Connects shared and private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: * Members of another team within the same organization. * Members of teams of other organizations. @@ -100,7 +100,7 @@ When your app runs inside Microsoft Teams, it needs to know what kind of channel |Tabs| Bots| |--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == “Shared,”
For private channel channel.membershipType =="Private,"|Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for shared channel activities, to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private ChannelturnContext.activity.channelData.channel.type == “private” You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) +|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == "Shared,"
For private channel channel.membershipType =="Private,"|Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for shared channel activities, to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private ChannelturnContext.activity.channelData.channel.type == “private” You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) SupportedChannelTypes is an optional property that enables your app in nonstandard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). @@ -292,7 +292,7 @@ Note: - This is the only API that returns everyone who can access the channel. Check the official documentation for more details. - Don't assume the type of users (e.g., guest, external, internal) in a channel’s roster. - - a. When using the GET/teams/{team-id}/channels/{channel-id}/allMembers API: + a. When using the GET/teams/{team-id}/channels/{channel-id}/allMembers API: - Check the "roles" property to identify if the user is a guest. - Check the "tenantId" property to determine if the user is:
*From the same tenant (intra-tenant), or
*From a different tenant (cross-tenant). - This API returns both direct and transitive members—ensuring a complete view of channel access. From c9c793a2e79e14d187632fe616047f4237a962f0 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Mon, 11 Aug 2025 10:47:47 +0530 Subject: [PATCH 11/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index e9efe7a7350..8497f6e00d2 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -245,7 +245,7 @@ Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to ## Identify Guest Users (B2B Guests) in Private Channels -You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](https://learn.microsoft.com/graph/api/resources/conversationmember?view=graph-rest-1.0) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/graph/api/channel-list-members?view=graph-rest-1.0&tabs=http) response. +You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](/graph/api/resources/conversationmember?view=graph-rest-1.0) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-list-members?view=graph-rest-1.0&tabs=http) response. For guests, “roles” = “guest” @@ -260,7 +260,7 @@ Apps must function cross-tenants in installation and usage. The following table ## Access SharePoint Data in Shared and Private Channels -If you're building an app using [SharePoint](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. +If you're building an app using [SharePoint](/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](../../channel-get-filesfolder.md). From 9a4345eb7d02911b1ca440626cd35dbd05e5329b Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Mon, 11 Aug 2025 10:56:31 +0530 Subject: [PATCH 12/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 8497f6e00d2..b63b3c8c1dd 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -245,7 +245,7 @@ Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to ## Identify Guest Users (B2B Guests) in Private Channels -You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](/graph/api/resources/conversationmember?view=graph-rest-1.0) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-list-members?view=graph-rest-1.0&tabs=http) response. +You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](/graph/api/resources/conversationmember) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-list-members?view=graph-rest-1.0&tabs=http) response. For guests, “roles” = “guest” From 64b54e65f4fd59e9d1c26de636b741b3f23ce3bf Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Mon, 11 Aug 2025 11:32:47 +0530 Subject: [PATCH 13/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index b63b3c8c1dd..dc5d84b3873 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -245,7 +245,7 @@ Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to ## Identify Guest Users (B2B Guests) in Private Channels -You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](/graph/api/resources/conversationmember) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-list-members?view=graph-rest-1.0&tabs=http) response. +You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](/graph/api/resources/conversationmember) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-list-members) response. For guests, “roles” = “guest” @@ -262,7 +262,7 @@ Apps must function cross-tenants in installation and usage. The following table If you're building an app using [SharePoint](/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. -Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](../../channel-get-filesfolder.md). +Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-get-filesfolder). ## Declare your App Works in Shared and Private Channels From e90a29661a1048a9ddfeb9af67c13882d7806d4c Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Mon, 11 Aug 2025 13:11:48 +0530 Subject: [PATCH 14/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index dc5d84b3873..61b53241b70 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -1,5 +1,5 @@ --- -title: Teams Connects Shared Channels +title: Teams Connect Shared Channels author: surbhigupta description: Learn about Teams Connect shared channels to securely collaborate with internal and external users in a shared space without switching tenants. ms.author: surbhigupta @@ -12,7 +12,7 @@ ms.date: 04/09/2025 Microsoft Teams apps need to adapt to shared and private channels, which bring new collaboration patterns. This guide helps developers in understanding the changes required so that their apps work smoothly across all channel types. -Microsoft Teams Connects shared and private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: +Microsoft Teams Connect shared and private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: * Members of another team within the same organization. * Members of teams of other organizations. @@ -129,7 +129,7 @@ For more information to enable your tab, see: To ensure your app functions correctly in shared and private channels, you must use channel-specific APIs to gather accurate member information. Usage of channel-specific APIS is important because: -Team membership APIs aren't equal to shared or private Channel membershipShared and private channels have their own membership models, which aren't the same as the parent team’s membership. +Team membership APIs aren't equal to shared or private Channel membership Shared and private channels have their own membership models, which aren't the same as the parent team’s membership. Each channel has its own SharePoint site with its own permissions. Apps must follow these rules to prevent data leaks or access problems. From f00102de794c5a71245b159be99f9dd5b5c03e0b Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 13:12:34 +0530 Subject: [PATCH 15/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 257 +++++++++++++----- 1 file changed, 190 insertions(+), 67 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 61b53241b70..1b46ded4ad7 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -8,14 +8,9 @@ ms.topic: conceptual ms.date: 04/09/2025 --- -# Adapting Microsoft Teams App for Shared and Private Channels +# Microsoft Teams connects for shared and private Channels -Microsoft Teams apps need to adapt to shared and private channels, which bring new collaboration patterns. This guide helps developers in understanding the changes required so that their apps work smoothly across all channel types. - -Microsoft Teams Connect shared and private channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: - -* Members of another team within the same organization. -* Members of teams of other organizations. +Microsoft Teams apps must support shared and private channels, which introduce new collaboration scenarios across teams and organizations. Shared channels in Microsoft Teams Connect can be created and shared with members of other teams within the same organization or with teams from external organizations. > [!NOTE] > @@ -24,19 +19,19 @@ Microsoft Teams Connect shared and private channels allow members of a channel t Teams Connects Shared channels facilitate secure collaboration seamlessly. Allow external users outside of your organization to collaborate with internal users in Teams without changing their user context. Enhance user experience unlike using guest accounts, for example, the members must sign out of Teams and sign in again using a guest account. Teams applications extend the powerful collaboration space. -:::image type="content" source="~/assets/images/app-fundamentals/shared-channels-teams.png" alt-text="Diagram shows Team B from organization A and Team C from organization B collaborating in a Shared channel as Team A."::: + ![Diagram shows Team B from organization A and Team C from organization B collaborating in a Shared channel as Team A.](../../assets/images/app-fundamentals/shared-channels-teams.png) -## Understanding Shared and Private Channels in Microsoft Teams +## Understanding shared and private channels in Microsoft Teams -### Shared Channel +### Shared channel Shared channels in Microsoft Teams let you collaborate with people who aren’t part of your team. Only users added as owners or members can access the shared channel. You can’t add regular guest accounts (via Microsoft Entra) to shared channels. However, you can still invite people from outside your organization through Microsoft Entra B2B direct connect, which enables secure external collaboration with no need to add them as guests. -### Private Channel +### Private channel Private channels in Microsoft Teams are special spaces for focused collaboration within a team. The system allows only people added as owners or members of the private channel to access it. You can include guests (users with Microsoft Entra guest accounts) in a private channel, but only if they're already part of the host team. -### Feature Differences between Shared and Private Channels +### Feature differences between shared and private channels | Features | Standard Channel | Shared Channel | Private Channel | |---------------------|------------------------|-----------------------------------------------------|--------------------------------------------------| @@ -48,53 +43,31 @@ Private channels in Microsoft Teams are special spaces for focused collaboration |External participants (Direct Connect) can participate in channel |No | Yes | No | |Each channel has a dedicated SharePoint site |No | Yes | Yes | -## Reimagining App's Functionality for Shared and Private Channels - -As an app developer, it’s important to rethink how your app works within shared and private channels in Microsoft Teams. Since these channels provide new way for users to collaborate, your app must adapt to support their unique features. - -## Why you should Adapt Apps to Shared and Private Channels - -As a developer, it's important to rethink how your app works in Microsoft Teams' shared and private channels. These channels offer new ways for users to collaborate—across teams and even across organizations—so your app needs to be flexible and aware of these environments. - -Why Adapting Your App Matters: - -1. Beyond Standard Channels: Without updates, your app doesn't appear or function in shared or private channels. Some changes are mandatory for compatibility. -2. Wider Collaboration: Shared channels allow external users to join via Microsoft Entra B2B Direct Connect. Your app can support broader collaboration if properly configured. -3. Tailored Functionalities: You can highlight or build features that support cross-team workflows, like role-based permissions or scoped notifications. -4. Future-Proofing: These channels are the future of collaboration in Teams. Updating your app now ensures it remains relevant and competitive. - -## A Strategic Approach to Change - -Microsoft Teams is developing with shared and private channels, and that means apps need to develop too. To keep your app working smoothly across all channel types—standard, shared, and private—you need a logical strategy. - -### Mandatory Changes +### Teams channel models – capabilities comparison -If you don’t update the app to support shared and private channels in Microsoft Teams, it might not work properly in those spaces.   +| **Category** | **Capability** | **Standard channel** | **Private channel** | **Shared channel** | +|--------------|----------------------------------------------------------------------------------|----------------------|---------------------|---------------------| +| **Membership** | Can add people to the channel without adding to the host team | No | No | Yes | +| | Channel membership can be limited to a subset of the host team | No | Yes | Yes | +| | Channel can be shared with other teams to inherit members from the team | No | No | Yes | +| | Channel can be shared directly with its parent team to inherit members | N/A | No | Yes | +| | Guests (B2B Guests) can participate in the channel | Yes | Yes | No | +| | External participants (B2B Direct Connect) can participate in the channel | No | No | Yes | +| | Channel is hosted under a host team | Yes | Yes | Yes | +| **Storage** | Each channel has a dedicated SharePoint site | No (inherits team site) | Yes | Yes | +| **App Model** | App must be installed in the host team | Yes | Yes | Yes | +| | App installed to host team automatically available in channel | Yes | No | No | +| | App must be added to each channel | No | Yes | Yes | -Note- Assess whether your app relies on specific requirements. If it doesn't, enable support for shared and private channels in the app manifest. You can apply functional changes later. +## A strategic approach to change -|Requirement|Description|Examples| -|------------------------|-----------------------------------------------------|--------------------------------------------------| -| Getting members of channel in which app functions|All members of team are also part of standard channels. But in Shared or private channels it's flexible depending on the channel owner's choice. So make sure you use channel specific members APIs rather than using team members APIs, else your app can work unexpectedly for members outside the channel and leak content.| In a project management app, assigning tasks in a Shared channel means targeting channel members—not the full team.| -|Accessing and storing data in Shared & private channels|All standard channels share the same SharePoint site. But each Shared and private channel has its own SharePoint site for storing files or app content. So, make sure you use APIs available to access channel’s sharepoint site vs Team’s sharepoint site, else your app breaks and can leak data across channels.|A document management app typically stores files on the team’s SharePoint site when working in standard channels. Shared and private channels have their own dedicated SharePoint sites, which are separate from the team’s site. The app saves and retrieves files from the SharePoint site that is linked to the specific channel, rather than using the team’s SharePoint site when operating within Shared or private channels.| -|Limit content access based on channels|As Shared and private channels can have sensitive or restricted content not to be Shared outside channel, so ensure you don't cross-post or cross-access data across channels and think carefully on your app scenarios.|A summarization app can summarize nonconfidential chats/messages from all channels inside a team and post in a standard channel or to a group of team members. This app makes changes to not access private or Shared channel messages for this scenario and only get messages from standard channels.| -|Make your app available for Teams users in Shared and private channels|After you make necessary changes to your app, you must mark in App manifest that your app now is also supported in Shared and private channels. Else, your app isn't discoverable in these channels anymore. **This is a Must-Do step for all apps.** +Microsoft Teams is developing with shared and private channels, and that means apps need to develop too. To keep your app working smoothly across all channel types: standard, shared, and private you need a logical strategy. -### Optional Enhancements to Improve User Experience - -These updates aren't required, but they can make your app work better in shared and private channels: - -|Requirement|Description|Examples| -|------------------------|-----------------------------------------------------|--------------------------------------------------| -|Privacy & Access Controls for app features| Implement conditional privacy & access controls within your app modules to cater to mix of internal and external users, protecting sensitive information as warranted for your app use-case.|In a poll or survey app, internal members create polls and view results. External members in Shared channels and guests in Private channels only respond to polls. They can't create polls or see past results.| -|Collaboration| Make it easier for people to work together in Shared channels. Add task lists that everyone can see. If they are from the host team, they can add and change tasks. If they are from another team, they may have fewer rights. Guests inside the company and people from outside can see tasks, but can't change them.| Whiteboarding apps introduce a feature that lets external users in shared channels or guests in private channels add to the canvas. These users don't erase or edit contributions made by internal members.| -|Notification / Nudges| Refine your app's notification systems to avoid overloading users with irrelevant updates, possibly segmenting alerts by user group or channel type.| Helpdesk app used in a Shared channel, internal IT staff might receive immediate alerts for high-priority tickets or infrastructure issues, whereas external vendors might only receive notifications for tickets assigned to them or for maintenance schedules affecting their services.| - -## Technical Changes for App Compatibility with Shared and Private Channels +## Technical changes for app compatibility with shared and private channels With an enhanced understanding of how users interact in shared and private channels, you can now focus on the technical steps to update your app. Microsoft Teams offers APIs to work with these channels. -### Identify Channels +### Identify channels When your app runs inside Microsoft Teams, it needs to know what kind of channel it’s operating in. This check helps the app adjust its functionality accordingly. @@ -116,7 +89,7 @@ SupportedChannelTypes is an optional property that enables your app in nonstanda > * If your app supports the team scope, it functions in standard channels, regardless of what this property defines. > * To work well in all channel types, your app should handle the special rules and settings of each one. -### Get Context for Shared Channels +### Get context for shared channels When loading the content UX in a shared or private channel, use the data received from `getContext` call for shared or private channel changes. `getContext` call publishes two new properties, `hostTeamGroupID` and `hostTenantID`, which are used to retrieve channel membership using Microsoft Graph APIs. `hostTeam` is the team that creates the shared channel. @@ -125,7 +98,7 @@ For more information to enable your tab, see: * [Get context for your tab for private channels](../../tabs/how-to/access-teams-context.md#retrieve-context-in-private-channels) * [Get context in shared channels](../../tabs/how-to/access-teams-context.md#get-context-in-shared-channels) -### Managing Channel Members and Permissions in Microsoft Teams Apps +### Managing channel members and permissions in Microsoft Teams apps To ensure your app functions correctly in shared and private channels, you must use channel-specific APIs to gather accurate member information. Usage of channel-specific APIS is important because: @@ -141,9 +114,13 @@ Each channel has its own SharePoint site with its own permissions. Apps must fol Note: Don't store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these dynamically when needed. +> [!NOTE] +> +> * Don't store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these dynamically when needed. + Then, call APIs listed below based on your app requirements: -### Get All Members of a Private or Shared Channel +### Get all members of a private or shared channel If you're using Graph @@ -155,14 +132,14 @@ Pass the channel ID you received above in [getConversationMembers](../../resourc Note: Use the following APIs only if your app needs to create specific permissions or experiences based on the member type in a shared channel. Otherwise, you can skip them. -## Apps and permissions in Shared Channels +## Apps and permissions in shared channels You can collaborate with external members outside of your organization using Shared channels. App permissions in Shared channels follow the host team's app roster and host tenant's app policy. > [!NOTE] > The [activity feed notification API](/graph/teams-send-activityfeednotifications) doesn't support cross-tenant notifications for apps in a Shared channel. -### Get Shared Channel Membership +### Get shared channel membership You can get direct shared channel membership by using the `hostTeamGroupID` from `getContext` and following these steps: @@ -185,21 +162,28 @@ Note: This returns both internal and external users added to the Shared channel. ```http GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/members ``` -## Retrieve Members of a Shared Channel in Microsoft Teams + +## Retrieve members of a shared channel in Microsoft Teams In Microsoft Teams, when you share a channel with another team, the channel includes that team’s members. The system doesn’t add users directly to the shared channel; instead, it grants access through their team’s connection to the channel. Get each shared team with GET sharedWithTeams API. + +```http GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams + ``` Use GET members of each shared team (Team X) with GET sharedWithTeams API. + +```http GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/members + ``` With this information, structure your app to interpret member details and apply appropriate permissions as per your app use-case. For instance, Once your app identifies the channel type (standard, private, or shared) and retrieves member details using Microsoft Graph or Bot APIs, you can ensure that features like editing and task creation are selectively enabled based on user roles (Owners vs members vs External participants) determined through the preceding API responses. -## Classify Members in the Shared channel as In-tenant or Out-tenant +## Classify members in the shared channel as in-tenant or out-tenant You can classify members as in-tenant or out-tenant by comparing `tenantID` of the member or team with `hostTeamTenantID` as follows: @@ -213,7 +197,85 @@ You can classify members as in-tenant or out-tenant by comparing `tenantID` of t -## Handling External Users (B2B Direct connect) in Shared Channels +## Get app notifications for direct and indirect membership changes + +### In graph + +Apps installed in shared channels receive notifications when users are added to or removed from a team that shares the channel. To receive these notifications, you must: + +1. [Install the app](../deploy-and-publish/apps-upload.md) in a host team and enable it for the shared channel. +1. Create a valid Microsoft Graph change notification subscription to monitor associated team membership changes and shared or unshared events using supported APIs. + +To receive both direct and indirect member update notifications, you must include both the query string parameters when creating a subscription. If the query strings aren't provided, the subscription only delivers notifications for direct member updates. To learn more, see [Channel membership access](/graph/teams-changenotifications-channelmembership). + +```http +`/teams/{team-id}/channels/getAllMembers?notifyOnIndirectMembershipUpdate=true&suppressNotificationWhenSharedUnsharedWithTeam=true` +``` + +This subscription enables apps to monitor membership changes in shared channels and its associated teams. For more information on how to create a Microsoft Graph change notification subscription, see [Create a subscription.](/graph/teams-changenotifications-teammembership) + +### In Bot SDK + +When a new member is added to a shared channel, the OnMembersAddedAsync method is called. This method provides the context and details of the user who was added, allowing the bot to respond accordingly. + +Member added + +```http +public async Task OnMembersAddedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) +``` + +Similarly, when a member is removed from the channel, the OnMembersRemovedAsync method is called. This allows the bot to handle clean-up tasks or adjust access controls as needed. + +Member removed + +```http +public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) +``` + +These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. + +## Validate user access for membership updates + +### Graph + +When an app receives a notification for an indirect membership update, it’s important to verify whether the user still has access to the shared channel as the same user might have both direct and indirect membership. For example, if a user is removed from a team that shares a channel, the app should confirm whether the user's access is truly lost. Use the **doesUserHaveAccess** API to determine whether the user still has access to the shared channel. + +```http +GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',tenantId='@TenantID',userPrincipalName='@UserPrincipalName') +``` + +See [doesUserHaveAccess API](/graph/api/channel-doesuserhaveaccess?view=graph-rest-beta&tabs=http) to learn more about user accesses and relevant permissions. + +## Handle bulk membership changes + +If there are bulk membership changes, Teams curbs individual membership update notifications when a channel is shared or unshared with a team. This feature reduces notification volume and improves performance. + +### Use sharedWithTeams subscription for bulk membership changes + +To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new SharedWithTeams subscription resource: + +```http +`/teams/{team-id}/channels/{channel-id}/sharedWithTeams` +``` + +The sharedWithTeams subscription sends a single notification when a channel is shared or unshared with a team. It avoids thousands of per-user notifications and improves performance for apps that monitor membership changes. Ensure that you update the shared channel member list using the /allMembers API after receiving a 'shared with' or 'unshared from' team notification. + +> [!NOTE] +> To support membership updates in shared channels, apps using resource-specific consent (RSC) must request extended permissions. +> These permissions let the app: +> +> * Access membership data (both direct and indirect members). +> * Receive and respond to membership change notifications. + +### Bot Framework + +Whenevere we share the shared channel with another team we will get a notification on this Bot SDK endpoint API “OnConversationUpdateActivityAsync. + +```http +GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',tenantId='@TenantID',userPrincipalName='@UserPrincipalName') +``` + +## Handling external users (B2B Direct connect) in shared channels Each Teams channel links to its own SharePoint site with separate permissions. When building apps, make sure to check these limits so you don’t run into access issues or cause data leaks. @@ -233,7 +295,7 @@ GET /teams/{host-team-group-id}/channels/{channel-id}/members Compare tenantID of each member with the hostTenantID property from above to classify member as out-of-tenant if TenantIds don’t match. -## Authenticate External Users to Access your App Content in SharePoint +## Authenticate external users to access your app content in sharepoint Note: This step is only required when requesting the SharePoint token that is your app stores content in SharePoint service of the tenant in which channel is hosted. @@ -243,13 +305,13 @@ Note: This step is only required when requesting the SharePoint token that is yo Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to allow cross-tenant users to access content hosted inside Sharepoint site attached to the Shared channel. -## Identify Guest Users (B2B Guests) in Private Channels +## Identify guest users (B2B guests) in private channels You can identify if a member of private channel is guest user, invited to your tenant from external organization, using 'roles' property received for each [conversationMember](/graph/api/resources/conversationmember) object in [List members of a channel - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-list-members) response. For guests, “roles” = “guest” -## Microsoft Entra Native Identity +## Microsoft entra native identity Apps must function cross-tenants in installation and usage. The following table lists the channel types and their corresponding group IDs: @@ -258,13 +320,13 @@ Apps must function cross-tenants in installation and usage. The following table |Regular | Team Microsoft Entra group ID | Team Microsoft Entra group ID | |Shared | Empty | Host Team Microsoft Entra group ID | -## Access SharePoint Data in Shared and Private Channels +## Access sharepoint data in shared and private channels If you're building an app using [SharePoint](/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-get-filesfolder). -## Declare your App Works in Shared and Private Channels +## Declare your app works in shared and private channels After making all the preceding changes, you need to declare your app’s manifest to declare that your app works in Shared and private channels. @@ -281,7 +343,6 @@ Json ] } - Note: If your app supports team scope, it functions in standard channels, regardless of what values are defined in this property. Note: @@ -302,7 +363,7 @@ Note: GET /teams/{team-id}/channels/{channel-id}/filesFolder - This API call returns the current and correct SharePoint document library location for the specified channel—especially important for shared and private channels, which have their own dedicated SharePoint sites. -## Apps in Federated Group Chats with External Users +## Apps in Federated group chats with external users > [!NOTE] > @@ -325,6 +386,68 @@ If you're developing an app for use in federated group chats with external users |-------------|-------------|------| |Teams Conversation Bot|This sample app displays the names of the members in a federated group chat with external users.|[View](https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-feed-members/nodejs/)| +## Frequently asked questions + +
+Why isn’t the app visible when trying to add it to a channel? +If an app isn’t visible when trying to add it to a channel, there are a few likely causes. The app manifest may be missing required support, such as "supportsChannelFeatures": "tier1", which enables compatibility with channel features. Additionally, the installer may not have sufficient permissions, only team members or owners can add apps, and local policies must allow app installation. If the channel is an incoming shared channel (shared into a team), apps cannot be added directly from that location. In such cases, switch to the host team to add the app to the channel. You can detect whether a channel is shared-in by checking the channel metadata for the host team ID. + +
+  +
+
+Why am I getting a 403 error stating “app not enabled in this channel” when calling channel APIs? + +A 403 error stating “app not enabled in this channel” typically occurs when the app is installed at the team level but hasn’t been added to the specific channel. To resolve this, first confirm that the app has been explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ChannelMember.Read.Group for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel. + +
+  +
+
+Why does the channel roster appear incomplete, showing only owners or missing users? + +If the channel roster appears incomplete showing only owners or missing users, it may be due to using the team members API instead of the correct channel-specific API. To resolve this, use the /channels/{id}/allMembers API to retrieve the full channel roster. If the response still shows only owners, the app likely hasn’t been added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster. + +
+  +
+
+Why does file access fail for some users even though they are part of the channel? + +This can happen if the app is using the team’s main SharePoint site instead of the specific site linked to the channel. It may also be due to the type of link being blocked by your organization’s sharing policies, or because external users don’t have the right permissions. To fix this, make sure your app uses the channel’s filesFolder property to get the correct driveId and itemId for file operations. When sharing files, use “people with existing access” links or the /invite API to give access to specific users or groups. + +
+  +
+
+Why are external users experiencing authentication issues in tabs or task modules? + +Authentication issues in tabs or task modules for external users often occur when the app requests a token for the host tenant instead of the user’s home tenant. To resolve this, check whether the user is external by comparing context.user.tenant.id with the host or owner tenant ID. If they are different, the user is external, and your app should request the token for the user’s home tenant. You can do this by passing the correct tenant ID (tid) when calling getAuthToken. + +
+  +
+
+How do I know my app was added to a channel? + +This issue may occur if the app is expecting a centralized list of installed apps at the channel level or relying on team-level installation behavior. Currently, there is no channel-level installedApps list available. Bots should instead listen for the channelMemberAdded event within the channel to detect when they have been added. If this event is not received, and a 403 error is returned during operations, the app should handle the error and prompt the user to add the bot to the channel. + +
+  +
+
+Why is my app failing to create message change notifications in shared or private channels? + +Message change notifications may fail in shared or private channels because subscriptions to /channels/{id}/messages are blocked when using resource-specific consent (RSC) in these types of channels. If your app encounters a 403 error when attempting to create a subscription, this behavior is expected. To fis this, use on-demand message reads after the app has been successfully added to the channel. + +
+  +
+
+Why do file links still fail for external users even after the app has been added to the channel? + +This can happen if the type of link being used is not allowed by the tenant’s sharing policy, or if the user hasn’t been granted access to the specific item, despite being a member of the channel. Another common cause is that the app may have generated links pointing to the team drive instead of the channel’s dedicated drive. To resolve this, reissue the links using the “people with existing access” option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. + ## See also * [Build tabs for Teams](../../tabs/what-are-tabs.md) From 9fabc910d7302ddac213476e061265ba92ef9acc Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 13:23:10 +0530 Subject: [PATCH 16/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 1b46ded4ad7..baa3d0dc951 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -8,7 +8,7 @@ ms.topic: conceptual ms.date: 04/09/2025 --- -# Microsoft Teams connects for shared and private Channels +# Microsoft Teams connects for shared and private channels Microsoft Teams apps must support shared and private channels, which introduce new collaboration scenarios across teams and organizations. Shared channels in Microsoft Teams Connect can be created and shared with members of other teams within the same organization or with teams from external organizations. From 316d589850c176e9d25a4a06838e58325fb99047 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 14:36:45 +0530 Subject: [PATCH 17/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 64 +++++++++---------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index baa3d0dc951..dc6c27d72fe 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -1,5 +1,5 @@ --- -title: Teams Connect Shared Channels +title: Teams Connects Shared Channels author: surbhigupta description: Learn about Teams Connect shared channels to securely collaborate with internal and external users in a shared space without switching tenants. ms.author: surbhigupta @@ -43,7 +43,7 @@ Private channels in Microsoft Teams are special spaces for focused collaboration |External participants (Direct Connect) can participate in channel |No | Yes | No | |Each channel has a dedicated SharePoint site |No | Yes | Yes | -### Teams channel models – capabilities comparison +### Teams channels – capabilities comparison | **Category** | **Capability** | **Standard channel** | **Private channel** | **Shared channel** | |--------------|----------------------------------------------------------------------------------|----------------------|---------------------|---------------------| @@ -73,7 +73,7 @@ When your app runs inside Microsoft Teams, it needs to know what kind of channel |Tabs| Bots| |--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == "Shared,"
For private channel channel.membershipType =="Private,"|Use turnContext.activity.channelData.channel.type type property from any of the bot activity handlers event generated for shared channel activities, to get context of where bot was invoked or bot activity originated from.
For Shared Channel turnContext.activity.channelData.channel.type == “shared”
For Private ChannelturnContext.activity.channelData.channel.type == “private” You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) +|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == Shared,
For private channel channel.membershipType == Private,|To determine where a bot activity originated, especially in shared channel scenarios, use the channel.type property found in turnContext.activity.channelData. This property is available in any bot activity handler and helps identify the channel type, allowing your app to respond appropriately based on the context.
For Shared Channel turnContext.activity.channelData.channel.type == shared
For Private ChannelturnContext.activity.channelData.channel.type == private You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) SupportedChannelTypes is an optional property that enables your app in nonstandard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). @@ -106,29 +106,27 @@ Team membership APIs aren't equal to shared or private Channel membership Shared Each channel has its own SharePoint site with its own permissions. Apps must follow these rules to prevent data leaks or access problems. -### Get Host Team Group ID & Channel ID +### Get host team group ID & channel ID | Tabs | Bots | |--------------------------------------|----------------------------------------| |You can use below mentioned parameters received in getContext call to get host team ID and channel ID required for any Graph calls
1. JSv1: hostTeamGroupID and channelId
2. JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
Get host team group ID from: turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
Get channel ID from: turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. -Note: Don't store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these dynamically when needed. - > [!NOTE] > -> * Don't store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these dynamically when needed. +> * Don't store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these parameters dynamically when needed. -Then, call APIs listed below based on your app requirements: +Then, call following APIs listed based on your app requirements: ### Get all members of a private or shared channel If you're using Graph -Pass the teamID and channelID fetched above in GET teams/{team-ID}/channels/{channel-ID}/allMembers to get all members of a Shared or a private channel. +Pass the teamID and channelID fetched in the preceding section in GET teams/{team-ID}/channels/{channel-ID}/allMembers to get all members of a Shared or a private channel. If you are using Bots SDK -Pass the channel ID you received above in [getConversationMembers](../../resources/team-chat-member-api-changes.md) API to get all members of a Shared or private channel. +Pass the channel ID you received in [getConversationMembers](../../resources/team-chat-member-api-changes.md) API to get all members of a Shared or private channel. Note: Use the following APIs only if your app needs to create specific permissions or experiences based on the member type in a shared channel. Otherwise, you can skip them. @@ -181,8 +179,6 @@ GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/me With this information, structure your app to interpret member details and apply appropriate permissions as per your app use-case. -For instance, Once your app identifies the channel type (standard, private, or shared) and retrieves member details using Microsoft Graph or Bot APIs, you can ensure that features like editing and task creation are selectively enabled based on user roles (Owners vs members vs External participants) determined through the preceding API responses. - ## Classify members in the shared channel as in-tenant or out-tenant You can classify members as in-tenant or out-tenant by comparing `tenantID` of the member or team with `hostTeamTenantID` as follows: @@ -224,7 +220,7 @@ Member added public async Task OnMembersAddedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) ``` -Similarly, when a member is removed from the channel, the OnMembersRemovedAsync method is called. This allows the bot to handle clean-up tasks or adjust access controls as needed. +Similarly, when a member is removed from the channel, the OnMembersRemovedAsync method is called. This method allows the bot to handle clean-up tasks or adjust access controls as needed. Member removed @@ -258,7 +254,7 @@ To reduce notification overload during membership updates, such as when a shared `/teams/{team-id}/channels/{channel-id}/sharedWithTeams` ``` -The sharedWithTeams subscription sends a single notification when a channel is shared or unshared with a team. It avoids thousands of per-user notifications and improves performance for apps that monitor membership changes. Ensure that you update the shared channel member list using the /allMembers API after receiving a 'shared with' or 'unshared from' team notification. +The sharedWithTeams subscription sends a single notification when a channel is shared or unshared with a team. It avoids thousands of per-user notifications and improves performance for apps that monitor membership changes. Ensure that you update the shared channel member list using the /allMembers API after receiving a "shared with" or "unshared from" team notification. > [!NOTE] > To support membership updates in shared channels, apps using resource-specific consent (RSC) must request extended permissions. @@ -269,7 +265,7 @@ The sharedWithTeams subscription sends a single notification when a channel is s ### Bot Framework -Whenevere we share the shared channel with another team we will get a notification on this Bot SDK endpoint API “OnConversationUpdateActivityAsync. +Whenever a shared channel is shared with another team, that team receives a notification through the Bot SDK endpoint API Bot SDK endpoint API "OnConversationUpdateActivityAsync." ```http GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',tenantId='@TenantID',userPrincipalName='@UserPrincipalName') @@ -277,12 +273,12 @@ GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',t ## Handling external users (B2B Direct connect) in shared channels -Each Teams channel links to its own SharePoint site with separate permissions. When building apps, make sure to check these limits so you don’t run into access issues or cause data leaks. +Each Microsoft Teams channel is linked to its own SharePoint site, which has separate permission. When building apps, make sure to check these limits so you don’t run into access issues or cause data leaks. -For this, perform the following steps: +Perform the following steps, for this identification process: Step 1: Identify External Users -To do this, get tenant ID of the channel in which your app is operating inside. +Get tenant ID of the channel in which your app is operating inside. |Tabs|Bots| |--------------------------------------|----------------------------------------| @@ -293,11 +289,11 @@ Then, identify external users from direct members list you received for Shared c Get members of a shared or a private channel. GET /teams/{host-team-group-id}/channels/{channel-id}/members -Compare tenantID of each member with the hostTenantID property from above to classify member as out-of-tenant if TenantIds don’t match. +To classify member as out-of-tenant if TenantIds don’t match, compare tenantID of each member with the hostTenantID property. ## Authenticate external users to access your app content in sharepoint -Note: This step is only required when requesting the SharePoint token that is your app stores content in SharePoint service of the tenant in which channel is hosted. +You need to complete this step when your app stores content in the SharePoint site of the tenant that hosts the channel and requests a SharePoint token. |Tabs|Bots| |--------------------------------------|----------------------------------------| @@ -311,9 +307,9 @@ You can identify if a member of private channel is guest user, invited to your t For guests, “roles” = “guest” -## Microsoft entra native identity +## Microsoft Entra native identity -Apps must function cross-tenants in installation and usage. The following table lists the channel types and their corresponding group IDs: +Apps must function cross-tenants in installation and usage. The following table lists the channel types and their corresponding group ids: |Channel type| groupId | hostTeamGroupId | |----------|---------|-----------------| @@ -330,9 +326,9 @@ Use the Graph API to access the document library of the SharePoint Online (SPO) After making all the preceding changes, you need to declare your app’s manifest to declare that your app works in Shared and private channels. -This declaration will make your app visible to users in Shared and private channels. Else, your app won't be discoverable to users in those channels. This is a mandatory update. +This declaration makes your app visible to users in Shared and private channels. Else, your app is not discoverable to users in those channels. This configuration update is a mandatory requirement. -supportsChannelFeatures is an optional property that enables your app in nonstandard channels along with standard channels. +supportsChannelFeatures are an optional property that enables your app in nonstandard channels along with standard channels. Put supportsChannelFeatures as “level2” For more information, see . @@ -350,9 +346,9 @@ Note: - When you declare support for "Tier1" in your app manifest. - You're assuming the channel's roster matches the parent team. - To get the full list of users with access—including direct and transitive members—use the API: GET/teams/{team-id}/channels/{channel-id}/allMembers - - This is the only API that returns everyone who can access the channel. Check the official documentation for more details. + - This API is the only API that returns everyone who can access the channel. Check the official documentation for more details. -- Don't assume the type of users (e.g., guest, external, internal) in a channel’s roster. +- Don't assume the type of users (for example, guest, external, internal) in a channel’s roster. a. When using the GET/teams/{team-id}/channels/{channel-id}/allMembers API: - Check the "roles" property to identify if the user is a guest. - Check the "tenantId" property to determine if the user is:
*From the same tenant (intra-tenant), or
*From a different tenant (cross-tenant). @@ -390,15 +386,15 @@ If you're developing an app for use in federated group chats with external users
Why isn’t the app visible when trying to add it to a channel? -If an app isn’t visible when trying to add it to a channel, there are a few likely causes. The app manifest may be missing required support, such as "supportsChannelFeatures": "tier1", which enables compatibility with channel features. Additionally, the installer may not have sufficient permissions, only team members or owners can add apps, and local policies must allow app installation. If the channel is an incoming shared channel (shared into a team), apps cannot be added directly from that location. In such cases, switch to the host team to add the app to the channel. You can detect whether a channel is shared-in by checking the channel metadata for the host team ID. +If an app isn’t visible when trying to add it to a channel, there are a few likely causes. The app manifest might be missing required support, such as "supportsChannelFeatures": tier1, which enables compatibility with channel features. Additionally, the installer might not have sufficient permissions, only team members or owners can add apps, and local policies must allow app installation. If the channel is an incoming shared channel (shared into a team), apps cannot be added directly from that location. In such cases, switch to the host team to add the app to the channel. You can detect whether a channel is shared-in by checking the channel metadata for the host team ID.
 
-Why am I getting a 403 error stating “app not enabled in this channel” when calling channel APIs? +Why am I getting a 403 error stating "app not enabled in this channel" when calling channel APIs? -A 403 error stating “app not enabled in this channel” typically occurs when the app is installed at the team level but hasn’t been added to the specific channel. To resolve this, first confirm that the app has been explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ChannelMember.Read.Group for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel. +A 403 error stating "app not enabled in this channel" typically occurs when the app is installed at the team level but is not added to the specific channel. To fix this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ChannelMember.Read.Group for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel.
  @@ -406,7 +402,7 @@ A 403 error stating “app not enabled in this channel” typically occurs when
Why does the channel roster appear incomplete, showing only owners or missing users? -If the channel roster appears incomplete showing only owners or missing users, it may be due to using the team members API instead of the correct channel-specific API. To resolve this, use the /channels/{id}/allMembers API to retrieve the full channel roster. If the response still shows only owners, the app likely hasn’t been added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster. +If the channel roster appears incomplete showing only owners or missing users, it might be due to using the team members API instead of the correct channel-specific API. To resolve this, use the /channels/{id}/allMembers API to retrieve the full channel roster. If the response still shows only owners, the app likely hasn’t been added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster.
  @@ -414,7 +410,7 @@ If the channel roster appears incomplete showing only owners or missing users, i
Why does file access fail for some users even though they are part of the channel? -This can happen if the app is using the team’s main SharePoint site instead of the specific site linked to the channel. It may also be due to the type of link being blocked by your organization’s sharing policies, or because external users don’t have the right permissions. To fix this, make sure your app uses the channel’s filesFolder property to get the correct driveId and itemId for file operations. When sharing files, use “people with existing access” links or the /invite API to give access to specific users or groups. +This can happen if the app is using the team’s main SharePoint site instead of the specific site linked to the channel. It might also be due to the type of link being blocked by your organization’s sharing policies, or because external users don’t have the right permissions. To fix this, make sure your app uses the channel’s filesFolder property to get the correct driveId and itemId for file operations. When sharing files, use "people with existing access" links or the /invite API to give access to specific users or groups.
  @@ -430,7 +426,7 @@ Authentication issues in tabs or task modules for external users often occur whe
How do I know my app was added to a channel? -This issue may occur if the app is expecting a centralized list of installed apps at the channel level or relying on team-level installation behavior. Currently, there is no channel-level installedApps list available. Bots should instead listen for the channelMemberAdded event within the channel to detect when they have been added. If this event is not received, and a 403 error is returned during operations, the app should handle the error and prompt the user to add the bot to the channel. +This issue might occur if the app is expecting a centralized list of installed apps at the channel level or relying on team-level installation behavior. Currently, there is no channel-level installedApps list available. Bots should instead listen for the channelMemberAdded event within the channel to detect when they have been added. If this event is not received, and a 403 error is returned during operations, the app should handle the error and prompt the user to add the bot to the channel.
  @@ -438,7 +434,7 @@ This issue may occur if the app is expecting a centralized list of installed app
Why is my app failing to create message change notifications in shared or private channels? -Message change notifications may fail in shared or private channels because subscriptions to /channels/{id}/messages are blocked when using resource-specific consent (RSC) in these types of channels. If your app encounters a 403 error when attempting to create a subscription, this behavior is expected. To fis this, use on-demand message reads after the app has been successfully added to the channel. +Message change notifications might fail in shared or private channels because subscriptions to /channels/{id}/messages are blocked when using resource-specific consent (RSC) in these types of channels. If your app encounters a 403 error when attempting to create a subscription, this behavior is expected. To fix this, use on-demand message reads after the app has been successfully added to the channel.
  @@ -446,7 +442,7 @@ Message change notifications may fail in shared or private channels because subs
Why do file links still fail for external users even after the app has been added to the channel? -This can happen if the type of link being used is not allowed by the tenant’s sharing policy, or if the user hasn’t been granted access to the specific item, despite being a member of the channel. Another common cause is that the app may have generated links pointing to the team drive instead of the channel’s dedicated drive. To resolve this, reissue the links using the “people with existing access” option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. +This can happen if the type of link being used is not allowed by the tenant’s sharing policy, or if the user hasn’t been granted access to the specific item, despite being a member of the channel. Another common cause is that the app might have generated links pointing to the team drive instead of the channel’s dedicated drive. To resolve this, reissue the links using the "people with existing access" option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. ## See also From 30207270da8f78bc747f79aa3b14170688e35557 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 20:14:55 +0530 Subject: [PATCH 18/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 179 ++---------------- 1 file changed, 16 insertions(+), 163 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 8394bcf0772..bbbfed66fae 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -8,9 +8,19 @@ ms.topic: conceptual ms.date: 04/09/2025 --- -# Microsoft Teams connects for shared and private channels +# MMicrosoft Teams connect shared and private channels -Microsoft Teams apps must support shared and private channels, which introduce new collaboration scenarios across teams and organizations. Shared channels in Microsoft Teams Connect can be created and shared with members of other teams within the same organization or with teams from external organizations. +Microsoft Teams Connect shared channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: + +* Members of another team within the same organization. +* Individuals within the same organization. +* Individuals and other teams of other organizations. + +Microsoft Teams private channels allow a subset of team members to collaborate in a more focused and secure space, separate from the main team conversation. You can create and use a private channel with: + +* Selected members of the same team. +* Internal stakeholders who require restricted access to sensitive content. +* Team members working on confidential projects or specialized tasks > [!NOTE] > @@ -19,31 +29,9 @@ Microsoft Teams apps must support shared and private channels, which introduce n Teams Connects Shared channels facilitate secure collaboration seamlessly. Allow external users outside of your organization to collaborate with internal users in Teams without changing their user context. Enhance user experience unlike using guest accounts, for example, the members must sign out of Teams and sign in again using a guest account. Teams applications extend the powerful collaboration space. - ![Diagram shows Team B from organization A and Team C from organization B collaborating in a Shared channel as Team A.](../../assets/images/app-fundamentals/shared-channels-teams.png) - -## Understanding shared and private channels in Microsoft Teams - -### Shared channel - -Shared channels in Microsoft Teams let you collaborate with people who aren’t part of your team. Only users added as owners or members can access the shared channel. You can’t add regular guest accounts (via Microsoft Entra) to shared channels. However, you can still invite people from outside your organization through Microsoft Entra B2B direct connect, which enables secure external collaboration with no need to add them as guests. - -### Private channel - -Private channels in Microsoft Teams are special spaces for focused collaboration within a team. The system allows only people added as owners or members of the private channel to access it. You can include guests (users with Microsoft Entra guest accounts) in a private channel, but only if they're already part of the host team. - -### Feature differences between shared and private channels +![Diagram shows Team B from organization A and Team C from organization B collaborating in a Shared channel as Team A.](../../assets/images/app-fundamentals/shared-channels-teams.png) -| Features | Standard Channel | Shared Channel | Private Channel | -|---------------------|------------------------|-----------------------------------------------------|--------------------------------------------------| -| People can be added to channel without adding to team | No | Yes | No | -|Channel membership can be limited to a subset of the team | No | Yes | Yes | -|Channel can be shared directly with other teams | No | Yes | No | -|Channel can be shared directly with its parent team | NA | Yes | No | -|Guests can participate in the channel |Yes | No | Yes | -|External participants (Direct Connect) can participate in channel |No | Yes | No | -|Each channel has a dedicated SharePoint site |No | Yes | Yes | - -### Teams channels – capabilities comparison +## Teams channels – capabilities comparison | **Category** | **Capability** | **Standard channel** | **Private channel** | **Shared channel** | |--------------|----------------------------------------------------------------------------------|----------------------|---------------------|---------------------| @@ -59,37 +47,6 @@ Private channels in Microsoft Teams are special spaces for focused collaboration | | App installed to host team automatically available in channel | Yes | No | No | | | App must be added to each channel | No | Yes | Yes | -## A strategic approach to change - -Microsoft Teams is developing with shared and private channels, and that means apps need to develop too. To keep your app working smoothly across all channel types: standard, shared, and private you need a logical strategy. - -## Technical changes for app compatibility with shared and private channels - -With an enhanced understanding of how users interact in shared and private channels, you can now focus on the technical steps to update your app. Microsoft Teams offers APIs to work with these channels. - -### Identify channels - -When your app runs inside Microsoft Teams, it needs to know what kind of channel it’s operating in. This check helps the app adjust its functionality accordingly. - -|Tabs| Bots| -|--------------------------------------|----------------------------------------| -|When content UX is loaded in a Shared channel, use data received from [getContext](../../tabs/how-to/access-teams-context.md) call
For Shared channel, channel.membershipType == Shared,
For private channel channel.membershipType == Private,|To determine where a bot activity originated, especially in shared channel scenarios, use the channel.type property found in turnContext.activity.channelData. This property is available in any bot activity handler and helps identify the channel type, allowing your app to respond appropriately based on the context.
For Shared Channel turnContext.activity.channelData.channel.type == shared
For Private ChannelturnContext.activity.channelData.channel.type == private You can learn more from [(Bot activity handlers - Teams Microsoft Learn)](../../bots/bot-concepts.md) - -SupportedChannelTypes is an optional property that enables your app in nonstandard channels. If your app supports the team scope and you define the property, Teams enables your app in each channel type accordingly. The apps support private and shared channels. For more information, see [supportedChannelTypes](../../resources/schema/manifest-schema.md#supportedchanneltypes). - -```JSON - "supportedChannelTypes": [ - "sharedChannels", - "privateChannels" - ] -``` - -> [!NOTE] -> -> * If your app supports the team scope, it functions in standard channels, regardless of what values are defined in this property. -> * Your app might need to account for the unique properties of each of these channel types in order to function properly. -> * Only **tabs** are currently supported in **private** and **shared** channels in Microsoft Teams. - ### Get context for shared channels When loading the content UX in a shared or private channel, use the data received from `getContext` call for shared or private channel changes. `getContext` call publishes two new properties, `hostTeamGroupID` and `hostTenantID`, which are used to retrieve channel membership using Microsoft Graph APIs. `hostTeam` is the team that creates the shared channel. @@ -107,30 +64,6 @@ Team membership APIs aren't equal to shared or private Channel membership Shared Each channel has its own SharePoint site with its own permissions. Apps must follow these rules to prevent data leaks or access problems. -### Get host team group ID & channel ID - -| Tabs | Bots | -|--------------------------------------|----------------------------------------| -|You can use below mentioned parameters received in getContext call to get host team ID and channel ID required for any Graph calls
1. JSv1: hostTeamGroupID and channelId
2. JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
Get host team group ID from: turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
Get channel ID from: turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. - -> [!NOTE] -> -> * Don't store these parameters, because the channel owner can change the host team of a shared channel, which updates the values. Recommended to always fetch these parameters dynamically when needed. - -Then, call following APIs listed based on your app requirements: - -### Get all members of a private or shared channel - -If you're using Graph - -Pass the teamID and channelID fetched in the preceding section in GET teams/{team-ID}/channels/{channel-ID}/allMembers to get all members of a Shared or a private channel. - -If you are using Bots SDK - -Pass the channel ID you received in [getConversationMembers](../../resources/team-chat-member-api-changes.md) API to get all members of a Shared or private channel. - -Note: Use the following APIs only if your app needs to create specific permissions or experiences based on the member type in a shared channel. Otherwise, you can skip them. - ## Apps and permissions in shared channels You can collaborate with external members outside of your organization using Shared channels. App permissions in Shared channels follow the host team's app roster and host tenant's app policy. @@ -162,24 +95,6 @@ Note: This returns both internal and external users added to the Shared channel. GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/members ``` -## Retrieve members of a shared channel in Microsoft Teams - -In Microsoft Teams, when you share a channel with another team, the channel includes that team’s members. The system doesn’t add users directly to the shared channel; instead, it grants access through their team’s connection to the channel. - -Get each shared team with GET sharedWithTeams API. - -```http -GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams - ``` - -Use GET members of each shared team (Team X) with GET sharedWithTeams API. - -```http -GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/members - ``` - -With this information, structure your app to interpret member details and apply appropriate permissions as per your app use-case. - ## Classify members in the shared channel as in-tenant or out-tenant You can classify members as in-tenant or out-tenant by comparing `tenantID` of the member or team with `hostTeamTenantID` as follows: @@ -233,8 +148,6 @@ These Bot SDK endpoints are essential for monitoring membership changes and main ## Validate user access for membership updates -### Graph - When an app receives a notification for an indirect membership update, it’s important to verify whether the user still has access to the shared channel as the same user might have both direct and indirect membership. For example, if a user is removed from a team that shares a channel, the app should confirm whether the user's access is truly lost. Use the **doesUserHaveAccess** API to determine whether the user still has access to the shared channel. ```http @@ -268,30 +181,6 @@ The sharedWithTeams subscription sends a single notification when a channel is s Whenever a shared channel is shared with another team, that team receives a notification through the Bot SDK endpoint API Bot SDK endpoint API "OnConversationUpdateActivityAsync." -```http -GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',tenantId='@TenantID',userPrincipalName='@UserPrincipalName') -``` - -## Handling external users (B2B Direct connect) in shared channels - -Each Microsoft Teams channel is linked to its own SharePoint site, which has separate permission. When building apps, make sure to check these limits so you don’t run into access issues or cause data leaks. - -Perform the following steps, for this identification process: - -Step 1: Identify External Users -Get tenant ID of the channel in which your app is operating inside. - -|Tabs|Bots| -|--------------------------------------|----------------------------------------| -|You can use below mentioned parameters received in [getContext](../../tabs/how-to/access-teams-context.md) call to get host team ID and channel ID required for any Graph calls
•JSv1: hostTeamGroupID and channelId
•JSv2: channel.ownerGroupId and channel.id | For any event payload or action payload received for a bot,
•Get host team group ID from turnContext.Activity.TeamsGetTeamInfo().AadGroupId received in event payloads.
•Get channel ID from turnContext.Activity.TeamsGetChannelId() or turnContext.Activity.ChannelId received in event payloads. - -Then, identify external users from direct members list you received for Shared channel. - -Get members of a shared or a private channel. -GET /teams/{host-team-group-id}/channels/{channel-id}/members - -To classify member as out-of-tenant if TenantIds don’t match, compare tenantID of each member with the hostTenantID property. - ## Authenticate external users to access your app content in sharepoint You need to complete this step when your app stores content in the SharePoint site of the tenant that hosts the channel and requests a SharePoint token. @@ -314,7 +203,7 @@ Apps must function cross-tenants in installation and usage. The following table |Channel type| groupId | hostTeamGroupId | |----------|---------|-----------------| -|Regular | Team Microsoft Entra group ID | Team Microsoft Entra group ID | +|Standard | Team Microsoft Entra group ID | Team Microsoft Entra group ID | |Shared | Empty | Host Team Microsoft Entra group ID | ## Access sharepoint data in shared and private channels @@ -323,43 +212,6 @@ If you're building an app using [SharePoint](/sharepoint/dev/spfx/integrate-with Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-get-filesfolder). -## Declare your app works in shared and private channels - -After making all the preceding changes, you need to declare your app’s manifest to declare that your app works in Shared and private channels. - -This declaration makes your app visible to users in Shared and private channels. Else, your app is not discoverable to users in those channels. This configuration update is a mandatory requirement. - -supportsChannelFeatures are an optional property that enables your app in nonstandard channels along with standard channels. - -Put supportsChannelFeatures as “level2” For more information, see . - -Json -{ - "supportsChannelFeatures": [ - "Tier1" - ] -} - -Note: If your app supports team scope, it functions in standard channels, regardless of what values are defined in this property. - -Note: - -- When you declare support for "Tier1" in your app manifest. - - You're assuming the channel's roster matches the parent team. - - To get the full list of users with access—including direct and transitive members—use the API: GET/teams/{team-id}/channels/{channel-id}/allMembers - - This API is the only API that returns everyone who can access the channel. Check the official documentation for more details. - -- Don't assume the type of users (for example, guest, external, internal) in a channel’s roster. - a. When using the GET/teams/{team-id}/channels/{channel-id}/allMembers API: - - Check the "roles" property to identify if the user is a guest. - - Check the "tenantId" property to determine if the user is:
*From the same tenant (intra-tenant), or
*From a different tenant (cross-tenant). - - This API returns both direct and transitive members—ensuring a complete view of channel access. - -- Do not assume that a channel’s storage location is the same as its parent team’s SharePoint site. - - Instead, always use the Microsoft Graph API endpoint: -GET /teams/{team-id}/channels/{channel-id}/filesFolder - - This API call returns the current and correct SharePoint document library location for the specified channel—especially important for shared and private channels, which have their own dedicated SharePoint sites. - ## Apps in Federated group chats with external users > [!NOTE] @@ -387,6 +239,7 @@ If you're developing an app for use in federated group chats with external users
Why isn’t the app visible when trying to add it to a channel? + If an app isn’t visible when trying to add it to a channel, there are a few likely causes. The app manifest might be missing required support, such as "supportsChannelFeatures": tier1, which enables compatibility with channel features. Additionally, the installer might not have sufficient permissions, only team members or owners can add apps, and local policies must allow app installation. If the channel is an incoming shared channel (shared into a team), apps cannot be added directly from that location. In such cases, switch to the host team to add the app to the channel. You can detect whether a channel is shared-in by checking the channel metadata for the host team ID.
From 82a157730340ed1521eddf336d59b4ad87ed3459 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 22:58:10 +0530 Subject: [PATCH 19/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index bbbfed66fae..bb875356c05 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -8,7 +8,7 @@ ms.topic: conceptual ms.date: 04/09/2025 --- -# MMicrosoft Teams connect shared and private channels +# Microsoft Teams connect shared and private channels Microsoft Teams Connect shared channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: @@ -16,11 +16,11 @@ Microsoft Teams Connect shared channels allow members of a channel to collaborat * Individuals within the same organization. * Individuals and other teams of other organizations. -Microsoft Teams private channels allow a subset of team members to collaborate in a more focused and secure space, separate from the main team conversation. You can create and use a private channel with: +Microsoft Teams private channels allow a subset of team members to collaborate in a more focused and secure space, separate from general team discussion. You can create and use a private channel with: * Selected members of the same team. * Internal stakeholders who require restricted access to sensitive content. -* Team members working on confidential projects or specialized tasks +* Team members working on confidential projects. > [!NOTE] > @@ -111,12 +111,12 @@ You can classify members as in-tenant or out-tenant by comparing `tenantID` of t ## Get app notifications for direct and indirect membership changes -### In graph +### [Graph](#tab/graph) Apps installed in shared channels receive notifications when users are added to or removed from a team that shares the channel. To receive these notifications, you must: 1. [Install the app](../deploy-and-publish/apps-upload.md) in a host team and enable it for the shared channel. -1. Create a valid Microsoft Graph change notification subscription to monitor associated team membership changes and shared or unshared events using supported APIs. +2. Create a valid Microsoft Graph change notification subscription to monitor associated team membership changes and shared or unshared events using supported APIs. To receive both direct and indirect member update notifications, you must include both the query string parameters when creating a subscription. If the query strings aren't provided, the subscription only delivers notifications for direct member updates. To learn more, see [Channel membership access](/graph/teams-changenotifications-channelmembership). @@ -126,19 +126,15 @@ To receive both direct and indirect member update notifications, you must includ This subscription enables apps to monitor membership changes in shared channels and its associated teams. For more information on how to create a Microsoft Graph change notification subscription, see [Create a subscription.](/graph/teams-changenotifications-teammembership) -### In Bot SDK +### [Bot SDK](#tab/bot sdk) -When a new member is added to a shared channel, the OnMembersAddedAsync method is called. This method provides the context and details of the user who was added, allowing the bot to respond accordingly. - -Member added +When a new member is added to a shared channel, the ```OnMembersAddedAsync``` method is called. This method provides the context and details of the user who was added, allowing the bot to respond accordingly. ```http public async Task OnMembersAddedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) ``` -Similarly, when a member is removed from the channel, the OnMembersRemovedAsync method is called. This method allows the bot to handle clean-up tasks or adjust access controls as needed. - -Member removed +Similarly, when a member is removed from the channel, the ```OnMembersRemovedAsync``` method is called. This method allows the bot to handle clean-up tasks or adjust access controls as needed. ```http public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) @@ -248,7 +244,7 @@ If an app isn’t visible when trying to add it to a channel, there are a few li
Why am I getting a 403 error stating "app not enabled in this channel" when calling channel APIs? -A 403 error stating "app not enabled in this channel" typically occurs when the app is installed at the team level but is not added to the specific channel. To fix this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ChannelMember.Read.Group for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel. +A 403 error stating "app not enabled in this channel" typically occurs when the app is installed at the team level but is not added to the specific channel. To resolve this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ChannelMember.Read.Group for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel.
  @@ -256,7 +252,7 @@ A 403 error stating "app not enabled in this channel" typically occurs when the
Why does the channel roster appear incomplete, showing only owners or missing users? -If the channel roster appears incomplete showing only owners or missing users, it might be due to using the team members API instead of the correct channel-specific API. To resolve this, use the /channels/{id}/allMembers API to retrieve the full channel roster. If the response still shows only owners, the app likely hasn’t been added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster. +If the channel roster appears incomplete showing only owners or missing users, it might be due to using the team members API instead of the correct channel-specific API. To resolve this issue, use the /channels/{id}/allMembers API to retrieve the full channel roster. If the response still shows only owners, the app likely is not added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster.
  @@ -264,7 +260,7 @@ If the channel roster appears incomplete showing only owners or missing users, i
Why does file access fail for some users even though they are part of the channel? -This can happen if the app is using the team’s main SharePoint site instead of the specific site linked to the channel. It might also be due to the type of link being blocked by your organization’s sharing policies, or because external users don’t have the right permissions. To fix this, make sure your app uses the channel’s filesFolder property to get the correct driveId and itemId for file operations. When sharing files, use "people with existing access" links or the /invite API to give access to specific users or groups. +This failure can happen if the app is using the team’s main SharePoint site instead of the specific site linked to the channel. Your organization’s sharing policies might block the type of link, or external users might lack the necessary permissions. To resolve this issue, make sure your app uses the channel’s filesFolder property to get the correct driveId and itemId for file operations. When sharing files, use "people with existing access" links or the /invite API to give access to specific users or groups.
  @@ -272,7 +268,7 @@ This can happen if the app is using the team’s main SharePoint site instead of
Why are external users experiencing authentication issues in tabs or task modules? -Authentication issues in tabs or task modules for external users often occur when the app requests a token for the host tenant instead of the user’s home tenant. To resolve this, check whether the user is external by comparing context.user.tenant.id with the host or owner tenant ID. If they are different, the user is external, and your app should request the token for the user’s home tenant. You can do this by passing the correct tenant ID (tid) when calling getAuthToken. +Authentication issues in tabs or task modules for external users often occur when the app requests a token for the host tenant instead of the user’s home tenant. To resolve this issue, check whether the user is external by comparing context.user.tenant.id with the host or owner tenant ID. If they are different, the user is external, and your app should request the token for the user’s home tenant. You can do this by passing the correct tenant ID (tid) when calling getAuthToken.
  @@ -280,7 +276,7 @@ Authentication issues in tabs or task modules for external users often occur whe
How do I know my app was added to a channel? -This issue might occur if the app is expecting a centralized list of installed apps at the channel level or relying on team-level installation behavior. Currently, there is no channel-level installedApps list available. Bots should instead listen for the channelMemberAdded event within the channel to detect when they have been added. If this event is not received, and a 403 error is returned during operations, the app should handle the error and prompt the user to add the bot to the channel. +This issue might occur if the app is expecting a centralized list of installed apps at the channel level or relying on team-level installation behavior. Currently, there is no channel-level installedApps list available. Bots should instead listen for the channelMemberAdded event within the channel to detect when they are added. If the app doesn’t receive the event and gets a 403 error, it prompts the user to add the bot to the channel and handles the error.
  @@ -288,15 +284,15 @@ This issue might occur if the app is expecting a centralized list of installed a
Why is my app failing to create message change notifications in shared or private channels? -Message change notifications might fail in shared or private channels because subscriptions to /channels/{id}/messages are blocked when using resource-specific consent (RSC) in these types of channels. If your app encounters a 403 error when attempting to create a subscription, this behavior is expected. To fix this, use on-demand message reads after the app has been successfully added to the channel. +Message change notifications might fail in shared or private channels because subscriptions to /channels/{id}/messages are blocked when using resource-specific consent (RSC) in these types of channels. If your app encounters a 403 error when attempting to create a subscription, this behavior is expected. To resolve this issue, use on-demand message reads after the app is successfully added to the channel.
 
-Why do file links still fail for external users even after the app has been added to the channel? +Why do file links still fail for external users even after the app is added to the channel? -This can happen if the type of link being used is not allowed by the tenant’s sharing policy, or if the user hasn’t been granted access to the specific item, despite being a member of the channel. Another common cause is that the app might have generated links pointing to the team drive instead of the channel’s dedicated drive. To resolve this, reissue the links using the "people with existing access" option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. +This can happen if the type of link being used is not allowed by the tenant’s sharing policy, or if the user hasn’t been granted access to the specific item, despite being a member of the channel. Another common cause is that the app might have generated links pointing to the team drive instead of the channel’s dedicated drive. To resolve this issue, reissue the links using the "people with existing access" option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. ## See also From 41aed14cf43ad19e8f723d80e7d8ee5787cac1ce Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 23:13:00 +0530 Subject: [PATCH 20/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index bb875356c05..879a661625c 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -120,26 +120,27 @@ Apps installed in shared channels receive notifications when users are added to To receive both direct and indirect member update notifications, you must include both the query string parameters when creating a subscription. If the query strings aren't provided, the subscription only delivers notifications for direct member updates. To learn more, see [Channel membership access](/graph/teams-changenotifications-channelmembership). -```http +```C# `/teams/{team-id}/channels/getAllMembers?notifyOnIndirectMembershipUpdate=true&suppressNotificationWhenSharedUnsharedWithTeam=true` ``` This subscription enables apps to monitor membership changes in shared channels and its associated teams. For more information on how to create a Microsoft Graph change notification subscription, see [Create a subscription.](/graph/teams-changenotifications-teammembership) -### [Bot SDK](#tab/bot sdk) +### [Bot Framework](#tab/bot-framework) When a new member is added to a shared channel, the ```OnMembersAddedAsync``` method is called. This method provides the context and details of the user who was added, allowing the bot to respond accordingly. -```http +```C# public async Task OnMembersAddedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) ``` Similarly, when a member is removed from the channel, the ```OnMembersRemovedAsync``` method is called. This method allows the bot to handle clean-up tasks or adjust access controls as needed. -```http +```C# public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) ``` +--- These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. ## Validate user access for membership updates @@ -158,7 +159,7 @@ If there are bulk membership changes, Teams curbs individual membership update n ### Use sharedWithTeams subscription for bulk membership changes -To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new SharedWithTeams subscription resource: +To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: ```http `/teams/{team-id}/channels/{channel-id}/sharedWithTeams` From a586fe7b8b37fc2fc03e83684929a92319128f2f Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 23:31:34 +0530 Subject: [PATCH 21/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 879a661625c..6eb8b320023 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -147,7 +147,7 @@ These Bot SDK endpoints are essential for monitoring membership changes and main When an app receives a notification for an indirect membership update, it’s important to verify whether the user still has access to the shared channel as the same user might have both direct and indirect membership. For example, if a user is removed from a team that shares a channel, the app should confirm whether the user's access is truly lost. Use the **doesUserHaveAccess** API to determine whether the user still has access to the shared channel. -```http +```C# GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',tenantId='@TenantID',userPrincipalName='@UserPrincipalName') ``` @@ -159,9 +159,11 @@ If there are bulk membership changes, Teams curbs individual membership update n ### Use sharedWithTeams subscription for bulk membership changes +### [Graph](#tab1/graph) + To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: -```http +```C# `/teams/{team-id}/channels/{channel-id}/sharedWithTeams` ``` @@ -174,9 +176,11 @@ The sharedWithTeams subscription sends a single notification when a channel is s > * Access membership data (both direct and indirect members). > * Receive and respond to membership change notifications. -### Bot Framework +### [Bot Framework](#tab1/bot-framework) -Whenever a shared channel is shared with another team, that team receives a notification through the Bot SDK endpoint API Bot SDK endpoint API "OnConversationUpdateActivityAsync." +When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. + +--- ## Authenticate external users to access your app content in sharepoint From d277b764b179a75aa9490cd323a114c8a2e20f7f Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 23:37:24 +0530 Subject: [PATCH 22/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 6eb8b320023..43a2f7ef28c 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -186,9 +186,15 @@ When a shared channel is added to another team, the Bot Framework may receive a You need to complete this step when your app stores content in the SharePoint site of the tenant that hosts the channel and requests a SharePoint token. - |Tabs|Bots| -|--------------------------------------|----------------------------------------| -|Save host tenant ID of Shared channel where tab is configured. You can get host tenant ID from channel.ownerTenantId for JSv2 or hostTenantId for JSv1 received under getContext call. | For any event payload or action payload received for a bot, use Get hostTenant ID, from turnContext.activity.conversation.tenantId| +### [Tabs](#tab/tabs) + +Save host tenant ID of shared channel where tab is configured. You can get host tenant ID from ```channel.ownerTenantId``` for JSv2 or host tenant ID for JSv1 received under ```getContext``` call. + +### [Bots](#tab/bots) + +For any event payload or action payload received for a bot, use Get hostTenant ID, from ```turnContext.activity.conversation.tenantId```. + +--- Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to allow cross-tenant users to access content hosted inside Sharepoint site attached to the Shared channel. From ca45da5fa71b5241ea68805f73592772032e142f Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Tue, 9 Sep 2025 23:51:56 +0530 Subject: [PATCH 23/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 43a2f7ef28c..7a470954a82 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -140,8 +140,8 @@ Similarly, when a member is removed from the channel, the ```OnMembersRemovedAsy public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) ``` ---- These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. +--- ## Validate user access for membership updates @@ -159,7 +159,7 @@ If there are bulk membership changes, Teams curbs individual membership update n ### Use sharedWithTeams subscription for bulk membership changes -### [Graph](#tab1/graph) +### [Graph](#tab/graph) To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: @@ -176,7 +176,7 @@ The sharedWithTeams subscription sends a single notification when a channel is s > * Access membership data (both direct and indirect members). > * Receive and respond to membership change notifications. -### [Bot Framework](#tab1/bot-framework) +### [Bot Framework](#tab/bot-framework) When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. From 89d812ccf19381c6f55ce5c8fdbefc729f99d804 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 00:00:56 +0530 Subject: [PATCH 24/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 7a470954a82..26e65717a60 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -138,9 +138,7 @@ Similarly, when a member is removed from the channel, the ```OnMembersRemovedAsy ```C# public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) -``` - -These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. +```These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. --- ## Validate user access for membership updates @@ -159,7 +157,7 @@ If there are bulk membership changes, Teams curbs individual membership update n ### Use sharedWithTeams subscription for bulk membership changes -### [Graph](#tab/graph) +### [Tab](#tab/tab) To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: @@ -176,7 +174,7 @@ The sharedWithTeams subscription sends a single notification when a channel is s > * Access membership data (both direct and indirect members). > * Receive and respond to membership change notifications. -### [Bot Framework](#tab/bot-framework) +### [Bot](#tab/bot) When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. From 250edd5916fc7581faf4980868fa92029df3511d Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 00:05:34 +0530 Subject: [PATCH 25/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 26e65717a60..a1a2d36c920 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -138,7 +138,10 @@ Similarly, when a member is removed from the channel, the ```OnMembersRemovedAsy ```C# public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) -```These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. +``` + +These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. + --- ## Validate user access for membership updates @@ -157,7 +160,7 @@ If there are bulk membership changes, Teams curbs individual membership update n ### Use sharedWithTeams subscription for bulk membership changes -### [Tab](#tab/tab) +### [Graph](#tab/graph) To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: @@ -174,7 +177,7 @@ The sharedWithTeams subscription sends a single notification when a channel is s > * Access membership data (both direct and indirect members). > * Receive and respond to membership change notifications. -### [Bot](#tab/bot) +### [Bot Framework](#tab/bot-framework) When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. From e77f97d2de5179c4058b1cd334d1ecc5f7233f11 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 00:09:50 +0530 Subject: [PATCH 26/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index a1a2d36c920..c61e6e9f9e3 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -141,7 +141,6 @@ public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnS ``` These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. - --- ## Validate user access for membership updates @@ -180,7 +179,6 @@ The sharedWithTeams subscription sends a single notification when a channel is s ### [Bot Framework](#tab/bot-framework) When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. - --- ## Authenticate external users to access your app content in sharepoint From e6e8f7549b67178d7fda73d8efa3842059c70649 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 00:15:27 +0530 Subject: [PATCH 27/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index c61e6e9f9e3..a55b3b42ae2 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -140,8 +140,8 @@ Similarly, when a member is removed from the channel, the ```OnMembersRemovedAsy public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) ``` -These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. --- +These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. ## Validate user access for membership updates @@ -159,7 +159,7 @@ If there are bulk membership changes, Teams curbs individual membership update n ### Use sharedWithTeams subscription for bulk membership changes -### [Graph](#tab/graph) +### [Graph](#tab1/graph) To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: @@ -176,9 +176,10 @@ The sharedWithTeams subscription sends a single notification when a channel is s > * Access membership data (both direct and indirect members). > * Receive and respond to membership change notifications. -### [Bot Framework](#tab/bot-framework) +### [Bot Framework](#tab1/bot-framework) When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. + --- ## Authenticate external users to access your app content in sharepoint @@ -189,6 +190,7 @@ You need to complete this step when your app stores content in the SharePoint si Save host tenant ID of shared channel where tab is configured. You can get host tenant ID from ```channel.ownerTenantId``` for JSv2 or host tenant ID for JSv1 received under ```getContext``` call. + ### [Bots](#tab/bots) For any event payload or action payload received for a bot, use Get hostTenant ID, from ```turnContext.activity.conversation.tenantId```. From d406131092ff2d0f7857ced27d7cad434ea284e7 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 00:22:18 +0530 Subject: [PATCH 28/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index a55b3b42ae2..10d79584b37 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -145,7 +145,7 @@ These Bot SDK endpoints are essential for monitoring membership changes and main ## Validate user access for membership updates -When an app receives a notification for an indirect membership update, it’s important to verify whether the user still has access to the shared channel as the same user might have both direct and indirect membership. For example, if a user is removed from a team that shares a channel, the app should confirm whether the user's access is truly lost. Use the **doesUserHaveAccess** API to determine whether the user still has access to the shared channel. +When an app receives a notification for an indirect membership update, it’s important to verify whether the user still has access to the shared channel as the same user might have both direct and indirect membership. For example, if a user is removed from a team that shares a channel, the app should confirm whether the user's access is truly lost. Use the ```doesUserHaveAccess``` API to determine whether the user still has access to the shared channel. ```C# GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',tenantId='@TenantID',userPrincipalName='@UserPrincipalName') @@ -190,7 +190,6 @@ You need to complete this step when your app stores content in the SharePoint si Save host tenant ID of shared channel where tab is configured. You can get host tenant ID from ```channel.ownerTenantId``` for JSv2 or host tenant ID for JSv1 received under ```getContext``` call. - ### [Bots](#tab/bots) For any event payload or action payload received for a bot, use Get hostTenant ID, from ```turnContext.activity.conversation.tenantId```. From a3c1d2972c46a556d212f1a4eecca3e52d07e443 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 00:24:14 +0530 Subject: [PATCH 29/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 10d79584b37..fa823e314c0 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -159,7 +159,7 @@ If there are bulk membership changes, Teams curbs individual membership update n ### Use sharedWithTeams subscription for bulk membership changes -### [Graph](#tab1/graph) +### [Graph](#tab/graph) To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: From d45489f1e91dfd4e955fa4245f1252235cf12c65 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 07:49:43 +0530 Subject: [PATCH 30/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index fa823e314c0..5b5d632a250 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -120,7 +120,7 @@ Apps installed in shared channels receive notifications when users are added to To receive both direct and indirect member update notifications, you must include both the query string parameters when creating a subscription. If the query strings aren't provided, the subscription only delivers notifications for direct member updates. To learn more, see [Channel membership access](/graph/teams-changenotifications-channelmembership). -```C# +```csharp `/teams/{team-id}/channels/getAllMembers?notifyOnIndirectMembershipUpdate=true&suppressNotificationWhenSharedUnsharedWithTeam=true` ``` @@ -130,24 +130,25 @@ This subscription enables apps to monitor membership changes in shared channels When a new member is added to a shared channel, the ```OnMembersAddedAsync``` method is called. This method provides the context and details of the user who was added, allowing the bot to respond accordingly. -```C# +```csharp public async Task OnMembersAddedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) ``` Similarly, when a member is removed from the channel, the ```OnMembersRemovedAsync``` method is called. This method allows the bot to handle clean-up tasks or adjust access controls as needed. -```C# +```csharp public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) ``` +These Bot Framework endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. + --- -These Bot SDK endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. ## Validate user access for membership updates When an app receives a notification for an indirect membership update, it’s important to verify whether the user still has access to the shared channel as the same user might have both direct and indirect membership. For example, if a user is removed from a team that shares a channel, the app should confirm whether the user's access is truly lost. Use the ```doesUserHaveAccess``` API to determine whether the user still has access to the shared channel. -```C# +```csharp GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',tenantId='@TenantID',userPrincipalName='@UserPrincipalName') ``` @@ -159,11 +160,11 @@ If there are bulk membership changes, Teams curbs individual membership update n ### Use sharedWithTeams subscription for bulk membership changes -### [Graph](#tab/graph) +### [Graph](#tab/graph-bulk) To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: -```C# +```csharp `/teams/{team-id}/channels/{channel-id}/sharedWithTeams` ``` @@ -176,7 +177,7 @@ The sharedWithTeams subscription sends a single notification when a channel is s > * Access membership data (both direct and indirect members). > * Receive and respond to membership change notifications. -### [Bot Framework](#tab1/bot-framework) +### [Bot Framework](#tab/bot-framework-bulk) When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. From 8425235487ef6537c6ce5f2e4700cd17b7b93f32 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 08:00:17 +0530 Subject: [PATCH 31/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 5b5d632a250..08039569001 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -177,7 +177,7 @@ The sharedWithTeams subscription sends a single notification when a channel is s > * Access membership data (both direct and indirect members). > * Receive and respond to membership change notifications. -### [Bot Framework](#tab/bot-framework-bulk) +### [Bot Framework](#tab/botframework-bulk) When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. From 7ecf5b26bddc4bd863597d50bbab026af17d73ee Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 08:08:57 +0530 Subject: [PATCH 32/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 08039569001..2aed8d1e50b 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -56,14 +56,6 @@ For more information to enable your tab, see: * [Get context for your tab for private channels](../../tabs/how-to/access-teams-context.md#retrieve-context-in-private-channels) * [Get context in shared channels](../../tabs/how-to/access-teams-context.md#get-context-in-shared-channels) -### Managing channel members and permissions in Microsoft Teams apps - -To ensure your app functions correctly in shared and private channels, you must use channel-specific APIs to gather accurate member information. Usage of channel-specific APIS is important because: - -Team membership APIs aren't equal to shared or private Channel membership Shared and private channels have their own membership models, which aren't the same as the parent team’s membership. - -Each channel has its own SharePoint site with its own permissions. Apps must follow these rules to prevent data leaks or access problems. - ## Apps and permissions in shared channels You can collaborate with external members outside of your organization using Shared channels. App permissions in Shared channels follow the host team's app roster and host tenant's app policy. From 68356f3715177c2e11d57beaed27bb3edd869e47 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 08:36:14 +0530 Subject: [PATCH 33/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 2aed8d1e50b..28ae87adadd 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -10,7 +10,7 @@ ms.date: 04/09/2025 # Microsoft Teams connect shared and private channels -Microsoft Teams Connect shared channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: +Microsoft Teams connect shared channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: * Members of another team within the same organization. * Individuals within the same organization. @@ -24,12 +24,12 @@ Microsoft Teams private channels allow a subset of team members to collaborate i > [!NOTE] > -> * Tab apps in Shared channels are available in [Government Community Cloud (GCC), GCC High, Department of Defense (DoD)](../cloud-overview.md#teams-app-capabilities), and [Teams operated by 21Vianet](../sovereign-cloud.md) environments. -> * SharePoint and the SharePoint pages apps aren't supported for Shared channels in GCC, GCC High, DoD, and Teams operated by 21Vianet environments. +> * Tab apps in shared channels are available in [Government Community Cloud (GCC), GCC High, Department of Defense (DoD)](../cloud-overview.md#teams-app-capabilities), and [Teams operated by 21Vianet](../sovereign-cloud.md) environments. +> * SharePoint and the SharePoint pages apps aren't supported for shared channels in GCC, GCC High, DoD, and Teams operated by 21Vianet environments. -Teams Connects Shared channels facilitate secure collaboration seamlessly. Allow external users outside of your organization to collaborate with internal users in Teams without changing their user context. Enhance user experience unlike using guest accounts, for example, the members must sign out of Teams and sign in again using a guest account. Teams applications extend the powerful collaboration space. +Teams Connects shared channels facilitate secure collaboration seamlessly. Allow external users outside of your organization to collaborate with internal users in Teams without changing their user context. Enhance user experience unlike using guest accounts, for example, the members must sign out of Teams and sign in again using a guest account. Teams applications extend the powerful collaboration space. -![Diagram shows Team B from organization A and Team C from organization B collaborating in a Shared channel as Team A.](../../assets/images/app-fundamentals/shared-channels-teams.png) +![Diagram shows Team B from organization A and Team C from organization B collaborating in a shared channel as Team A.](../../assets/images/app-fundamentals/shared-channels-teams.png) ## Teams channels – capabilities comparison @@ -58,16 +58,16 @@ For more information to enable your tab, see: ## Apps and permissions in shared channels -You can collaborate with external members outside of your organization using Shared channels. App permissions in Shared channels follow the host team's app roster and host tenant's app policy. +You can collaborate with external members outside of your organization using shared channels. App permissions in shared channels follow the host team's app roster and host tenant's app policy. > [!NOTE] -> The [activity feed notification API](/graph/teams-send-activityfeednotifications) doesn't support cross-tenant notifications for apps in a Shared channel. +> The [activity feed notification API](/graph/teams-send-activityfeednotifications) doesn't support cross-tenant notifications for apps in a shared channel. ### Get shared channel membership You can get direct shared channel membership by using the `hostTeamGroupID` from `getContext` and following these steps: -Note: This returns both internal and external users added to the Shared channel. +Note: This returns both internal and external users added to the shared channel. 1. Get direct members with [GET channel members API](/graph/api/channel-list-members?view=graph-rest-beta&tabs=http&preserve-view=true) API. @@ -189,7 +189,7 @@ For any event payload or action payload received for a bot, use Get hostTenant I --- -Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to allow cross-tenant users to access content hosted inside Sharepoint site attached to the Shared channel. +Now, send saved host tenant ID inside tenantId parameter of getAuthToken call to allow cross-tenant users to access content hosted inside Sharepoint site attached to the shared channel. ## Identify guest users (B2B guests) in private channels @@ -208,9 +208,9 @@ Apps must function cross-tenants in installation and usage. The following table ## Access sharepoint data in shared and private channels -If you're building an app using [SharePoint](/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the Shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific Shared or private channel. +If you're building an app using [SharePoint](/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific shared or private channel. -Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a Shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-get-filesfolder). +Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-get-filesfolder). ## Apps in Federated group chats with external users From afa0caf709471382a1921d472765b24aac587822 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 08:49:26 +0530 Subject: [PATCH 34/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 28ae87adadd..2f119acf2e3 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -210,9 +210,9 @@ Apps must function cross-tenants in installation and usage. The following table If you're building an app using [SharePoint](/sharepoint/dev/spfx/integrate-with-teams-introduction) Framework, you need to use the SharePoint Online (SPO) site linked to the shared channel—not the one linked to the host team group. Each private channel has its own SPO site that is only accessible to members of that specific shared or private channel. -Use the Graph API to access the document library of the SharePoint Online (SPO) site linked to a shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-get-filesfolder). +Use the Graph API to access the document library of the SPO site linked to a shared or private channel. Ensure you pass the Team ID and Channel ID received from the [Get Host Team Group ID & Channel ID](#get-host-team-group-id--channel-id) and pass in [Get filesFolder - Microsoft Graph v1.0 | Microsoft Learn](/graph/api/channel-get-filesfolder). -## Apps in Federated group chats with external users +## Apps in federated group chats with external users > [!NOTE] > From bfaf4f4e370a1667e167f9d5effad5a92c4f11cd Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 09:43:32 +0530 Subject: [PATCH 35/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 2f119acf2e3..4ee14d6ddcc 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -35,17 +35,17 @@ Teams Connects shared channels facilitate secure collaboration seamlessly. Allow | **Category** | **Capability** | **Standard channel** | **Private channel** | **Shared channel** | |--------------|----------------------------------------------------------------------------------|----------------------|---------------------|---------------------| -| **Membership** | Can add people to the channel without adding to the host team | No | No | Yes | -| | Channel membership can be limited to a subset of the host team | No | Yes | Yes | -| | Channel can be shared with other teams to inherit members from the team | No | No | Yes | -| | Channel can be shared directly with its parent team to inherit members | N/A | No | Yes | -| | Guests (B2B Guests) can participate in the channel | Yes | Yes | No | -| | External participants (B2B Direct Connect) can participate in the channel | No | No | Yes | -| | Channel is hosted under a host team | Yes | Yes | Yes | -| **Storage** | Each channel has a dedicated SharePoint site | No (inherits team site) | Yes | Yes | -| **App Model** | App must be installed in the host team | Yes | Yes | Yes | -| | App installed to host team automatically available in channel | Yes | No | No | -| | App must be added to each channel | No | Yes | Yes | +| **Membership** | Can add people to the channel without adding to the host team | :x: | :x: | :white_check_mark: | +| | Channel membership can be limited to a subset of the host team | :x: | :white_check_mark: | :white_check_mark: | +| | Channel can be shared with other teams to inherit members from the team | :x: | :x: | :white_check_mark: | +| | Channel can be shared directly with its parent team to inherit members | N/A | :x: | :white_check_mark: | +| | Guests (B2B Guests) can participate in the channel | :white_check_mark: | :white_check_mark: | :x: | +| | External participants (B2B Direct Connect) can participate in the channel | :x: | :x: | :white_check_mark: | +| | Channel is hosted under a host team | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| **Storage** | Each channel has a dedicated SharePoint site | :x: (inherits team site) | :white_check_mark: | :white_check_mark: | +| **App Model** | App must be installed in the host team | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| | App installed to host team automatically available in channel | :white_check_mark: | :x: | :x: | +| | App must be added to each channel | :x: | :white_check_mark: | :white_check_mark: | ### Get context for shared channels From 86cfa1e1232b134eff6918a5ca795807ddffdadb Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 09:53:34 +0530 Subject: [PATCH 36/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 4ee14d6ddcc..d9481b68fc1 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -71,7 +71,7 @@ Note: This returns both internal and external users added to the shared channel. 1. Get direct members with [GET channel members API](/graph/api/channel-list-members?view=graph-rest-beta&tabs=http&preserve-view=true) API. - ```http + ```csharp GET /teams/{host-team-group-id}/channels/{channel-id}/members ``` @@ -83,7 +83,7 @@ Note: This returns both internal and external users added to the shared channel. 3. Use GET members of each shared team (Team X) with GET `sharedWithTeams` API. - ```http + ```csharp GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/members ``` @@ -93,7 +93,7 @@ You can classify members as in-tenant or out-tenant by comparing `tenantID` of t 1. Get the member you wish to compare. - ```http + ```csharp GET /teams/{host-team-group-id}/channels/{channel-id}/members ``` From ca45ec711d0cd9a87ec7271647eba0a55acedbf5 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 10:00:12 +0530 Subject: [PATCH 37/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index d9481b68fc1..437c50c5613 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -77,7 +77,7 @@ Note: This returns both internal and external users added to the shared channel. 2. Get each shared team with GET `sharedWithTeams` API. - ```http + ```csharp GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams ``` From 8f6140d020cf59f9139cb83ee5d222ca2bcdc114 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 10:18:20 +0530 Subject: [PATCH 38/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 437c50c5613..a5fffbf4529 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -71,19 +71,19 @@ Note: This returns both internal and external users added to the shared channel. 1. Get direct members with [GET channel members API](/graph/api/channel-list-members?view=graph-rest-beta&tabs=http&preserve-view=true) API. - ```csharp + ```HTTP GET /teams/{host-team-group-id}/channels/{channel-id}/members ``` 2. Get each shared team with GET `sharedWithTeams` API. - ```csharp + ```HTTP GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams ``` 3. Use GET members of each shared team (Team X) with GET `sharedWithTeams` API. - ```csharp + ```HTTP GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams/{teamX}/members ``` @@ -93,7 +93,7 @@ You can classify members as in-tenant or out-tenant by comparing `tenantID` of t 1. Get the member you wish to compare. - ```csharp + ```HTTP GET /teams/{host-team-group-id}/channels/{channel-id}/members ``` @@ -112,7 +112,7 @@ Apps installed in shared channels receive notifications when users are added to To receive both direct and indirect member update notifications, you must include both the query string parameters when creating a subscription. If the query strings aren't provided, the subscription only delivers notifications for direct member updates. To learn more, see [Channel membership access](/graph/teams-changenotifications-channelmembership). -```csharp +```HTTP `/teams/{team-id}/channels/getAllMembers?notifyOnIndirectMembershipUpdate=true&suppressNotificationWhenSharedUnsharedWithTeam=true` ``` @@ -140,7 +140,7 @@ These Bot Framework endpoints are essential for monitoring membership changes an When an app receives a notification for an indirect membership update, it’s important to verify whether the user still has access to the shared channel as the same user might have both direct and indirect membership. For example, if a user is removed from a team that shares a channel, the app should confirm whether the user's access is truly lost. Use the ```doesUserHaveAccess``` API to determine whether the user still has access to the shared channel. -```csharp +```HTTP GET /teams/{team-id}/channels/{channel-id}/doesUserHaveAccess(userId='@userid',tenantId='@TenantID',userPrincipalName='@UserPrincipalName') ``` @@ -156,7 +156,7 @@ If there are bulk membership changes, Teams curbs individual membership update n To reduce notification overload during membership updates, such as when a shared channel is added to or removed from a team with thousands of members, use the new sharedWithTeams subscription resource: -```csharp +```HTTP `/teams/{team-id}/channels/{channel-id}/sharedWithTeams` ``` From cc71494e937c261a5807ce2d196b51c6e6a43fd7 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Wed, 10 Sep 2025 18:35:56 +0530 Subject: [PATCH 39/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index a5fffbf4529..0b73919498c 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -10,17 +10,27 @@ ms.date: 04/09/2025 # Microsoft Teams connect shared and private channels -Microsoft Teams connect shared channels allow members of a channel to collaborate with users across other teams and organizations. You can create and share a shared channel with: +Shared and private channels in Microsoft Teams enable flexible collaboration within and across teams or organizations. Shared channels enable users to work across teams and organizations, allowing seamless communication with internal members or external partners. Private channels provide a secure space for select team members to collaborate on sensitive or confidential content, ensuring privacy and focused discussions within the team. -* Members of another team within the same organization. -* Individuals within the same organization. -* Individuals and other teams of other organizations. +## Most apps easily support shared and private channels in Microsoft Teams -Microsoft Teams private channels allow a subset of team members to collaborate in a more focused and secure space, separate from general team discussion. You can create and use a private channel with: +For many apps, enabling support is simple. If your app doesn’t depend on any of the following: -* Selected members of the same team. -* Internal stakeholders who require restricted access to sensitive content. -* Team members working on confidential projects. +* Using channel or team membership to determine message delivery, task assignment, or permissions +* Accessing or managing files stored in Teams or SharePoint +* Combining or sharing data across multiple channels or teams +* Customizing the experience based on whether users are internal, guests, or external participants + +In that case, complete the following steps: + +1. Add ```"supportsChannelFeatures": "tier1"``` to your app manifest to enable support for shared and private channels. +2. Test your app in standard, private, and shared channels to verify expected behavior. + +If your app uses any of the preceding features: + +Continue reading for specific updates and best practices to help your app run smoothly across all channel types. + +For most apps, only a small update is needed. If your app involves more complex scenarios, this guide provides necessary updates to help you make the right changes without rebuilding theyour entire codebase. > [!NOTE] > From 0efdd6f4584c19bcbf37a6aa10f894e7f680eade Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 11 Sep 2025 10:42:08 +0530 Subject: [PATCH 40/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 0b73919498c..aec21e9e96c 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -10,18 +10,18 @@ ms.date: 04/09/2025 # Microsoft Teams connect shared and private channels -Shared and private channels in Microsoft Teams enable flexible collaboration within and across teams or organizations. Shared channels enable users to work across teams and organizations, allowing seamless communication with internal members or external partners. Private channels provide a secure space for select team members to collaborate on sensitive or confidential content, ensuring privacy and focused discussions within the team. +Shared and private channels in Microsoft Teams enable flexible collaboration within and across teams or organizations. Shared channels allow seamless communication with internal or external partners. Private channels provide a secure space for selected team members to collaborate on sensitive or confidential content, ensuring privacy and focused discussions within the team. -## Most apps easily support shared and private channels in Microsoft Teams - -For many apps, enabling support is simple. If your app doesn’t depend on any of the following: +## Enable apps support for shared and private channels +You can enable app support for shared and private channels based on whether your app is: + * Using channel or team membership to determine message delivery, task assignment, or permissions * Accessing or managing files stored in Teams or SharePoint * Combining or sharing data across multiple channels or teams -* Customizing the experience based on whether users are internal, guests, or external participants +* Customizing the experience based on whether users are internal, guests, or external participants -In that case, complete the following steps: +If it doesn't follow the preceding parameters, perform the following steps to enable app support in shared and private channels: 1. Add ```"supportsChannelFeatures": "tier1"``` to your app manifest to enable support for shared and private channels. 2. Test your app in standard, private, and shared channels to verify expected behavior. @@ -30,7 +30,7 @@ If your app uses any of the preceding features: Continue reading for specific updates and best practices to help your app run smoothly across all channel types. -For most apps, only a small update is needed. If your app involves more complex scenarios, this guide provides necessary updates to help you make the right changes without rebuilding theyour entire codebase. +For most apps, only a small update is needed. If your app involves more complex scenarios, this guide provides necessary updates to help you make the right changes without rebuilding your entire codebase. > [!NOTE] > @@ -73,6 +73,8 @@ You can collaborate with external members outside of your organization using sha > [!NOTE] > The [activity feed notification API](/graph/teams-send-activityfeednotifications) doesn't support cross-tenant notifications for apps in a shared channel. +## Manage Shared Channel Membership + ### Get shared channel membership You can get direct shared channel membership by using the `hostTeamGroupID` from `getContext` and following these steps: From a50fdd9308ebfe556f80506ae5be4e08061a157c Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 11 Sep 2025 17:40:00 +0530 Subject: [PATCH 41/45] Update shared-channels.md --- .../build-and-test/shared-channels.md | 173 +++++++++++++++--- 1 file changed, 151 insertions(+), 22 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index aec21e9e96c..35e47eea4a8 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -24,13 +24,15 @@ You can enable app support for shared and private channels based on whether your If it doesn't follow the preceding parameters, perform the following steps to enable app support in shared and private channels: 1. Add ```"supportsChannelFeatures": "tier1"``` to your app manifest to enable support for shared and private channels. -2. Test your app in standard, private, and shared channels to verify expected behavior. +2. To verify expected behavior, test your app in standard, private, and shared channels. If your app uses any of the preceding features: -Continue reading for specific updates and best practices to help your app run smoothly across all channel types. +For more information, see the following articles: -For most apps, only a small update is needed. If your app involves more complex scenarios, this guide provides necessary updates to help you make the right changes without rebuilding your entire codebase. +* [Manage Shared Channel Membership](#manage-shared-channel-membership) +* [Apps and permissions in shared channels](#apps-and-permissions-in-shared-channels) +* [Verify if your app is added to a channel](#verify-if-your-app-is-added-to-a-channel) > [!NOTE] > @@ -43,6 +45,8 @@ Teams Connects shared channels facilitate secure collaboration seamlessly. Allow ## Teams channels – capabilities comparison +Let's see how Teams channels type differ in their capabilities. + | **Category** | **Capability** | **Standard channel** | **Private channel** | **Shared channel** | |--------------|----------------------------------------------------------------------------------|----------------------|---------------------|---------------------| | **Membership** | Can add people to the channel without adding to the host team | :x: | :x: | :white_check_mark: | @@ -66,13 +70,6 @@ For more information to enable your tab, see: * [Get context for your tab for private channels](../../tabs/how-to/access-teams-context.md#retrieve-context-in-private-channels) * [Get context in shared channels](../../tabs/how-to/access-teams-context.md#get-context-in-shared-channels) -## Apps and permissions in shared channels - -You can collaborate with external members outside of your organization using shared channels. App permissions in shared channels follow the host team's app roster and host tenant's app policy. - -> [!NOTE] -> The [activity feed notification API](/graph/teams-send-activityfeednotifications) doesn't support cross-tenant notifications for apps in a shared channel. - ## Manage Shared Channel Membership ### Get shared channel membership @@ -135,13 +132,53 @@ This subscription enables apps to monitor membership changes in shared channels When a new member is added to a shared channel, the ```OnMembersAddedAsync``` method is called. This method provides the context and details of the user who was added, allowing the bot to respond accordingly. ```csharp -public async Task OnMembersAddedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) + protected override async Task OnTeamsMembersAddedAsync( + IList membersAdded, + TeamInfo teamInfo, + ITurnContext turnContext, + CancellationToken cancellationToken) + { + var extended = turnContext.Activity.GetChannelData(); + var source = extended?.MembershipSource + ?? (turnContext.Activity.ChannelData as JObject)?["membershipSource"]?.ToObject(); + + if (source != null) + { + _logger.LogInformation("MemberAdded via {SourceType} ({MembershipType}). SourceId={Id}, TeamGroupId={TeamGroupId}, TenantId={TenantId}", + source.SourceType, source.MembershipType, source.Id, source.TeamGroupId, source.TenantId); + + await turnContext.SendActivityAsync( + MessageFactory.Text($"👤 Member added via **{source.SourceType}** ({source.MembershipType})."), + cancellationToken); + } + + await base.OnTeamsMembersAddedAsync(membersAdded, teamInfo, turnContext, cancellationToken); ``` Similarly, when a member is removed from the channel, the ```OnMembersRemovedAsync``` method is called. This method allows the bot to handle clean-up tasks or adjust access controls as needed. ```csharp -public async Task OnMembersRemovedAsync(ITurnContext turnContext, AppState turnState, CancellationToken cancellationToken) + protected override async Task OnTeamsMembersRemovedAsync( + IList membersRemoved, + TeamInfo teamInfo, + ITurnContext turnContext, + CancellationToken cancellationToken) + { + var source = turnContext.Activity.GetChannelData()?.MembershipSource + ?? (turnContext.Activity.ChannelData as JObject)?["membershipSource"]?.ToObject(); + + if (source != null) + { + _logger.LogInformation("MemberRemoved via {SourceType} ({MembershipType}). SourceId={Id}, TeamGroupId={TeamGroupId}, TenantId={TenantId}", + source.SourceType, source.MembershipType, source.Id, source.TeamGroupId, source.TenantId); + + await turnContext.SendActivityAsync( + MessageFactory.Text($"👋 Member removed (source **{source.SourceType}**, {source.MembershipType})."), + cancellationToken); + } + + await base.OnTeamsMembersRemovedAsync(membersRemoved, teamInfo, turnContext, cancellationToken); + } ``` These Bot Framework endpoints are essential for monitoring membership changes and maintaining accurate membership data across shared and private channel. @@ -183,11 +220,103 @@ The sharedWithTeams subscription sends a single notification when a channel is s ### [Bot Framework](#tab/botframework-bulk) -When a shared channel is added to another team, the Bot Framework may receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. +When a shared channel is added to another team, the Bot Framework might receive a conversationUpdate activity through the ```OnConversationUpdateActivityAsync``` method, but only if the bot is installed in the team or channel. + +```csharp + protected override async Task OnConversationUpdateActivityAsync( + ITurnContext turnContext, + CancellationToken cancellationToken) + { + // Always present on Teams activities + var tcd = turnContext.Activity.GetChannelData(); + var eventType = tcd?.EventType?.ToLowerInvariant(); + + // Read extended shared-channel shape (safe even if fields are absent) + var extended = turnContext.Activity.GetChannelData(); + + // Also keep a raw JObject for logging / future-proof access + var raw = turnContext.Activity.ChannelData as JObject + ?? (turnContext.Activity.ChannelData != null + ? JObject.FromObject(turnContext.Activity.ChannelData) + : new JObject()); + + // Helpful baseline log + _logger.LogInformation("ConversationUpdate eventType={EventType}, channelId={ChannelId}, teamId={TeamId}", + eventType, tcd?.Channel?.Id, tcd?.Team?.Id); + + switch (eventType) + { + case "channelshared": + { + var hostTeam = extended?.Team; // The channel's host team + var sharedWith = extended?.SharedWithTeams ?? new List(); + + _logger.LogInformation("ChannelShared: hostTeam={HostTeamId}, sharedWithCount={Count}", + hostTeam?.Id, sharedWith.Count); + + foreach (var team in sharedWith) + { + _logger.LogInformation("SharedWithTeam: id={Id}, name={Name}, aadGroupId={AadGroupId}, tenantId={TenantId}", + team.Id, team.Name, team.AadGroupId, team.TenantId); + } + + // Optional: surface a quick confirmation in-channel + await turnContext.SendActivityAsync( + MessageFactory.Text($"✅ Channel shared with {sharedWith.Count} team(s)."), + cancellationToken); + break; + } + + case "channelunshared": + { + var unsharedFrom = extended?.UnsharedFromTeams ?? new List(); + + _logger.LogInformation("ChannelUnshared: unsharedFromCount={Count}", unsharedFrom.Count); + + foreach (var team in unsharedFrom) + { + _logger.LogInformation("UnsharedFromTeam: id={Id}, name={Name}, aadGroupId={AadGroupId}, tenantId={TenantId}", + team.Id, team.Name, team.AadGroupId, team.TenantId); + } + + await turnContext.SendActivityAsync( + MessageFactory.Text($"❎ Channel unshared from {unsharedFrom.Count} team(s)."), + cancellationToken); + break; + } + + default: + // No-op; continue normal routing + break; + } + + await base.OnConversationUpdateActivityAsync(turnContext, cancellationToken); + } +``` --- -## Authenticate external users to access your app content in sharepoint +## Apps and permissions in shared channels + +You can collaborate with external members outside of your organization using shared channels. App permissions in shared channels follow the host team's app roster and host tenant's app policy. + +> [!NOTE] +> The [activity feed notification API](/graph/teams-send-activityfeednotifications) doesn't support cross-tenant notifications for apps in a shared channel. + +## Verify if your app is added to a channel + +For bots using the Bot Framework SDK, if your bot receives a channelMemberAdded event in a conversationUpdate activity for itself, it indicates that the app is added to the channel. +Begin your channel-specific logic at that point, for example, send a welcome message, fetch the roster, configure tabs, or schedule jobs as needed. Bot events start flowing only after the app is added to the channel + +There’s no direct API to check whether your app is added to a channel. + +> [!NOTE] +> +> * Use ```GET /teams/{team-id}/installedApps```, to list installed apps at the team level. +> * Channel level InstalledApps aren't listed. +> * Avoid using team-level installations to determine which apps are in a channel. + +## Authenticate external users to access app content in SharePoint You need to complete this step when your app stores content in the SharePoint site of the tenant that hosts the channel and requests a SharePoint token. @@ -211,7 +340,7 @@ For guests, “roles” = “guest” ## Microsoft Entra native identity -Apps must function cross-tenants in installation and usage. The following table lists the channel types and their corresponding group ids: +Apps must function cross-tenants in installation and usage. The following table lists the channel types and their corresponding group IDs: |Channel type| groupId | hostTeamGroupId | |----------|---------|-----------------| @@ -252,7 +381,7 @@ If you're developing an app for use in federated group chats with external users
Why isn’t the app visible when trying to add it to a channel? -If an app isn’t visible when trying to add it to a channel, there are a few likely causes. The app manifest might be missing required support, such as "supportsChannelFeatures": tier1, which enables compatibility with channel features. Additionally, the installer might not have sufficient permissions, only team members or owners can add apps, and local policies must allow app installation. If the channel is an incoming shared channel (shared into a team), apps cannot be added directly from that location. In such cases, switch to the host team to add the app to the channel. You can detect whether a channel is shared-in by checking the channel metadata for the host team ID. +If an app isn’t visible when trying to add it to a channel, there are a few likely causes. The app manifest might be missing required support, such as "supportsChannelFeatures": tier1, which enables compatibility with channel features. Additionally, the installer might not have sufficient permissions, only team members or owners can add apps, and local policies must allow app installation. If the channel is an incoming shared channel (shared into a team), apps can't be added directly from that location. In such cases, switch to the host team to add the app to the channel. You can detect whether a channel is shared-in by checking the channel metadata for the host team ID.
  @@ -260,7 +389,7 @@ If an app isn’t visible when trying to add it to a channel, there are a few li
Why am I getting a 403 error stating "app not enabled in this channel" when calling channel APIs? -A 403 error stating "app not enabled in this channel" typically occurs when the app is installed at the team level but is not added to the specific channel. To resolve this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ChannelMember.Read.Group for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel. +You’ll see a 403 error saying "app not enabled in this channel" if the app is installed at the team level but hasn’t been added to the channel. To resolve this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ChannelMember.Read.Group for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel.
  @@ -268,13 +397,13 @@ A 403 error stating "app not enabled in this channel" typically occurs when the
Why does the channel roster appear incomplete, showing only owners or missing users? -If the channel roster appears incomplete showing only owners or missing users, it might be due to using the team members API instead of the correct channel-specific API. To resolve this issue, use the /channels/{id}/allMembers API to retrieve the full channel roster. If the response still shows only owners, the app likely is not added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster. +If the channel roster appears incomplete showing only owners or missing users, it might be due to using the team members API instead of the correct channel-specific API. To resolve this issue, use the /channels/{id}/allMembers API to retrieve the full channel roster. If the response still shows only owners, the app likely isn't added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster.
 
-Why does file access fail for some users even though they are part of the channel? +Why does file access fail for some users even though they're part of the channel? This failure can happen if the app is using the team’s main SharePoint site instead of the specific site linked to the channel. Your organization’s sharing policies might block the type of link, or external users might lack the necessary permissions. To resolve this issue, make sure your app uses the channel’s filesFolder property to get the correct driveId and itemId for file operations. When sharing files, use "people with existing access" links or the /invite API to give access to specific users or groups. @@ -284,7 +413,7 @@ This failure can happen if the app is using the team’s main SharePoint site in
Why are external users experiencing authentication issues in tabs or task modules? -Authentication issues in tabs or task modules for external users often occur when the app requests a token for the host tenant instead of the user’s home tenant. To resolve this issue, check whether the user is external by comparing context.user.tenant.id with the host or owner tenant ID. If they are different, the user is external, and your app should request the token for the user’s home tenant. You can do this by passing the correct tenant ID (tid) when calling getAuthToken. +Authentication issues in tabs or task modules for external users often occur when the app requests a token for the host tenant instead of the user’s home tenant. To resolve this authentication issue, check whether the user is external by comparing context.user.tenant.id with the host or owner tenant ID. If they're different, the user is external, and your app should request the token for the user’s home tenant. You can do this by passing the correct tenant ID (tid) when calling getAuthToken.
  @@ -292,7 +421,7 @@ Authentication issues in tabs or task modules for external users often occur whe
How do I know my app was added to a channel? -This issue might occur if the app is expecting a centralized list of installed apps at the channel level or relying on team-level installation behavior. Currently, there is no channel-level installedApps list available. Bots should instead listen for the channelMemberAdded event within the channel to detect when they are added. If the app doesn’t receive the event and gets a 403 error, it prompts the user to add the bot to the channel and handles the error. +This issue might occur if the app is expecting a centralized list of installed apps at the channel level or relying on team-level installation behavior. Currently, there's no channel-level installedApps list available. Bots should instead listen for the channelMemberAdded event within the channel to detect when they're added. When the app gets a 403 error and misses the event, it asks the user to add the bot to the channel and manages the error.
  @@ -308,7 +437,7 @@ Message change notifications might fail in shared or private channels because su
Why do file links still fail for external users even after the app is added to the channel? -This can happen if the type of link being used is not allowed by the tenant’s sharing policy, or if the user hasn’t been granted access to the specific item, despite being a member of the channel. Another common cause is that the app might have generated links pointing to the team drive instead of the channel’s dedicated drive. To resolve this issue, reissue the links using the "people with existing access" option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. +This happens when the tenant’s sharing policy blocks the link type, or when the user doesn’t have access to the item—even if they’re a member of the channel. Another common cause is that the app might generate links pointing to the team drive instead of the channel’s dedicated drive. To resolve this issue, reissue the links using the "people with existing access" option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. ## See also From 10754860bd50a3a7cf6c72d7e21b9a900509835c Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 11 Sep 2025 18:25:53 +0530 Subject: [PATCH 42/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 35e47eea4a8..55ee0491a51 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -26,9 +26,7 @@ If it doesn't follow the preceding parameters, perform the following steps to en 1. Add ```"supportsChannelFeatures": "tier1"``` to your app manifest to enable support for shared and private channels. 2. To verify expected behavior, test your app in standard, private, and shared channels. -If your app uses any of the preceding features: - -For more information, see the following articles: +If your app uses any of the preceding features, see the following articles, for more information: * [Manage Shared Channel Membership](#manage-shared-channel-membership) * [Apps and permissions in shared channels](#apps-and-permissions-in-shared-channels) @@ -381,7 +379,7 @@ If you're developing an app for use in federated group chats with external users
Why isn’t the app visible when trying to add it to a channel? -If an app isn’t visible when trying to add it to a channel, there are a few likely causes. The app manifest might be missing required support, such as "supportsChannelFeatures": tier1, which enables compatibility with channel features. Additionally, the installer might not have sufficient permissions, only team members or owners can add apps, and local policies must allow app installation. If the channel is an incoming shared channel (shared into a team), apps can't be added directly from that location. In such cases, switch to the host team to add the app to the channel. You can detect whether a channel is shared-in by checking the channel metadata for the host team ID. +If an app isn’t visible when trying to add it to a channel, there are a few likely causes. The app manifest might be missing required support, such as ```"supportsChannelFeatures": tier1```, which enables compatibility with channel features. Additionally, the installer might not have sufficient permissions, only team members or owners can add apps, and local policies must allow app installation. If the channel is an incoming shared channel (shared into a team), apps can't be added directly from that location. In such cases, switch to the host team to add the app to the channel. You can detect whether a channel is shared-in by checking the channel metadata for the host team ID.
  @@ -389,7 +387,7 @@ If an app isn’t visible when trying to add it to a channel, there are a few li
Why am I getting a 403 error stating "app not enabled in this channel" when calling channel APIs? -You’ll see a 403 error saying "app not enabled in this channel" if the app is installed at the team level but hasn’t been added to the channel. To resolve this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ChannelMember.Read.Group for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel. +You’ll see a 403 error saying "app not enabled in this channel" if the app is installed at the team level but hasn’t been added to the channel. To resolve this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ```ChannelMember.Read.Group``` for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel.
  @@ -397,7 +395,7 @@ You’ll see a 403 error saying "app not enabled in this channel" if the app is
Why does the channel roster appear incomplete, showing only owners or missing users? -If the channel roster appears incomplete showing only owners or missing users, it might be due to using the team members API instead of the correct channel-specific API. To resolve this issue, use the /channels/{id}/allMembers API to retrieve the full channel roster. If the response still shows only owners, the app likely isn't added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster. +If the channel roster appears incomplete showing only owners or missing users, it might be due to using the team members API instead of the correct channel-specific API. To resolve this issue, use the ```/channels/{id}/allMembers``` API to retrieve the full channel roster. If the response still shows only owners, the app likely isn't added to the channel. Prompt the user to add the app to the channel, then retry the request to fetch the updated roster.
  @@ -413,7 +411,7 @@ This failure can happen if the app is using the team’s main SharePoint site in
Why are external users experiencing authentication issues in tabs or task modules? -Authentication issues in tabs or task modules for external users often occur when the app requests a token for the host tenant instead of the user’s home tenant. To resolve this authentication issue, check whether the user is external by comparing context.user.tenant.id with the host or owner tenant ID. If they're different, the user is external, and your app should request the token for the user’s home tenant. You can do this by passing the correct tenant ID (tid) when calling getAuthToken. +Authentication issues in tabs or task modules for external users often occur when the app requests a token for the host tenant instead of the user’s home tenant. To resolve this authentication issue, check whether the user is external by comparing ```context.user.tenant.id``` with the host or owner tenant ID. If they're different, the user is external, and your app should request the token for the user’s home tenant. You can do this by passing the correct tenant ID (tid) when calling getAuthToken.
  @@ -429,7 +427,7 @@ This issue might occur if the app is expecting a centralized list of installed a
Why is my app failing to create message change notifications in shared or private channels? -Message change notifications might fail in shared or private channels because subscriptions to /channels/{id}/messages are blocked when using resource-specific consent (RSC) in these types of channels. If your app encounters a 403 error when attempting to create a subscription, this behavior is expected. To resolve this issue, use on-demand message reads after the app is successfully added to the channel. +Message change notifications might fail in shared or private channels because subscriptions to ```/channels/{id}/messages``` are blocked when using resource-specific consent (RSC) in these types of channels. If your app encounters a 403 error when attempting to create a subscription, this behavior is expected. To resolve this issue, use on-demand message reads after the app is successfully added to the channel.
  @@ -437,7 +435,7 @@ Message change notifications might fail in shared or private channels because su
Why do file links still fail for external users even after the app is added to the channel? -This happens when the tenant’s sharing policy blocks the link type, or when the user doesn’t have access to the item—even if they’re a member of the channel. Another common cause is that the app might generate links pointing to the team drive instead of the channel’s dedicated drive. To resolve this issue, reissue the links using the "people with existing access" option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. +This happens when the tenant’s sharing policy blocks the link type, or when the user doesn’t have access to the item, even if they’re a member of the channel. Another common cause is that the app might generate links pointing to the team drive instead of the channel’s dedicated drive. To resolve this issue, reissue the links using the "people with existing access" option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. ## See also From ac9761a74ca0b09e846d3eb45aabbc4033d6c3ad Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 11 Sep 2025 18:32:18 +0530 Subject: [PATCH 43/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 55ee0491a51..20fda6f55e9 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -12,7 +12,7 @@ ms.date: 04/09/2025 Shared and private channels in Microsoft Teams enable flexible collaboration within and across teams or organizations. Shared channels allow seamless communication with internal or external partners. Private channels provide a secure space for selected team members to collaborate on sensitive or confidential content, ensuring privacy and focused discussions within the team. -## Enable apps support for shared and private channels +## Enable app support for shared and private channels You can enable app support for shared and private channels based on whether your app is: From 61b12534b9ff1adf22131059d2b01372d02ca487 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Thu, 11 Sep 2025 22:49:37 +0530 Subject: [PATCH 44/45] Update shared-channels.md --- .../concepts/build-and-test/shared-channels.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index 20fda6f55e9..bfed1f260b7 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -29,7 +29,7 @@ If it doesn't follow the preceding parameters, perform the following steps to en If your app uses any of the preceding features, see the following articles, for more information: * [Manage Shared Channel Membership](#manage-shared-channel-membership) -* [Apps and permissions in shared channels](#apps-and-permissions-in-shared-channels) +* [Understand app permissions in shared channels](#understand-app-permissions-in-shared-channels) * [Verify if your app is added to a channel](#verify-if-your-app-is-added-to-a-channel) > [!NOTE] @@ -294,7 +294,7 @@ When a shared channel is added to another team, the Bot Framework might receive --- -## Apps and permissions in shared channels +## Understand app permissions in shared channels You can collaborate with external members outside of your organization using shared channels. App permissions in shared channels follow the host team's app roster and host tenant's app policy. @@ -387,7 +387,7 @@ If an app isn’t visible when trying to add it to a channel, there are a few li
Why am I getting a 403 error stating "app not enabled in this channel" when calling channel APIs? -You’ll see a 403 error saying "app not enabled in this channel" if the app is installed at the team level but hasn’t been added to the channel. To resolve this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ```ChannelMember.Read.Group``` for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the channelMemberAdded event to confirm it has been successfully added to the channel. +You’ll see a 403 error saying "app not enabled in this channel" if the app is installed at the team level but hasn’t been added to the channel. To resolve this issue, first confirm that the app is explicitly added to the channel. If your app uses resource-specific consent (RSC), verify that the permissions declared in the manifest match the API calls being made, for example, ```ChannelMember.Read.Group``` for reading channel membership. After adding the app, retry the operation. For bots, initiate channel-specific logic when the bot receives the ```channelMemberAdded``` event to confirm it has been successfully added to the channel.
  @@ -403,7 +403,7 @@ If the channel roster appears incomplete showing only owners or missing users, i
Why does file access fail for some users even though they're part of the channel? -This failure can happen if the app is using the team’s main SharePoint site instead of the specific site linked to the channel. Your organization’s sharing policies might block the type of link, or external users might lack the necessary permissions. To resolve this issue, make sure your app uses the channel’s filesFolder property to get the correct driveId and itemId for file operations. When sharing files, use "people with existing access" links or the /invite API to give access to specific users or groups. +This failure can happen if the app is using the team’s main SharePoint site instead of the specific site linked to the channel. Your organization’s sharing policies might block the type of link, or external users might lack the necessary permissions. To resolve this issue, make sure your app uses the channel’s filesFolder property to get the correct driveId and itemId for file operations. When sharing files, use "people with existing access" links or the invite API to give access to specific users or groups.
  @@ -435,7 +435,7 @@ Message change notifications might fail in shared or private channels because su
Why do file links still fail for external users even after the app is added to the channel? -This happens when the tenant’s sharing policy blocks the link type, or when the user doesn’t have access to the item, even if they’re a member of the channel. Another common cause is that the app might generate links pointing to the team drive instead of the channel’s dedicated drive. To resolve this issue, reissue the links using the "people with existing access" option or use the /invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. +This happens when the tenant’s sharing policy blocks the link type, or when the user doesn’t have access to the item, even if they’re a member of the channel. Another common cause is that the app might generate links pointing to the team drive instead of the channel’s dedicated drive. To resolve this issue, reissue the links using the "people with existing access" option or use the invite API to grant access to specific users. Also, make sure the links reference the channel drive, which can be identified using the filesFolder property, rather than the team site. ## See also From 556ffdbd57f81f550b8e401c6b21b2d9948973e4 Mon Sep 17 00:00:00 2001 From: KirtiJha-MSFT Date: Fri, 12 Sep 2025 13:43:24 +0530 Subject: [PATCH 45/45] Update shared-channels.md --- msteams-platform/concepts/build-and-test/shared-channels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msteams-platform/concepts/build-and-test/shared-channels.md b/msteams-platform/concepts/build-and-test/shared-channels.md index bfed1f260b7..91ac474838a 100644 --- a/msteams-platform/concepts/build-and-test/shared-channels.md +++ b/msteams-platform/concepts/build-and-test/shared-channels.md @@ -28,7 +28,7 @@ If it doesn't follow the preceding parameters, perform the following steps to en If your app uses any of the preceding features, see the following articles, for more information: -* [Manage Shared Channel Membership](#manage-shared-channel-membership) +* [Manage Shared and Private Channel Membership](#manage-shared-channel-membership) * [Understand app permissions in shared channels](#understand-app-permissions-in-shared-channels) * [Verify if your app is added to a channel](#verify-if-your-app-is-added-to-a-channel) @@ -68,7 +68,7 @@ For more information to enable your tab, see: * [Get context for your tab for private channels](../../tabs/how-to/access-teams-context.md#retrieve-context-in-private-channels) * [Get context in shared channels](../../tabs/how-to/access-teams-context.md#get-context-in-shared-channels) -## Manage Shared Channel Membership +## Manage Shared and Private Channel Membership ### Get shared channel membership