Microsoft Teams API to post a message in a channel on behalf of the Application

Copper Contributor

Hello everyone,

 

I am new to Graph APIs and this might be a stupid question to ask but we have a requirement displaying all the channel names in a dropdown in a group and then when user selected a channel based on a button click we need to post some information about our app in the Teams channel user selected. Now to make is seamless we want to try it without making a user sign in so they don't have to sign in every-time. 

 

I checked the Graph APIs but ChannelMessage does not let you SEND a message to a channel without signed in user. Is there a way we can achieve this without asking user to sign in? 

 

Also I see the application level permission have something called "Chat.ReadWriteAll", is it something we can utilize? 

 

Any help is deeply appreciated.

 

Thanks,

Akshat

1 Reply

@AkshatGandhi 

 

I would think that the API would have to have user context to be able to verify permissions to post as well as create the post with the correct user identity for other users to see. 

 

If your goal is to avoid the person using the app having to sign in, then you'd likely have use an internal user whose purpose was to post such "public" messages. Still would be a user, but one used by the app itself, not the person whose fingers were on the device.