You cannot send messages to a chat if using Application permissions. Configure your app with delegated permissions and enable "Public client flows" Then you will be able to send messages.
Remember to assign the following delegated permissions:
Chat.ReadWrite
Chat.Create
User.Read
User.ReadBasic.All