Search code examples
node.jsazurebotframeworkbotsproactive

Start a private Message to previously unkown user with Azure Web App Bot


I want to build a Notification System inside Microsoft Teams with a Web App Bot which should send notifcations to our employees. It should also work for users who never came in contact with my bot before.

The examples from Micrsoft shows the concept of proactive Messages but if i understand it correctly it always needs the user to start the initial conversation.

Is there any way to contact a user without this initial conversation? Maybe with using the Azure Active Directory?


Solution

  • In order to message a user, you must have a conversation reference. If the user has not interacted with the bot previously the bot will not have the conversation reference to proactively send a message.

    This is a feature by design to prevent spambots. I understand your use case is messaging people within your organization, but this is not a supported scenario.