Teams webhook request workflow is posting as user and not flow bot

Kajandere, Jelena 55 Reputation points
2024-07-18T05:48:19.5833333+00:00

Hi,

With the deprecation of the O365 Connector looming, I am looking into replacing my existing webhook connections with a workflow. I created a "Post card in a chat or channel" workflow which is connected to my Teams account. I set "Post as" was set to "Flow bot," (snippet attached) workflow

expected behavior: post as the bot without including my user info in any cards that it posts. In reality it is posting the cards to the Teams channel as "Kajandere, Jelena" where I really just want it to post as a bot.

Could you please assist to resolve

Best Regards,

Jelena

Microsoft Teams Development
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. shroomy-6601 20 Reputation points
    2024-10-27T18:05:03.0466667+00:00

    It would be helpful to get some some guidance from Microsoft as to what is the best practice here.

    Using a user dependent account is a strange design choice.

    Webhooks are not carried out by a user. It is usually initiated by a service. So why give the impression that the webhook is sendt by the user?

    Furthermore, what happens if the user account is deactivated or deleted?

    Sure, one could make a dedicated service account, but this is usually considered bad form for most IT admins these days.

    3 people found this answer helpful.
    0 comments No comments

  2. Prasad-MSFT 8,981 Reputation points Microsoft External Staff Moderator
    2024-07-18T08:43:52.5466667+00:00

    This is by design.
    If you want to send by using option 'Flow bot', it will send as below
    User's image

    User's image

    If you want the sender's name only to be reflected without via Workflows text, you can choose below option while setting up/editing the workflow.
    User's image

    This will send the card as below:
    User's image


  3. EJ Marmonti 5 Reputation points
    2024-07-18T19:14:10.6433333+00:00

    @Kajandere, Jelena as I noted above, I had a similar issue. I found a workaround though! I created a new o365 account named "Teams Notifications" and, assigned it just enough of a license to use Teams. Then I added the account as a member to every Team. Then in PowerAutomate, I added a new Teams Connection using this account and assigned it to my workflow. Now the webhook alerts are no longer pinned to a specific user, but instead a service account. Further, I'm able to share the workflow and add co-owners to it so that I'm not the only person who has access to modify it.

    I'm not sure if that will solve your problem, but I hope it helps!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.