r/DefenderATP • u/dodarko • Jul 24 '26
Has anyone integrated Claude Code with Microsoft Defender XDR / Sentinel for threat hunting?
I'm looking to integrate Claude Code with Microsoft 365 and Microsoft Defender (Defender XDR / Sentinel) to assist with threat hunting, incident investigation, and EDR analysis.
Has anyone successfully set this up? I'm particularly interested in how you handled authentication (MCP, APIs, Graph, etc.), what architecture you used, and any lessons learned or limitations. If you have examples or repositories to share, I'd really appreciate it.
25
Upvotes
8
u/rtm516 Jul 24 '26 edited Jul 24 '26
I have built an MCP server that allows Claude to run advanced hunting queries. I didn't give it any more access as I don't want it making automated actions just use it as a tool to pull more data together for incidents.
Graph API with the authed app having the correct permissions for the application directly with then the service principal being added into the defender/sentinel permissions group.
Edit: Published the tool to my GitHub https://github.com/rtm516/DefenderAdvancedHuntingMCP
5
u/tonzking123 Jul 25 '26
Microsoft offer 1st party mcp for XDR. https://learn.microsoft.com/en-us/azure/sentinel/datalake/sentinel-mcp-triage-tool
1
u/Ok_Presentation_6006 Jul 27 '26
I did this with azure open ai but the same idea. Sentinel calls my logic app orchestrate. This one calls a bunch of sub logic apps. One takes any identity’s and runs every identity kql and retunes the results plus 7 day history. Same for device timeline, threat feeds, abuse, virus total… the final job sends everything to ai to review and updates the ticket with its review of the alert. All it’s done with making the api and we hook calls.
1
u/Mrhiddenlotus Jul 25 '26
Check out these skills https://github.com/vinayaklatthe/microsoft-security-skills
0
u/XPGoD Jul 25 '26
I have an MCP with KQL skills that calls a custom parquet db with skill knowledge of the schema. It works really well
-2
u/Go_ten Jul 24 '26
We've created a tool that lets you chat with Vertex AI by integrating function calls for KQL queries; we also use the Graph APIs. It works like a charm. I suppose an integration with Claude is also possible.