Skip to content

How to control and identify target channel/group for proactive notifications in multi-tenant Teams bot? #1957

Description

@gauravsarwal

I’m building a multi-tenant Microsoft Teams bot (published via marketplace most probably) that supports all scopes: personal (1:1), group chat, and channel.

My use case is to send proactive notifications (e.g., when a new ticket is created in my system), need approval for a ticket, SLA is breached etc.

Here’s where I’m confused:

A customer tenant can install my bot in multiple places:
Personal chat (multiple users)
Multiple group chats
Multiple channels across different teams
For proactive messaging, I understand that I must store the conversation reference (conversationId etc.) when the bot is installed or used.
However, if the bot is installed in, say, 5 different channels or in 10 groups, I don’t have any prior knowledge of which channel should receive notifications from my back end when something happened, for example a ticket is created from UI and assigned to 2 people etc.

My questions:

How do production-grade apps determine which channel (or scope) to send proactive notifications to when multiple installations exist?
Is there any built-in way in Teams to restrict installation to specific channels or groups, or must this always be handled in the app logic?

What is the recommended pattern for:

Mapping a Teams channel/group to a business entity (e.g., project, customer, ticket queue)?
Allowing customers to configure where notifications should go?
Should this be handled via:
A registration/configuration step inside Teams (e.g., bot command or adaptive card)?
Or via an external admin UI?

What I’m currently considering:

Capturing all conversation references on install (conversationUpdate)
Asking users to explicitly “register” a channel for notifications
Storing mapping like: Channel → Project/Customer → Notification Type

But I want to confirm if this is the recommended approach or if there’s a better/native way.

Any guidance, best practices, or real-world patterns would be very helpful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions