Forum Discussion

DVTitov's avatar
DVTitov
Copper Contributor
Nov 27, 2021
Solved

Send personal messages to Teams from daemon service.

Hello, I need to send notifications to my colleagues using Teams in case of emergency which is detected by monitoring system. These messages must be sent on behalf of background service which cannot follow interactive user authentication flow and therefore cannot get Authorization Code to authenticate on behalf of user.

I can connect to Azure AD using Graph SDK for Golang and get all users of my organization. But I cannot use Chat API because it's not allowed in "application only context".

Is there a way to send personal user messages from daemon service?

  • DVTitov - We got a confirmation from engineering team that
    "To post as a background service, the user must use a bot."

    So currently we do not have any way to send the direct message to user using Graph API.

    Thanks, 

    Chetan Sharma

    ----------------------------------------------------------------------------------------

    If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate. 

Resources