Get-MgSecurityIncidentAlert is a Microsoft Graph PowerShell cmdlet that retrieves security incident alert information from Microsoft 365 Defender and the Microsoft Security portal.
It helps administrators view alert records that are linked to security incidents, such as suspicious sign-ins, malware detection, phishing attempts, or endpoint threats.
Try the M365Corner Microsoft 365 Reporting Tool — your DIY pack with 20+ out-of-the-box M365 reports for Users, Groups, and Teams.
This cmdlet is especially useful for security teams and Microsoft 365 administrators because it enables:
Before running this cmdlet, ensure:
Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "SecurityEvents.Read.All"
Security alert access typically requires Defender or Security Administrator roles.
Basic syntax:
Get-MgSecurityIncidentAlert
You can run the cmdlet directly to list available incident alerts, or pipe the output into reporting tools such as CSV exports.
Get-MgSecurityIncidentAlert
This command lists security incident alert details available in your tenant. It’s useful when you want to quickly review alert records and investigate security activity.
Get-MgSecurityIncidentAlert | Export-CSV "d:/securityincident.csv"
This exports the security incident alert output into a CSV file for reporting, analysis, and auditing.
Note (Important)
To fetch security incident alert details for a specific incident, you need the IncidentId.
You can get the IncidentId by running:
Get-MgSecurityIncident
Once you have the IncidentId, you can narrow your investigation to alerts tied to that incident.
| Key Point | Details |
| Cmdlet Name | Get-MgSecurityIncidentAlert |
| Purpose | Retrieves alert details linked to Microsoft 365 security incidents |
| Required Scope | SecurityEvents.Read.All |
| Primary Use | Security incident investigation and alert monitoring |
| Automation Benefit | Enables programmatic alert auditing and reporting |
| Use Case | SOC workflows, compliance reporting, threat response |
Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.
Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.
© Created and Maintained by LEARNIT WELL SOLUTIONS. All Rights Reserved.