Microsoft Graph API Security v2
Manage Graph security incidents, alerts and advanced hunting
Reads and updates Microsoft Graph security incidents and alerts, runs advanced hunting, and calls any Graph endpoint with the connector's own auth.
microsoft-graph-api-security-v2_4.0.1.tgz
Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.
This connector works with the Microsoft Graph security API from FortiSOAR. It lists, reads and updates security incidents and alerts, adds comments to alerts, and runs advanced hunting (KQL) queries through Graph v1.0. It also has list choices that fill the incident, alert and assignee dropdowns from the tenant, and an Execute Graph API Request operation that calls any v1.0 or beta path with the connector's own authentication. Paging links are kept on the configured Graph host, and a 401 refreshes the access token once.
Live-tested on FortiSOAR 8.0.1 against a Microsoft 365 lab tenant. Version 4.0.1 was run live on each of its operations, with success and error cases.
Not live-tested:
- Error responses 401 (invalid or expired token) and 429 (throttled): the lab tenant does not return these on demand. A bad token needs a broken credential and throttling needs Graph to rate-limit the tenant. These are covered by synthetic mock files only.
- Error response 403 (forbidden): the 4.0.1 live run produced no 403, because the lab app holds the permissions the operations use. The 403 mock is a sanitised capture from an earlier test tenant.
Every operation (get and update incidents, get, update and comment on alerts, advanced hunting, Execute Graph API Request, and the three list choice operations) has a live success run on 4.0.1.
Authentication: the connector uses a Microsoft Entra app registration. Use either the application permission flow (without a user) or the delegated flow (on behalf of a user), and grant the application permissions named here, with admin consent: ThreatHunting.Read.All for advanced hunting, SecurityIncident.ReadWrite.All for incidents, and SecurityAlert.ReadWrite.All for alerts. Store the client secret in the connector configuration only; it is not needed in the playbooks.
Configuration · 2 fields
- Get Access Token
auth_typeselect requiredOptions On behalf of User - Delegated PermissionWithout a User - Application PermissionWhen Get Access Token is Without a User - Application Permission
- Server URL
resourcetext requiredThe service-based URL to which you will connect and perform the automated operations.
Default
https://graph.microsoft.com - Directory (tenant) ID
tenant_idtext requiredThe ID of the tenant that you have been provided for your Azure Network Security Group instance.
- Application (client) ID
client_idtext requiredUnique ID of the Azure Network Security Group application that is used to create an authentication token required to access the API.
- Application (Client) Secret
client_secretpassword requiredUnique Client Secret of the Azure Network Security Group application that is used to create an authentication token required to access the API. For information on how to get the secret key, see https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/exposed-apis-create-app-webapp.
When Get Access Token is On behalf of User - Delegated Permission
- Server URL
resourcetext requiredThe service-based URL to which you will connect and perform the automated operations.
Default
https://graph.microsoft.com - Directory (tenant) ID
tenant_idtext requiredThe ID of the tenant that you have been provided for your Azure Network Security Group instance.
- Application (client) ID
client_idtext requiredUnique ID of the Azure Network Security Group application that is used to create an authentication token required to access the API.
- Application (Client) Secret
client_secretpassword requiredUnique Client Secret of the Azure Network Security Group application that is used to create an authentication token required to access the API. For information on how to get the secret key, see https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/exposed-apis-create-app-webapp.
- Authorization Code
codepassword required(Only Applicable to On behalf of User - Delegate Permission) The authorization code that you acquired during the authorization step. For more information, see the Getting Access Tokens using the On behalf of the user - Delegate Permission method section.
- Redirect URI
redirect_urltext(Only Applicable to On behalf of User - Delegate Permission) The redirect_uri of your app, where authentication responses can be sent and received by your app. The redirect URL that you specify here must exactly match one of the redirect_uri's you have registered in your app registration portal.
- Verify SSL
verify_sslcheckboxDefault
false
Operations · 12
Get Security Incidents 6 params
get_security_incidentsget_security_incidentsLists security incidents from Microsoft Graph, with optional OData filter, paging and alerts.
- Skip
skipnumberskip
- Filter
filtertextfilter
- Order By
orderBytextorderBy
- Expand Alerts
expandAlertscheckboxexpandAlerts
- Include Count
includeCountcheckboxincludeCount
- Get All Records
getAllRecordscheckboxgetAllRecords
When Get All Records is false
- Top
topnumbertop
Get Security Incident 2 params
get_security_incidentget_security_incidentFetches one security incident by ID, with its alerts expanded.
- Incident ID
incidentIDselect requiredincidentID
- Expand Alerts
expandAlertscheckboxexpandAlerts
Update Security Incident 6 params
update_security_incidentupdate_security_incidentUpdates the owner, status, classification, determination, tags or resolving comment of an incident.
- Incident ID
incidentIDselect requiredincidentID
- Status
statusselectstatus
Options ActiveInProgressResolvedWhen Status is Resolved
- Resolving Comment
resolvingCommenttextresolvingComment
- Assigned To
assignedToselectassignedTo
- Classification
classificationselectclassification
Options UnknownTrue PositiveInformational Expected ActivityFalse PositiveUnknown Future Value - Determination
determinationselectdetermination
Options Multistage attackMalicious user activityCompromised accountMalwarePhishingUnwanted softwareOtherSecurity testLine-of-business applicationConfirmed user activityNot maliciousNot enough data to validateUnknown future valueAptUnknownSecurity personnel - Custom Tags
customTagstextcustomTags
Get Security Alerts 4 params
get_security_alertsget_security_alertsLists alerts (alerts_v2) from Microsoft Graph, with optional OData filter and paging.
- Skip
skipnumberskip
- Filter
filtertextfilter
- Include Count
includeCountcheckboxincludeCount
- Get All Records
getAllRecordscheckboxgetAllRecords
When Get All Records is false
- Top
topnumbertop
Get Security Alert 1 param
get_security_alertget_security_alertFetches one alert (alerts_v2) by ID.
- Alert ID
alertIDselect requiredalertID
Update Security Alert 5 params
update_security_alertupdate_security_alertUpdates the status, owner, classification or determination of an alert (alerts_v2).
- Alert ID
alertIDselect requiredalertID
- Status
statusselectstatus
Options NewIn ProgressResolved - Assigned To
assignedToselectassignedTo
- Classification
classificationselectclassification
Options UnknownTrue PositiveInformational Expected ActivityFalse Positive - Determination
determinationselectdetermination
Options Multistage attackMalicious user activityCompromised accountMalwarePhishingUnwanted softwareOtherSecurity testLine-of-business applicationConfirmed user activityNot maliciousNot enough data to validateUnknown future valueAptUnknownSecurity personnel
Add Alert Comment 2 params
add_alert_commentadd_alert_commentAdds a comment to an alert (alerts_v2) in Microsoft Defender XDR. Ported from microsoft-graph_dev add_comment_on_security_alert.
- Alert ID
alertIDselect requiredalertID
- Comment
commenttext requiredcomment
Run Advanced Hunting Query 1 param
run_advanced_huntingrun_advanced_huntingRuns a KQL advanced hunting query through Microsoft Graph (v1.0 runHuntingQuery). Requires the ThreatHunting.Read.All application permission.
- Query
querytext requiredquery
Execute Graph API Request 4 params
execute_api_requestexecute_api_requestCalls any Microsoft Graph v1.0 or beta path with the connector's own authentication. Use for endpoints that have no dedicated operation.
- Method
methodselectmethod
Options GETPOSTPATCHPUTDELETE - Endpoint
endpointtext requiredendpoint
- Query Parameters
paramstextareaparams
- Body
bodytextareabody
List Incident Choices
list_incident_choiceslist_incident_choicesLists the most recently updated incidents as 'Name [id]' for the incident dropdowns.
No parameters.
List Alert Choices
list_alert_choiceslist_alert_choicesLists the first page of alerts as 'Title [id]' for the alert dropdowns.
No parameters.
List Assignable Users
list_assignable_userslist_assignable_usersLists the tenant's user principal names for the Assigned To dropdowns.
No parameters.