03-05-2021 10:32 AM - edited 03-05-2021 10:33 AM
Has anyone been able to get a webhook for an event to successfully post to Microsoft Teams? I have a channel and teams then I am the group owner for. I have installed the team's webhook app on the channel. I have been able to post data to that Channel via postman, with the same code. when I copy the same body into DNA All I get is a bad request. I am not a DEV so I could be missing something easy but I don't know where in DNA to look at the log to see what is happing.
{ "@context": "http://schema.org/extensions", "@type": "MessageCard", "themeColor": "0076D7", "title": "$eventSource$", "summary": "DNA Alert", "Alert Infomation": [ { "Type": "$eventSource$", "Assurance Issue Details": "The network is experiencing a high percentage of onboarding failures compared to usual. Clients are experiencing multiple onboarding failures while connecting to SSID $ssid$.", "Assurance Issue Priority": "$priority$", "Assurance Issue Name": "Excessive failures to connect - At least $pctDeviation$% increase in failures on $ssid$ in $siteHierarchy$.", "Assurance Issue Category": "$category$", "Assurance Issue Status": "$status$" } ] }
03-09-2021 07:04 AM - edited 03-09-2021 07:05 AM
I think this guide might be helpful:
Quick Start Guide on What Logs to Collect from Cisco DNA Center
I'm not sure the audit logs will give you enough details about what's going wrong, but here is what they will tell you, along with how to access them:
Audit Log Support for Cisco DNA Center Platform
Audit log support for the Cisco DNA Center platform. New Cisco DNA Center platform audit logs capture the following critical activities:
User actions to configure, enable, and disable any of the Cisco DNA Center platform bundles.
User actions to view, edit, duplicate, delete, download, and run any reports in Cisco DNA Center.
User actions to subscribe to any of the events or notifications.
User actions to create, update, and change any preference for an instance.
User actions to invoke both successful and unsuccessful API methods (POST / PUT/ GET / DELETE).
The following data is captured in the audit logs:
User Role: SUPER-ADMIN-ROLE, NETWORK-ADMIN-ROLE, OBSERVER-ROLE, or user-created role.
Who took the action: Captured data includes user group, username, and user role (could be same as user-group).
When action occurred: Time that modification was made (UTC time).
What type of action occurred: An abstract or high level view of the action performed and if the action was successful or failed.
To access the audit logs using the Cisco DNA Center GUI, click the Menu icon () > Activity > Audit Logs.
05-02-2022 10:59 AM
I am having a similar issue wanted to ask if you ever got this working?
05-05-2021 11:52 AM - edited 05-05-2021 11:53 AM
Microsoft teams expects to post with authentication, i tired with the same and still unsuccessful, please let me know if there is way to go..
05-06-2021 12:55 PM
I post the following with Postman and it works, no auth.
{ "@type": "MessageCard", "@context": "http://schema.org/extensions", "themeColor": "0076D7", "summary": "DNA", "title": "DNA Alert", "sections": [{ "facts": [{ "name": "Service Incident:", "value": "ID" }] }] }
I tried both content types, Json and text all I get back from DNA is a bad request but every other way I test this it works.
I might try a chat with Devnet.
05-19-2021 08:02 AM
Did you get this to work? I am trying the same thing and getting the same failures.
08-15-2023 02:32 PM
Hello
Has this issue been resolved? I am also trying to setup a DNA Centre Event Notification webhook into MS Team (NHS Shared Tenant) and when sending a test alert it fails with & without authentication header in place
08-16-2023 01:54 AM - edited 08-16-2023 01:56 AM
Hi
You can't directly call a MS incoming webhook. MS incoming webhooks expect a certain payload schema/format (see https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using), the payload from a DNAC event notification is in JSON, but does not much the expected payload schema (see example payload below). So you need to write your own webhook receiver (for example using Python flask) and using this receiver to forward the information to a MS incoming webhook.
If you don't know how to write such a receiver, you may be interested in a easier solution (for example using the DNAC-Webex integration: https://www.cisco.com/c/en/us/td/docs/cloud-systems-management/network-automation-and-management/dna-center-platform/2-3-5/itsm-ig/b-dnac-itsm-ig-2-3-5/m_appendix_webex.html).
DNAC event sample payload:
{
"version": "",
"instanceId": "ea6e28c5-b7f2-43a4-9937-def73771c5ef",
"eventId": "NETWORK-NON-FABRIC_WIRED-1-251",
"namespace": "ASSURANCE",
"name": "",
"description": "",
"type": "NETWORK",
"category": "ALERT",
"domain": "Connectivity",
"subDomain": "Non-Fabric Wired",
"severity": 1,
"source": "ndp",
"timestamp": 1574457834497,
"tags": "",
"details": {
"Type": "Network Device",
"Assurance Issue Priority": "P1",
"Assurance Issue Details": "Interface GigabitEthernet1/0/3 on the following network device is down: Local Node: PDX-M",
"Device": "10.93.141.17",
"Assurance Issue Name": "Interface GigabitEthernet1/0/3 is Down on Network Device 10.93.141.17",
"Assurance Issue Category": "Connectivity",
"Assurance Issue Status": "active"
},
"ciscoDnaEventLink": "https://10.93.141.35/dna/assurance/issueDetails?issueId=ea6e28c5-b7f2-43a4-9937-def73771c5ef"
}
08-16-2023 10:21 AM
Thank you for the feedback much appreciated.
I have managed to get DNAC to send alerts into Webex but my organization is using MSTeams as its main platform so hence looking to get it working.
08-17-2023 12:41 AM
I'm actually playing a bit with AWS lambda functions these days - I will write an example DNAC to MSTeams hook and post it here as soon as I'm ready (I'm currently on PTO, so maybe it will take some days).
08-17-2023 11:51 AM
Thank you, look forward to hearing how things develop.
08-19-2023 01:23 AM - edited 08-21-2023 06:37 AM
Hi @Marc0
See https://github.com/spie-ics-ag/dnac2teams - if you have questions/problems just let me know.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide