Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send-Teams-adaptive-card-on-incident-creation - Teams Sender Issue #11190

Open
Guruleenyc opened this issue Sep 26, 2024 · 6 comments
Open

Send-Teams-adaptive-card-on-incident-creation - Teams Sender Issue #11190

Guruleenyc opened this issue Sep 26, 2024 · 6 comments
Assignees
Labels
Playbook Playbook specialty review needed

Comments

@Guruleenyc
Copy link

I got the Send-Teams-adaptive-card-on-incident-creation working with the Playbook and Automation rule, BUT the Logic App is using my account to send to Teams channel. This is NO good since it depends on my account instead of a "service account", anyone in our team that interacts with the Teams channel incident post will be making incident changes on behalf of my account instead of their own, lastly, what happens in the future if my account gets disabled for any reason?

How can we have the Logic App use a managed identity or "service account" so Sentinel incidents in Teams are not bound to a single employees account?

@v-sudkharat v-sudkharat added the Playbook Playbook specialty review needed label Sep 27, 2024
@Guruleenyc
Copy link
Author

Circling back on this.
Is there any way to have the Sentinel send incidents to a Teams channel without having the Logic App depend on a user account to authenticate to Teams that is a member of the Teams group? We do not want the incidents to appear as though they are being sent by a specific team member in the Teams channel, rather they are being sent by Sentinel.

@v-rusraut
Copy link
Contributor

Hi @Guruleenyc, thanks for flagging this issue, we will investigate this issue and get back to you with some updates. Thanks!

@Guruleenyc
Copy link
Author

Guruleenyc commented Oct 4, 2024

Due to the Adaptive Card shortcomings, I noted, as a workaround I shifted hears to a Playbook / Logic App using a HTTP action POST with the Teams Webhook URL.
However, the JSON body in the HTTP trigger is tricky to get the format right.
I was able to get the right formatting of the Teams post using this Logic App code:

{ "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "HTTP": { "inputs": { "body": { "text": "<b>Creation time : </b>@{triggerBody()?['object']?['properties']?['createdTimeUtc']} <br/><br/><b>Title : </b> @{triggerBody()?['object']?['properties']?['title']}<br/><br/><b>ID : </b>@{triggerBody()?['object']?['properties']?['incidentNumber']}<br/><br/><b>Severity : </b>@{triggerBody()?['object']?['properties']?['severity']} <br/><br/><b>Description : </b>@{triggerBody()?['object']?['properties']?['description']}<br/><br/><b>URL : </b><a href=\"@{triggerBody()?['object']?['properties']?['incidentUrl']}\"> @{triggerBody()?['object']?['properties']?['incidentUrl']}</a><br/><br/>" }, "headers": { "Content-Type": "application/json" }, "method": "POST", "uri": "YourWebhookURLHere" }, "runAfter": {}, "runtimeConfiguration": { "contentTransfer": { "transferMode": "Chunked" } }, "type": "Http" } }, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": { "$connections": { "defaultValue": {}, "type": "Object" } }, "triggers": { "Microsoft_Sentinel_incident": { "inputs": { "body": { "callback_url": "@{listCallbackUrl()}" }, "host": { "connection": { "name": "@parameters('$connections')['azuresentinel']['connectionId']" } }, "path": "/incident-creation" }, "type": "ApiConnectionWebhook" } } }, "parameters": { "$connections": { "value": { "azuresentinel": { "connectionId": "/subscriptions/bb61c698-5616-4156-8f9e-af3971e2e5e0/resourceGroups/lhg-infosec-logs/providers/Microsoft.Web/connections/azuresentinel-Post-Message-to-Teams", "connectionName": "azuresentinel-Post-Message-to-Teams", "connectionProperties": { "authentication": { "type": "ManagedServiceIdentity" } }, "id": "/subscriptions/bb61c698-5616-4156-8f9e-af3971e2e5e0/providers/Microsoft.Web/locations/westus2/managedApis/azuresentinel" } } } }}

@v-rusraut
Copy link
Contributor

Hi @Guruleenyc, which issue you are facing now ?

@v-rusraut
Copy link
Contributor

Hi @Guruleenyc , we are waiting for response on above comment

@v-rusraut
Copy link
Contributor

Hi @Guruleenyc , Gentle Reminder: We are waiting for your response on this issue. If you still need to keep this issue active, please respond to it in the next 2 days. If we don't receive a response by 18-10-2024 date, we will be closing this issue.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Playbook Playbook specialty review needed
Projects
None yet
Development

No branches or pull requests

3 participants