Forum Discussion

adamhouck's avatar
adamhouck
Copper Contributor
Mar 19, 2020

How to have app send message to channel without configuring connector

I know it is possible as Monday.com and Smartsheet integrations both do this. You can configure the app by allowing `adminconsent` and then selecting (on the web-service not in teams) which team & channel to have the service post to. Then the web application is able to make posts into that channel without the user configuring a connector/webhook.  In addition when I look into the channel that was mapped, there is no connector configured.

These apps have the exact functionality I'm looking for, and so far the only way to do this that I know of is to use the /messages graph api found here or to configure a connector.

The /messages api cannot be used by the application as far as I can tell. Though Monday.com appears to have a disclaimer that they are utilizing the beta features of the graph api.

So how can I have my Teams app send a message to a specific channel within an organization without having to have the user configure a connector?

    • adamhouck's avatar
      adamhouck
      Copper Contributor

      subhasish-MSFT  thank you, this is exactly what I was looking for. At first I dismissed this approach because I didn't realize a ConversationUpdate event was fired when the app was installed, I thought it needed direct user input.

       

      That being said if I save the Conversation Reference from the initial app installation, can I use that indefinitely to post in other channels of the Team, or will it expire at some point like an Oauth Token?

      • subhasish-MSFT's avatar
        subhasish-MSFT
        Icon for Microsoft rankMicrosoft

        adamhouck , You have to store the team Id, tenant Id, conversation Id(in case of personal scope). These are unique Ids and can be stored indefinite time.  

Resources