web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Defender Advanced Hunt...
Power Automate
Unanswered

Defender Advanced Hunting Query + Power Automate

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am looking to use the Advanced Hunting Query Item in Power Automate to gather into and post that info into a teams channel. I am getting an error on my query and I am unsure how the query needs to be passed the Advanced Hunting Step.

 

Here is my current Flow ( I feel like the input and output may need to be sanitized or formatted in some way). I have tried it with the query all on the same line as well with same results. Any help is greatly appreciated as I cannot really find any examples online of using this in Power Automate.

 

error.pngflow.png

Categories:
I have the same question (0)
  • CarterBurbage Profile Picture
    6 on at

    I'm following this as well. Just got off the phone after an hour with Microsoft. 
    It really seems that it does not like the EmailEvents table. I'm also having this issue if I do not have any dynamic content in my query. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey Carter - 

    I abandoned this after a day or so.  I feel like I ended up finding out that it WILL NOT work with EmailEvents for some reason.  I want to say it isn't a supported query with the Power Automate Defender API connector or something.  

    However, if you find a solution please share 🙂

  • CarterBurbage Profile Picture
    6 on at

    Hey! I know it's been a while, but what I just figured out about a month back is I can now query the email events from the API! It still doesn't work from the connector, but if you do an HTTP request directed to https://graph.microsoft.com/v1.0/security/runHuntingQuery and your query like you would have it in Advanced Hunting, it worked for me. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard