Skip to main content

I wanted to get a Teams notification each time a change occurs on our platform, like a user is updated or deleted - so we could see if people are adding or deleting people without us knowing.

 

The Subscriptions API sounded ideal - and it’s working, to an extent. Each time there’s an update to an extension (user), I get a notification via Webhook to Teams.

The problem is, the content of the “event” is… minimal. And I’m not sure how I’m meant to do much with it.

This is an example of the body of an event:

"body":{"extensions":[{"extensionId":"xxxxxx","eventType":"Update","hints":["ExtensionInfo","CompanyNumbers"]}]}}', 'isBase64Encoded': False}

I get that I’m meant to use the Hints values to query that Extension and I can see the new Extension information. But… I don’t know what the values were previously so I have no idea what’s changed? 

I was hoping I would be able to get something like this (as a simplified example).

 

Extension: XYZ

Value: Time Setting

Old value: 12h

New Value: 24h

--

Am I missing something? Or maybe I’m not really meant to be using the Events subscription for this purpose and should instead using the Audit Log API - but then I don’t see any way to subscribe to changes with that API? Only query for given time-ranges.

 

Unfortunately, that’s how the system works. You’ll need to read the extension information and update all relevant data accordingly. To reduce effort, you can use the provided hints to determine whether an event requires processing or can be ignored if the changed data isn’t relevant to your use case.