Context interface

Properties

appSessionId

Unique ID for the current session for use in correlating telemetry data.

channelId

The Microsoft Teams ID for the channel with which the content is associated.

channelName

The name for the channel with which the content is associated.

channelRelativeUrl

The relative path to the SharePoint folder associated with the channel.

channelType

The type of the channel with which the content is associated.

chatId

The Microsoft Teams ID for the chat with which the content is associated.

entityId

The developer-defined unique ID for the entity this content points to.

groupId

The Office 365 group ID for the team with which the content is associated. This field is available only when the identity permission is requested in the manifest.

hostClientType

The type of the host client. Possible values are : android, ios, web, desktop, rigel

isFullScreen

Indication whether the tab is in full-screen mode.

isTeamArchived

Indicates whether team is archived. Apps should use this as a signal to prevent any changes to content associated with archived teams.

locale

The current locale that the user has configured for the app formatted as languageId-countryId (for example, en-us).

loginHint

A value suitable for use as a login_hint when authenticating with Azure AD. Because a malicious party can run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

parentMessageId

The ID of the parent message from which this task module was launched. This is only available in task modules launched from bot cards.

ringId

Current ring ID

sessionId

Unique ID for the current Teams session for use in correlating telemetry data.

sharepoint

SharePoint context. This is only available when hosted in SharePoint.

subEntityId

The developer-defined unique ID for the sub-entity this content points to. This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.

teamId

The Microsoft Teams ID for the team with which the content is associated.

teamName

The name for the team with which the content is associated.

teamSiteDomain

The domain of the root SharePoint site associated with the team.

teamSitePath

The relative path to the SharePoint site associated with the team.

teamSiteUrl

The root SharePoint site associated with the team.

teamType

The type of the team.

tenantSKU

The type of license for the current users tenant.

theme

The current UI theme.

tid

The Azure AD tenant ID of the current user. Because a malicious party can run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

upn
userLicenseType

The license type for the current user.

userObjectId

The Azure AD object id of the current user. Because a malicious party run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

userPrincipalName

The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users). Because a malicious party run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

userTeamRole

The user's role in the team. Because a malicious party can run your content in a browser, this value should be used only as a hint as to the user's role, and never as proof of her role.

Property Details

appSessionId

Unique ID for the current session for use in correlating telemetry data.

appSessionId?: string

Property Value

string

channelId

The Microsoft Teams ID for the channel with which the content is associated.

channelId?: string

Property Value

string

channelName

The name for the channel with which the content is associated.

channelName?: string

Property Value

string

channelRelativeUrl

The relative path to the SharePoint folder associated with the channel.

channelRelativeUrl?: string

Property Value

string

channelType

The type of the channel with which the content is associated.

channelType?: ChannelType

Property Value

chatId

The Microsoft Teams ID for the chat with which the content is associated.

chatId?: string

Property Value

string

entityId

The developer-defined unique ID for the entity this content points to.

entityId: string

Property Value

string

groupId

The Office 365 group ID for the team with which the content is associated. This field is available only when the identity permission is requested in the manifest.

groupId?: string

Property Value

string

hostClientType

The type of the host client. Possible values are : android, ios, web, desktop, rigel

hostClientType?: HostClientType

Property Value

isFullScreen

Indication whether the tab is in full-screen mode.

isFullScreen?: boolean

Property Value

boolean

isTeamArchived

Indicates whether team is archived. Apps should use this as a signal to prevent any changes to content associated with archived teams.

isTeamArchived?: boolean

Property Value

boolean

locale

The current locale that the user has configured for the app formatted as languageId-countryId (for example, en-us).

locale: string

Property Value

string

loginHint

A value suitable for use as a login_hint when authenticating with Azure AD. Because a malicious party can run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

loginHint?: string

Property Value

string

parentMessageId

The ID of the parent message from which this task module was launched. This is only available in task modules launched from bot cards.

parentMessageId?: string

Property Value

string

ringId

Current ring ID

ringId?: string

Property Value

string

sessionId

Unique ID for the current Teams session for use in correlating telemetry data.

sessionId?: string

Property Value

string

sharepoint

SharePoint context. This is only available when hosted in SharePoint.

sharepoint?: any

Property Value

any

subEntityId

The developer-defined unique ID for the sub-entity this content points to. This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.

subEntityId?: string

Property Value

string

teamId

The Microsoft Teams ID for the team with which the content is associated.

teamId?: string

Property Value

string

teamName

The name for the team with which the content is associated.

teamName?: string

Property Value

string

teamSiteDomain

The domain of the root SharePoint site associated with the team.

teamSiteDomain?: string

Property Value

string

teamSitePath

The relative path to the SharePoint site associated with the team.

teamSitePath?: string

Property Value

string

teamSiteUrl

The root SharePoint site associated with the team.

teamSiteUrl?: string

Property Value

string

teamType

The type of the team.

teamType?: TeamType

Property Value

tenantSKU

The type of license for the current users tenant.

tenantSKU?: string

Property Value

string

theme

The current UI theme.

theme?: string

Property Value

string

tid

The Azure AD tenant ID of the current user. Because a malicious party can run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

tid?: string

Property Value

string

upn

Warning

This API is now obsolete.

Use loginHint or userPrincipalName. The UPN of the current user. Because a malicious party can run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

upn?: string

Property Value

string

userLicenseType

The license type for the current user.

userLicenseType?: string

Property Value

string

userObjectId

The Azure AD object id of the current user. Because a malicious party run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

userObjectId?: string

Property Value

string

userPrincipalName

The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users). Because a malicious party run your content in a browser, this value should be used only as a hint as to who the user is and never as proof of identity. This field is available only when the identity permission is requested in the manifest.

userPrincipalName?: string

Property Value

string

userTeamRole

The user's role in the team. Because a malicious party can run your content in a browser, this value should be used only as a hint as to the user's role, and never as proof of her role.

userTeamRole?: UserTeamRole

Property Value