Hi, got the problem: Get-SecurityAlert brings you all providers (including AIP “risky sign-ins”). Without registering apps, use Microsoft Graph PowerShell with delegation and filter only MDEs. Here, super-synthetic: open an InPrivate session → Connect-MgGraph -Scopes "SecurityEvents.Read.All" → MDE only: Get-MgSecurityAlertV2 -All -Filter "serviceSource eq 'microsoftDefenderForEndpoint'" (if you don't have V2: Get-MgSecurityAlert -All -Filter "vendorInformation/provider eq 'Microsoft Defender for Endpoint'"). To exclude risky sign-ins: add and serviceSource to 'azureAdIdentityProtection' (or, on v1, and category to 'Risky sign-in'). If it doesn't get them all, it's pagination: use -All (or -PageSize 1000) and, if necessary, repeat with Invoke-MgGraphRequest following the @odata.nextLink. You can also narrow by date: ... and createdDateTime ge 2025-08-01T00:00:00Z. This way, you only get Microsoft Defender for Endpoint alerts with delegated permissions and without having to register your own app.
About Get-SecurityAlert command
I am running Get-SecurityAlert command to retrive alert from MDE
but the problem is the command is not retriving all alerts
also it retrive risky signin alerts as well which is not my requirement
I want to retrive the alerts of MDE only
I search every where but I couldnot found anything
I am using delegate permission here
my company wants me without registering apps as possible as I can
So,Anyone can help in this would be great help
Thank you in advance
Microsoft Security | Microsoft Graph
1 additional answer
Sort by: Most helpful
-
Vasil Michev 121K Reputation points MVP Volunteer Moderator
2025-08-08T06:41:56.7666667+00:00 I suppose you mean
Get-MgSecurityAlert
, correct? Keep in mind that this cmdlet is using the old/legacy alert experience, which is going to be deprecated next year. Instead, you should use theGet-MgSecurityAlertV2
cmdlet. And of course, make sure you have sufficient permissions, both on the Graph side and on MDE side.