Hi @Yan .
- You should set a Delegated permission for your app. Let users login and your app can send chat message via Graph APIs on behalf of a user. You should add delegated permission
ChatMessage.Send, Chat.ReadWrite
. - You can use ROPC flow which allows an application to sign in the user by directly handling their password.