cancel
Showing results for 
Search instead for 
Did you mean: 

Meraki Webhooks & MS Teams

Here to help

Meraki Webhooks & MS Teams

Created Incoming Webhook in our MS Teams environment; however, does not require a "secret" as it's anonymous.  Meraki dashboard requires to input a secret.  Does anyone know how to get around this?

20 REPLIES 20
Building a reputation

Re: Meraki Webhooks & MS Teams

Meraki does not validate the secret.  Instead, the value is included in the payload sent to your environment.  It's up to you to validate the secret (if you choose to do so).

 

If you're not going to validate the shared secret, you can enter any value you want.

Highlighted
Here to help

Re: Meraki Webhooks & MS Teams

Yeah, I read that in a different article; however, my alerts are not showing up in my Teams environment.

Comes here often

Re: Meraki Webhooks & MS Teams

I have the same issue, I have installed the incoming webhook connector into my teams channel, used the URL it generated and pointed the Meraki webhook to that URL. The alerts are not being delivered, yet if I use the E-mail address of the channel and set it as an alert recipient from the dashboard those messages do make it in.

 

Has any one gotten this integration working yet?

Building a reputation

Re: Meraki Webhooks & MS Teams

I'm not using Microsoft Teams, so I don't have a good way to test that end of the integration.

 

However, I did a quick test yesterday with ngrok and a simple Node.js receiver.  It took a little longer than I expected for the notifications to start arriving, but it did eventually work.  I wasn't keeping close track, but I would guess that it was 10 or 15 minutes.

 

I set my webhook to receive configuration change notifications only.  I didn't add it to the top-level notification list.  I then toggled a setting on the notification page a few times to cause the notifications to go out.

 

Here's one of the notifications as an example to look at:

 

{  
   "alertData":{  
      "name":"Alerts",
      "url":"/manage/configure/alerts",
      "changes":{  
         "rogueAp":{  
            "label":"A rogue AP is detected",
            "oldText":"{\"enabled\":false}",
            "newText":"{\"enabled\":true}",
            "changedBy":"Someone (someone@company.com)",
            "ssidId":null
         }
      },
      "userId":123456
   },
   "alertId":"1234567890123456789",
   "alertType":"Settings changed",
   "occurredAt":"2018-10-29T14:41:39.953568Z",
   "organizationId":"654321",
   "organizationName":"Org Name",
   "organizationUrl":"https://n123.meraki.com/o/5pWeda/manage/organization/overview",
   "networkId":"N_1234567890123456",
   "networkName":"A Network Name",
   "networkUrl":"https://n123.meraki.com/A-Network-Name/n/HakdfJH/manage/nodes/list",
   "version":"0.1",
   "sharedSecret":"asharedsecret",
   "sentAt":"2018-10-29T14:51:47.623106Z"
}
Conversationalist

Re: Meraki Webhooks & MS Teams

anyone have this working with Microsoft Teams yet?

Here to help

Re: Meraki Webhooks & MS Teams

Negative

New here

Re: Meraki Webhooks & MS Teams

Just checking to see if anyone has had any success with using the Meraki Webhooks with MS Teams?  I just tried configuring it this morning and the tests all fail.

JTe
Conversationalist

Re: Meraki Webhooks & MS Teams

I have manage to do this with Microsoft flow. First create Microsoft flow with http receiver and then send that infromation as MessageCard format to MS Teams as webhooks.

Meraki-Flow-Teams.pngMS Flow

I am currently using combination of different Meraki webhooks in my HTTP receiver to get all information from Meraki.

 

