TeamsBotInstallation class  
Warning
This API is now deprecated.
This package will be deprecated by 2026-07. Please use Microsoft 365 Agents SDK instead.
A NotificationTarget that represents a bot installation. Teams Bot could be installed into
- Personal chat
- Group chat
- Team (by default the Generalchannel)
Remarks
It's recommended to get bot installations from <xref:ConversationBot.installations()>.
Constructors
| Teams | Constructor | 
Properties
| adapter | The bound  | 
| bot | The bot app id. | 
| conversation | The bound  | 
| type | Notification target type. | 
Methods
| channels() | Get channels from this bot installation. | 
| get | Gets a pagined list of members from this bot installation. | 
| get | Get team details from this bot installation | 
| send | Send an adaptive card message. | 
| send | Send a plain text message. | 
Constructor Details
		TeamsBotInstallation(CloudAdapter, Partial<ConversationReference>, string)
	    
	Constructor
new TeamsBotInstallation(adapter: CloudAdapter, conversationReference: Partial<ConversationReference>, botAppId: string)Parameters
- adapter
- CloudAdapter
The bound CloudAdapter.
- conversationReference
- 
				Partial<ConversationReference> 
The bound ConversationReference.
- botAppId
- 
				string 
The bot app id.
Remarks
It's recommended to get bot installations from <xref:ConversationBot.installations()>, instead of using this constructor.
Property Details
adapter
		botAppId
	  
	The bot app id.
botAppId: stringProperty Value
string
		conversationReference
	 
	The bound ConversationReference.
conversationReference: Partial<ConversationReference>Property Value
Partial<ConversationReference>
type
Notification target type.
type?: NotificationTargetTypeProperty Value
Remarks
- "Channel" means bot is installed into a team and notification will be sent to its "General" channel.
- "Group" means bot is installed into a group chat.
- "Person" means bot is installed into a personal scope and notification will be sent to personal chat.
Method Details
channels()
Get channels from this bot installation.
function channels(): Promise<Channel[]>Returns
Promise<Channel[]>
An array of channels if bot is installed into a team, otherwise returns an empty array.
		getPagedMembers(number, string)
	  
	Gets a pagined list of members from this bot installation.
function getPagedMembers(pageSize?: number, continuationToken?: string): Promise<PagedData<Member>>Parameters
- pageSize
- 
				number 
Suggested number of entries on a page.
- continuationToken
- 
				string 
A continuation token.
Returns
An array of members from where the bot is installed.
		getTeamDetails()
	  
	Get team details from this bot installation
function getTeamDetails(): Promise<undefined | TeamDetails>Returns
Promise<undefined | TeamDetails>
The team details if bot is installed into a team, otherwise returns undefined.
		sendAdaptiveCard(unknown, (context: TurnContext, error: Error) => Promise<void>)
	   
	Send an adaptive card message.
function sendAdaptiveCard(card: unknown, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>Parameters
- card
- 
				unknown 
The adaptive card raw JSON.
- onError
- 
				(context: TurnContext, error: Error) => Promise<void> 
An optional error handler that can catch exceptions during adaptive card sending.
If not defined, error will be handled by BotAdapter.onTurnError.
Returns
Promise<MessageResponse>
The response of sending adaptive card message.
		sendMessage(string, (context: TurnContext, error: Error) => Promise<void>)
	  
	Send a plain text message.
function sendMessage(text: string, onError?: (context: TurnContext, error: Error) => Promise<void>): Promise<MessageResponse>Parameters
- text
- 
				string 
The plain text message.
- onError
- 
				(context: TurnContext, error: Error) => Promise<void> 
An optional error handler that can catch exceptions during message sending.
If not defined, error will be handled by BotAdapter.onTurnError.
Returns
Promise<MessageResponse>
The response of sending message.