Bewerken

Delen via


Microsoft Teams Connect shared 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:

  • Members of another team within the same organization.
  • Individuals within the same organization.
  • Individuals and other teams of other organizations.

Note

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.

Diagram that shows Team B from organization A and Team C from organization B collaborating in a shared Channel as Team A.

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 may 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:

  1. Get direct members with GET channel members API API.

    GET /teams/{host-team-group-id}/channels/{channel-id}/members
    
  2. Get each shared team with GET sharedWithTeams API.

    GET /teams/{host-team-group-id}/channels/{channel-id}/sharedWithTeams
    
  3. 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:

  1. Get the member you wish to compare.

    GET /teams/{host-team-group-id}/channels/{channel-id}/members
    
  2. Use getContext, compare the tenantID of the member to the hostTenantID 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

See also