{
    "type": "object",
    "properties": {
        "alertData": {
            "type": "object",
            "properties": {
                "kbTotal": {
                    "type": "integer"
                },
                "nodeTag": {
                    "type": "string"
                },
                "period": {
                    "type": "integer"
                },
                "usageThreshold": {
                    "type": "integer"
                },
                "vpnType": {
                    "type": "string"
                },
                "peerIdent": {
                    "type": "string"
                },
                "peerContact": {
                    "type": "string"
                },
                "connectivity": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "userId": {
                    "type": "string"
                },
                "changes": {
                    "type": "object",
                    "properties": {
                        "globalRecipients": {
                            "type": "object",
                            "properties": {
                                "label": {
                                    "type": "string"
                                },
                                "ssidId": {},
                                "newText": {
                                    "type": "string"
                                },
                                "oldText": {
                                    "type": "string"
                                },
                                "changedBy": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                },
                "countNode": {
                    "type": "integer"
                },
                "bssids": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "minFirstSeen": {
                    "type": "integer"
                },
                "maxLastSeen": {
                    "type": "integer"
                },
                "countIsContained": {
                    "type": "integer"
                },
                "reason": {
                    "type": "string"
                },
                "wiredMac": {
                    "type": "string"
                },
                "mac": {
                    "type": "string"
                },
                "ip": {
                    "type": "string"
                },
                "connected": {
                    "type": "string"
                },
                "uplink": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "portDesc": {
                    "type": "string"
                },
                "portNum": {
                    "type": "integer"
                },
                "prevStatus": {
                    "type": "integer"
                },
                "status": {
                    "type": "integer"
                }
            }
        },
        "alertId": {
            "type": "string"
        },
        "alertType": {
            "type": "string"
        },
        "deviceMac": {
            "type": "string"
        },
        "deviceName": {
            "type": "string"
        },
        "deviceSerial": {
            "type": "string"
        },
        "deviceUrl": {
            "type": "string"
        },
        "networkId": {
            "type": "string"
        },
        "networkName": {
            "type": "string"
        },
        "networkUrl": {
            "type": "string"
        },
        "occurredAt": {
            "type": "string"
        },
        "organizationId": {
            "type": "string"
        },
        "organizationName": {
            "type": "string"
        },
        "organizationUrl": {
            "type": "string"
        },
        "sentAt": {
            "type": "string"
        },
        "sharedSecret": {
            "type": "string"
        },
        "version": {
            "type": "string"
        }
    }
}

Sending information to MS Teams is pretty simple operation. Just format and send it to MS Teams webhook address.

Flow2Teams.pngFlow2Teams

New here

Re: Meraki Webhooks & MS Teams

Could you export/share out this MSFlow? We are having an issues getting this to work in our environment. 

 

thank you

JTe
Conversationalist

Re: Meraki Webhooks & MS Teams

You can download exported Flow from https://1drv.ms/u/s!ArsWMmlHspG7yxdwMNUbomLve8tN

 

 

 

JRV
Here to help

Re: Meraki Webhooks & MS Teams

Did you have any luck APittman? I'm getting failures on submitting a test webhook from Meraki using the flow in the thread.

JTe
Conversationalist

Re: Meraki Webhooks & MS Teams

That test webhook is not working either in our dashboard, but if you just put that Flow url there and save configuration it will send those webhooks Smiley Happy 

JRV
Here to help

Re: Meraki Webhooks & MS Teams

Interesting. Thanks for the feedback! I'll give it a try.

 

J.R.

JRV
Here to help

Re: Meraki Webhooks & MS Teams

Wanted to let you know that worked. Appreciate the tip!

New here

Re: Meraki Webhooks & MS Teams

What adress did you use for the webhook? I don't understand what you mean with "the flow url", don't see it anywhere?

Ping @JTe @JRV 

Thanks,
Mike

JRV
Here to help

Re: Meraki Webhooks & MS Teams

The first step in your flow should be an HTTP receiver. There is where an incoming URL is created for you to use with your webhooks.

New here

Re: Meraki Webhooks & MS Teams

Thanks for the reply. Yeah, I've made a copy of the imported flow so it should have its unique webhook (in my case https://prod-114.westeurope.logic.azure.com:443/w........) but Meraki dashboard does not want to send anything to it? hook.PNGhook2.PNG

 

What am I missing? Smiley Happy

Here to help

Re: Meraki Webhooks & MS Teams

I had a similar setup but more convoluted with many conditions to filter the type so was handy finding out about this switch to handle it. Problem i still have is settings changed which has different formats and information within it anyone got a good way for handling settings changes?

 

Thanks

 

Mark

JRV
Here to help

Re: Meraki Webhooks & MS Teams

Are you using the test webhook functionality on the Meraki dashboard? If so, it doesn't work and you'll have to wait for an alert to be generated or shut down an AP for a few until it trips an alert.

Here to help

Re: Meraki Webhooks & MS Teams

Hi, the system works I haven't had a problem with that. It's how to format a response which is a

alertType Settings changed.
The structure of these responses which have caused issues as can't figure out a way to get these to display nicely.

 

for example multiple port changes here is the information received in flow which Meraki generates. The following id for a field switchPort138034122919267. You need this to get label, old / new text. Can't figure out how to read this value to then use the value to get the information contained within it.

 

{
"alertData": {
"name": "Switch ports",
"url": "/manage/configure/switchports",
"changes": {
"switchPort138034122919267": {
"label": "Secondary Outer Switch - SSOC-CFT-PoC / 7",
"oldText": {
"port": [
"enabled"
]
},
"newText": {
"port": [
"disabled"
]
},
"changedBy": "Mark Davis ()",
"ssidId": null
},
"switchPort138034122919268": {
"label": "Secondary Outer Switch - SSOC-CFT-PoC / 8",
"oldText": {
"port": [
"enabled"
]
},
"newText": {
"port": [
"disabled"
]
},
"changedBy": "Mark Davis ()",
"ssidId": null
},
"switchPort138034122919269": {
"label": "Secondary Outer Switch - SSOC-CFT-PoC / 9",
"oldText": {
"port": [
"enabled"
]
},
"newText": {
"port": [
"disabled"
]
},
"changedBy": "Mark Davis ()",
"ssidId": null
}
},
"userId": xxxxxx
},
"alertId": "695806142430688260",
"alertType": "Settings changed",
"occurredAt": "2019-01-25T14:31:05.361531Z",
"sentAt": "2019-01-25T14:41:07.378277Z"
}

Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.