Forum Discussion
Power Query Defender Advanced hunting bad request 400 for some tables.
- 10 months ago
I ended up using notebooks instead of Dataflow Gen2.
Thanks
Hi mkjit256 , Thank you for reaching out to the Microsoft Fabric Community Forum.
DeviceEvents is part of Microsoft Defender for Endpoint (MDE), which uses the endpoint https://api.securitycenter.microsoft.com/api/advancedqueries, while EmailEvents belongs to Microsoft 365 Defender (XDR), which requires the endpoint https://api.security.microsoft.com/api/advancedqueries. If you send an EmailEvents query to the MDE endpoint, you’ll always get a 400 error because that table doesn’t exist there. Point your query at the Microsoft 365 Defender endpoint and ensure your service principal has the corresponding Microsoft 365 Defender API permission in Entra ID.
Advanced Hunting API - Microsoft Defender for Endpoint | Microsoft Learn
Microsoft Defender XDR advanced hunting API - Microsoft Defender XDR | Microsoft Learn
Supported Microsoft Defender for Endpoint APIs - Microsoft Defender for Endpoint | Microsoft Learn
Use the Microsoft Graph security API - Microsoft Graph v1.0 | Microsoft Learn