Forum Discussion
Fetch Azure Sentinel Incidents Via API
- Mar 17, 2020
Hi jojo_the_coder, current available APIs to fetch incidents can be found here.
To fetch alerts related to an incident without using Log Analytics API, you can do that via the Microsoft Graph Security API. Please refer to the documentation https://docs.microsoft.com/en-us/graph/api/resources/security-api-overview?view=graph-rest-1.0#alerts Below is an example query to get all alerts provided by Azure Sentinel via the Graph Security API. A list of curated sample queries can be found https://github.com/microsoftgraph/security-api-solutions/tree/master/Queries
https://graph.microsoft.com/v1.0/security/alerts?$filter=vendorInformation/provider eq 'Azure Sentinel'.
Hi Chi_Nguyen
I greatly appreciate your feedback, however you may be assuming I'm DevOps, which I'm not :).
If you had a wget example of how to pull Sentinel Incidents with the additional fields that would be super helpful - then I could present a query example to our DevOps team and they could run with it, knowing I wasn't suggesting they chase something up a tree.
I suspect@Yaniv Shasha is on the right track with this:
"98b974fd-cc64-48b8-9bd0-3a209f5b944b", // Alert related entities
But I don't know how I can translate that knowledge into a wget example for Sentinel, or use the Graph Explorer to query the same results.
Your help is greatly appreciated.
Chi_Nguyen ,@Yaniv Shasha, I believe the easiest way for me to test this is using az rest.
eg:
az rest --method get --uri https://graph.microsoft.com/v1.0/users?$select=displayName
So knowing that, could you please provide me a url example that would query the extended Sentinel details?
Thanks VERY much.
- Chi_NguyenSep 01, 2020Former Employee
SocInABox I don't think we can query the extended Properties for Sentinel incidents using Graph Security API, as it's dependent on the alert schema the API currently replies on. So the only way I'm aware of is calling the Azure Sentinel API.
If you are interested in using some sample code (no developer/devops skills needed to run this) we've built to get these details from Sentinel incidents, the code should be available soon on Azure Sentinel/Tools/Sample Code repo. Or if you'd like to be an early tester, then please reach out to asigtp_at_microsoft_com, for a request, and I can provide more instructions on how to use the code to run it.
- SocInABoxSep 01, 2020Iron Contributor
Chi_Nguyen I tried emailing asigtp@microsoft.com and it was rejected.
- Chi_NguyenSep 01, 2020Former Employee
SocInABox It won't allow you to send to our group email then.
You can post your question directly to Azure Sentinel TechCommunity for more assistance and tag my name there.
- SocInABoxSep 01, 2020Iron Contributor
Hi Chi_Nguyen ,
Yes please!
I've sent out an email but anything you can do to get me started is appreciated.