Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Note
- Tab apps in shared channels are available in Government Community Cloud (GCC), GCC High, Department of Defense (DoD), and Teams operated by 21Vianet 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.
Enable your app for shared channels
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.
"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.
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.
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.
Note
The activity feed notification API 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:
Get direct members with GET channel members API API.
GET /teams/{host-team-group-id}/channels/{channel-id}/members
Get each shared team with GET
sharedWithTeams
API.GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams
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
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:
Get the member you wish to compare.
GET /teams/{host-team-group-id}/channels/{channel-id}/members
Use
getContext
, compare thetenantID
of the member to thehostTenantID
property.
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:
Channel type | groupId | hostTeamGroupId |
---|---|---|
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
Note
- Apps in federated group chats with external users aren't available in Government Community Cloud (GCC), GCC High, Department of Defense (DoD), and Teams operated by 21Vianet environments.
- Apps aren't supported in one-on-one chats, channels, or meetings with external users.
Teams supports the use of apps in federated group chats with external users. These users can't add, update, or remove apps from the group chat. Only the host of the group chat can add, update, or remove apps. However, all members of the chat, including external users, can use apps under the following conditions:
- The tenant admin of the group chat host's organization and the tenant admin of the external user's organization must allow the use of the app in federated group chats. For more information, see Teams apps for external attendees or guests from outside an organization.
- The app allows access to external users in federated group chats.
If you're developing an app for use in federated group chats with external users, register your app as a multitenant app in Microsoft Entra ID. This action allows users across multiple organizations to access your app.
Note
If you want to test the code sample with an external user in a federated group chat, you must first add the external user as a guest to your tenant. For more information, see Quickstart: Add a guest user and send an invitation. After adding the user to the tenant, go to the federated group chat and add the guest to test the app.
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 |
See also
- Build tabs for Teams
- App manifest schema for Teams
- Shared channels in Microsoft Teams
- Channel resource type
- Retention policy for Teams locations
- Use guest access and external access to collaborate with people outside your organization
- Manage external meetings and chat with people and organizations using Microsoft identities
Platform Docs