1
votes

Is there a way to send a message on behalf of a user either in private chat or channel. In my case, the admin gives both application and delegated permission for the app. When the admin is part of the chat/channel, the messages are delivered correctly using MS Graph API but when the chat happens between 2 other signed-in users where the admin is not involved, I am not able to send the message as any of the user. I get UnknownError/Unauthorized since the token which is generated is related to admin user.

If we cannot send a message on behalf of a user using MS Graph is there any other way to achieve this. Can MS Bot take care of this scenario? Will each user have to install the bot so that it can send the message even if the Bot is not part of the conversation?

1
Hi@aikadakh. How did you solve this problem finally?Joseph Xu

1 Answers

0
votes

If we cannot send a message on behalf of a user using MS Graph is there any other way to achieve this.

You can send chat message using Graph APIs. To send message on behalf of a user, your app must get consent from each individual users. Application permission is currently not supported.

Will each user have to install the bot so that it can send the message even if the Bot is not part of the conversation?

It's a good idea to build Bot and send notifications instead of sending it from one of the user's account. You can use Proactive message to send message. In order to send message, your Bot needs to be installed for each user.

Could you please elaborate more on scenario? Are you looking for something similar to Company Communicator?