Sending incident from Sentinel to Teams

Laszlo Pal 35 Reputation points
2024-02-16T12:10:24.01+00:00

Hi, I'm struggling with some very simple automation where Sentinel incidents should be forwarded to Teams channelIn SOAR Essentials there are two solutions for this Post Message to Teams and Send Adaptive Card The first is simpler, it uses Microsoft Sentinel incident as a trigger, then based on this it will compose a simple post to the teams channel. It seems ok at least when I manually trigger the playbook on an incident, but it seems it is not triggered by incident creation The second is even more interesting (and to be honest for my usecase this is what I really need). When I manually trigger I'm getting the following error in 'Post Teams' step The request failed. Error code: 'BotRequestFailed'. Error Message: 'Request to the Bot framework failed with error: '{"error":{"code":"BotNotInConversationRoster","message":"The bot is not part of the conversation roster."}}'.'. Did anyone used any of these so can help me this issue? Thank you Laszlo

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,311 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,211 questions
Microsoft Sentinel
Microsoft Sentinel
A scalable, cloud-native solution for security information event management and security orchestration automated response. Previously known as Azure Sentinel.
1,159 questions
{count} vote

Accepted answer
  1. JamesTran-MSFT 36,636 Reputation points Microsoft Employee
    2024-02-16T20:27:20.8166667+00:00

    @Laszlo Pal

    Thank you for your detailed post!

    When walking through the Send-Teams-adaptive-card-on-incident-creation GitHub repo and testing the template that was deployed, I ran into the same permissions error. To hopefully help point you in the right direction, I'll share the troubleshooting steps I took to resolve the issue.

    Error Message
    Forbidden: The client '...5e59 with object id '...5e59' does not have authorization to perform action 'Microsoft.SecurityInsights/incidents/read' over scope '/subscriptions/....../incidents/c2243ad93967' or the scope is invalid....

    1. After reviewing the full error message, I double checked the connections that were deployed with the template and noticed that the MicrosoftSentinel-Send-Teams-adaptive-card-on-incident-creation API connection uses a Managed Identity. User's image
    2. Navigating to the Send-Teams-adaptive-card-on-incident-creation Logic App -> Identity, you should find that the Client ID and Object ID referenced within the error message is that of the Logic Apps' System Assigned Managed Identity. User's image
    3. Since the Playbook's Managed Identity doesn't have the correct permissions, I assigned the Microsoft Sentinel Responder role to it by selecting the Azure role assignments button. For more info.
      • Note: I also noticed that the Post Deployment section of the GitHub repo also details the required Managed Identity permissions.
      User's image

    User's image

    I hope this helps!

    If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.


    If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.