Microsoft Graph API (fork)
Get Microsoft Graph security incidents with reworked auth
A fork of the Microsoft Graph API connector focused on XDR: get security incidents over a reworked authentication flow.
microsoft-graph_dev_3.1.0.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.
Fork of a Content Hub connector
An enhanced copy of Microsoft Graph API microsoft-graph v2.3.0Original's documentation
Operations this fork adds over the original 1 of 17 total
- Get Security Incidents
Operations the original has but this fork drops
- get_risk_detections
- get_risky_user_history
- run_advanced_hunting_query
What the author changed: Adds get security incidents over a reworked authentication flow, from a smaller operation set than the hub original.
Installs under its own machine name alongside the original: playbook steps that call the Content Hub original keep using it until you switch them to this fork. Differences are re-measured against the current Content Hub index at every site build, so this stays truthful as the original moves.
Superseded. This fork (3.1.0) is no longer maintained. Its replacements (the Microsoft Graph security, Entra ID and mail connectors) are being rebuilt and are not published here yet.
Configuration · 2 fields
- Get Access Token
auth_typeselect requiredSelect the method using which you will get authentication tokens used to access the security graph APIs.
Options Without a User - Application PermissionOn behalf of User - Delegate PermissionCertificate Based AuthenticationWhen Get Access Token is Without a User - Application Permission
- Server URL
resourcetext requiredSpecify the service-based URI to connect and perform automated operations.
Default
https://graph.microsoft.com - Tenant ID
tenanttext requiredSpecify the ID of the tenant assigned to you by the Azure application registration portal.
- Client ID
client_idtext requiredSpecify the Unique Application ID of the Azure Active Directory application to create an authentication token required to access the API. For information on getting authentication tokens, see the Getting Authentication Tokens section.
- Client Secret
client_secretpassword requiredSpecify the Unique Client Secret of the Azure Active Directory 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 - Delegate Permission
- Server URL
resourcetext requiredSpecify the service-based URI to connect and perform automated operations.
Default
https://graph.microsoft.com - Tenant ID
tenanttext requiredSpecify the ID of the tenant assigned to you by the Azure application registration portal.
- Client ID
client_idtext requiredSpecify the Unique Application ID of the Azure Active Directory application to create an authentication token required to access the API. For information on getting authentication tokens, see the Getting Authentication Tokens section.
- Client Secret
client_secretpassword requiredSpecify the Unique Client Secret of the Azure Active Directory 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 requiredSpecify the authorization code that you acquired during the authorization step. For more information, see the Getting Access Tokens using the Delegate Permissions method section.
- Redirect URL
redirect_urltextThe 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.
When Get Access Token is Certificate Based Authentication
- Server URL
resourcetext requiredSpecify the service-based URI to connect and perform automated operations.
Default
https://graph.microsoft.com - Tenant ID
tenanttext requiredSpecify the ID of the tenant assigned to you by the Azure application registration portal.
- Client ID
client_idtext requiredSpecify the Unique Application ID of the Azure Active Directory application to create an authentication token required to access the API. For information on getting authentication tokens, see the Getting Authentication Tokens section.
- Certificate Thumbprint
thumbprintpassword requiredProvides a thumbprint, fingerprint, or hash, which is a unique identifier generated from a digital certificate using a cryptographic hash function.
- Certificate File
private_keyfile requiredUpload a certificate (private key) with one of the following file types: .cer, .pem, .crt
- Verify SSL
verify_sslcheckboxSpecifies whether the SSL certificate for the server is to be verified.
Default
true
Operations · 17
Get Risky Users List
get_risky_users_listget_risky_users_listRetrieves a list of all risky users from the Microsoft Graph API.
No parameters.
Returns@odata.contextvalueGet Risky User Details 1 param
get_risky_user_detailsget_risky_user_detailsRetrieve details for a specific risky user from the Microsoft Graph API based on the user ID you have specified.
- Risky User ID
risk_idtext requiredSpecify the ID of the risky user whose details you want to retrieve from the Microsoft Graph API.
Returns@odata.contextidisDeletedisProcessingriskLevelriskStateriskDetailriskLastUpdatedDateTimeuserDisplayNameuserPrincipalNameGet All Security Alerts 4 params
get_all_security_alertsget_all_security_alertsRetrieves a list of alerts from the Microsoft Graph API based on the input parameters you have specified.
- API Version
api_versionselectSelect the version of the API you want to use for retrieving security alerts. If the user selects V2, it provides comprehensive information and detailed context about alerts, where as V1 refers to the older version of the alerts API. By default,V1 is selected.
Default
V1Options V1V2When API Version is V1
- Vendor
vendortextSpecify the name of the product vendor that provided the alert you want to retrieve using the Microsoft Graph API. For example, Microsoft.
- Provider
providertextSpecify the security product that provided the alert you want to retrieve using the Microsoft Graph API. For example, Cloud Application Security.
- Severity
severityselectSelect the alert severity, set by the vendor or provider, to retrieve alerts using the Microsoft Graph API. You can choose from the following options: Unknown, Low, Medium, High, Informational.
Options UnknownLowMediumHighInformational - Search From
search_fromdatetimeSelect the date and time of alert triggering event(s) to retrieve using the Microsoft Graph API.
When API Version is V2
- Classification
classificationselectSelect the classification based on which you want to filter alerts to be retrieved. You can choose from the following options: Unknown, False Positive, True Positive, Informational Expected Activity, or Unknown Future Value.
Options UnknownFalse PositiveTrue PositiveInformational Expected ActivityUnknown Future Value - Determination
determinationselectSelect the determination based on which you want to filter alerts to be retrieved. You can choose from the following options: Unknown, ATP, Malware, Security Personnel, Security Testing, Unwanted Software, Other, MultiStaged Attack, Compromised User, Phishing, Malicious User Activity, Clean, Insufficient Data, Confirmed User Activity, Line of Business Application, or Unknown Future Value.
Options UnknownATPMalwareSecurity PersonnelSecurity TestingUnwanted SoftwareOtherMultiStaged AttackCompromised UserPhishingMalicious User ActivityCleanInsufficient DataConfirmed User ActivityLine Of Business ApplicationUnknown Future Value - Status
statusselectSelect the status based on which you want to filter alerts to be retrieved. You can choose from the following options: Unknown, New Alert, In Progress, or Resolved.
Options Unknown Future ValueNew AlertIn ProgressResolved - Created Date
createdDateTimedatetime(Optional) Specify the creation date to filter alerts so that alerts created after the specified date are retrieved.
- Last Update Date
lastUpdateDateTimedatetime(Optional) Specify the last modified date to filter alerts so that alerts modified after the specified date are retrieved.
- Severity
severityselect(Optional) Select the severity based on which you want to filter alerts to be retrieved. You can choose from the following options: Unknown, Informational, Low, Medium, High, or Unknown Future Value.
Options UnknownInformationalLowMediumHighUnknown Future Value - Service Source
serviceSourcetext(Optional) Specify the service source based on which you want to filter alerts to be retrieved.
- Assigned To
assigned_totextSpecify the name of the analyst to filter alerts so that only those alerts assigned to the specified analyst are retrieved.
- Limit
topintegerSpecify the maximum number of records retrieved in the response. The maximum limit is '2000'.
- Offset
skipintegerSpecify the number of alert records you want to skip in this request.
Get Security Alert 2 params
get_security_alertget_security_alertRetrieves details of a specific alert from the Microsoft Graph API based on the alert ID you have specified.
- API Version
api_versionselectSelect the version of the API you want to use for retrieving security alerts. If the user selects V2, it provides comprehensive information and detailed context about alerts, where as V1 refers to the older version of the alerts API. By default V1 is selected.
Default
V1Options V1V2 - Alert ID
alert_idtext requiredSpecify the unique Alert ID to retrieve that alert from the Microsoft Graph API. The alert ID is generated by the provider when an alert is created in Azure.
Update Security Alert 3 params
update_security_alertupdate_security_alertUpdates a specific alert using Microsoft Graph API based on the alert ID, vendor name, provider name, and other input parameters you have specified.
- Alert ID
alert_idtext requiredSpecify the unique alert ID to update that alert through the Microsoft Graph API. The alert ID is generated by the provider when an alert is created in Azure.
- API Version
api_versionselectSelect the version of the API you want to use for retrieving security alerts. If the user selects V2, it provides comprehensive information and detailed context about alerts, where as V1 refers to the older version of the alerts API. By default,V1 is selected.
Default
V1Options V1V2When API Version is V1
- Provider
providertext requiredSpecify the provider of the product or service in Azure to update the specific alert in Azure. For example, WindowsDefenderATP.
- Vendor
vendortext requiredSpecify the name of the vendor to update in the specific alert in Azure. For example, Microsoft.
- Feedback
feedbackselect(Optional) Select the analyst feedback on the alert that you want to update in the specific alert in Azure. You can choose from the following options: Unknown, True Positive, False Positive, or Benign Positive.
Options UnknownTrue PositiveFalse PositiveBenign Positive - Comments
commentsmultiselect(Optional) Select the analyst comments that you want to update in the specific alert in Azure. You can choose between Closed in MCAS or Closed in IPS.
Options Closed in MCASClosed in IPC - Tags
tagstext(Optional) Specify the JSON array of strings that store user-defined labels that can be applied to the alert that you want to update in Azure. These tags serve as filter conditions, and you can specify multiple tags using comma-based separators.
- Provider Version
providerVersiontext(Optional) Specify the version of the provider or sub-provider, if it exists, that generated the alert that you want to update in Azure.
- Subprovider
subProvidertext(Optional) Specify the name of the sub-provider under the aggregating provider in Azure for the alert that you want to update in Azure. For example, WindowsDefenderATP.SmartScreen
- Status
statusselect(Optional) Select the status (life cycle status) that you want to update in the specific alert in Azure. You can choose from the following options: Unknown, New Alert, In Progress, or Resolved.
Options UnknownNew AlertIn ProgressResolved
When API Version is V2
- Classification
classificationselect(Optional) Select the classification that you want to update in the specific alert in Azure. You can choose from the following options: Unknown, False Positive, True Positive, Informational Expected Activity, or Unknown Future Value.
Options UnknownFalse PositiveTrue PositiveInformational Expected ActivityUnknown Future Value - Determination
determinationselect(Optional) Select the determination that you want to update in the specific alert in Azure. You can choose from the following options: Unknown, ATP, Malware, Security Personnel, Security Testing, Unwanted Software, Other, MultiStaged Attack, Compromised User, Phishing, Malicious User Activity, Clean, Insufficient Data, Confirmed User Activity, Line of Business Application, or Unknown Future Value.
Options UnknownATPMalwareSecurity PersonnelSecurity TestingUnwanted SoftwareOtherMultiStaged AttackCompromised UserPhishingMalicious User ActivityCleanInsufficient DataConfirmed User ActivityLine Of Business ApplicationUnknown Future Value - Status
statusselect(Optional) Select the status (life cycle status) that you want to update in the specific alert in Azure. You can choose from the following options: Unknown, New Alert, In Progress, or Resolved.
Options Unknown Future ValueNew AlertIn ProgressResolved
- Assigned To
assigned_totextSpecify the name of the analyst to whom you want to assign the specific alert that you want to update for triage, investigation, or remediation in Azure.
Add Comment on Security Alert 2 params
add_comment_on_security_alertadd_comment_on_security_alertAdds a comment to an existing alert based on the specified alert ID.
- Alert ID
alert_idtext requiredSpecify the unique Alert ID to which you want to add the comment. The alert ID is generated by the provider when an alert is created in Azure.
- Comment
commenttext requiredSpecify the comment you want to add to the specified alert.
Returns@odata.contextvalueGet Groups
get_groupsget_groupsRetrieves a list of groups from the Microsoft Graph API.
No parameters.
Returns@odata.contextvalueGet Users Within A Group 1 param
get_group_usersget_group_usersRetrieves a list of users within a specific group from the Microsoft Graph API based on the group ID you have specified.
- Group ID
group_idtext requiredSpecify the ID of the group whose users you want to retrieve from Microsoft Graph. Note: To get the Group ID, use the Get Groups operation.
Returns@odata.contextvalueSearch Message in Users Mailbox 4 params
search_messagesearch_messageSearches for messages in a user's mailbox within an organization based on the Subject and user list you have specified.
- Subject
subjecttext requiredSpecify a subject based on which you want to search for messages in Azure.
- User List
user_listtextarea requiredSpecify a comma-separated list of user IDs based on which you want to search messages in Azure.
- Page Size
sizeinteger(Optional) Number of messages you want to retrieve per user in this request. The default page size is 10. Page size should be between 1 to 1000.
- Offset
skipintegerNumber of messages you want to skip for each in this request.
ReturnsMessage_Found_ListMessage_Not_Found_ListRun_TimeTotal_Users_ProcessedDelete Message 2 params
del_messagedel_messageDeletes a specific message from the specific user's mailbox in Azure based on the user ID and message ID you have specified.
- User ID
user_idtext requiredSpecify the ID of the user based on which you want to delete the specific message from Azure.
- Message ID
message_idtext requiredSpecify the ID of the message that you want to delete from Azure.
Returnsstatus_codeDelete Message Bulk 1 param
del_message_bulkdel_message_bulkDeletes messages from multiple users' mailboxes in Azure based on the comma-separated list of users you have specified.
- User List
user_listjson requiredSpecify a comma-separated list of users' mailboxes, which is a list of JSON objects, based on which you want to delete bulk messages in Azure. The format of the list is as follows: [ { 'user_id':"", 'message_id':"" }, { 'user_id':"",'message_id':"" }]
ReturnsError_ListMessage_Deleted_ListRun_TimeTotal_Users_ProcessedRevoke User Session 1 param
revoke_user_sessionsrevoke_user_sessionsInvalidates all the refresh tokens issued to applications for a user.
- User ID or PrincipalName
usertext requiredSpecify the User ID or PrincipalName of the user whose refresh tokens you want to invalidate (revoke) from the Microsoft Graph API.
Returns@odata.contextvalueGet All Named Locations 6 params
get_all_named_locationsget_all_named_locationsRetrieves a list of named locations from Azure based on display name, sort order, and other input parameters that you have specified.
- Display Name
nametextSpecify the display name of the named location to retrieve from Azure.
- Required Fields
selectmultiselect(Optional) Select the sort order criterion to sort the results. Select the sorting order in the Sort Order field. You can choose from the following options: ID, Display Name, Created Date Time, Modified Date Time.
- Order By
order_byselect(Optional) Select the sort order criterion to sort the results. Select the sorting order in the Sort Order field. You can choose from the following options: ID, Display Name, Created Date Time, Modified Date Time.
Options IDDisplay NameCreated Date TimeModified Date TimeWhen Order By is ID
- Sort Order
orderselect(Conditional - This field appears after selecting an order criterion in Order By field) Specify the sort order from the following options: Ascending, Descending By default, it retrieves named locations in ascending order.
Options AscendingDescending
When Order By is Display Name
- Sort Order
orderselect(Optional) Orders the response Ascending or Descending order on specified field. By default it retrieves in ascending order.
Options AscendingDescending
When Order By is Created Date Time
- Sort Order
orderselect(Optional) Orders the response Ascending or Descending order on specified field. By default it retrieves in ascending order.
Options AscendingDescending
When Order By is Modified Date Time
- Sort Order
orderselect(Optional) Orders the response Ascending or Descending order on specified field. By default it retrieves in ascending order.
Options AscendingDescending
- Count
countcheckboxSelect to retrieve the total count of named locations matched in Azure. By default, it is set to false.
Default
false - Size
sizeintegerSpecify the number of named locations to retrieve in this request.
- Offset
skipinteger(Optional) Specify the number of named locations you want to skip in this request.
Returns@odata.contextvalueBlock New IP Ranges 3 params
block_new_ipsblock_new_ipsBlocks IPv4 and IPv6 address ranges in the specified NamedLocation in Azure.
- IP Named Location's UUID
namedLocationUuidtext requiredSpecify the unique Named Location ID for which you want to block the IP addresses.
- IPv4 Ranges
ipv4_ipstextSpecify IP address ranges in IPv4 CIDR format (1.2.3.4/32) to be blocked in the specified named location. You can specify multiple IPv4 ranges as comma-separated values. e.g. 10.10.10.10/14, 10.10.10.10/13, 10.10.10.10/09
- IPv6 Ranges
ipv6_ipstextSpecify IP address ranges in allowable IPv6 format, defined in IETF RFC5962, to be blocked in the specified named location. You can specify multiple IPv6 ranges as comma-separated values. e.g. 2001:db8::/43, 2001:db8::/47
Returns@odata.context@odata.typeiddisplayNamemodifiedDateTimecreatedDateTimeisTrustedipRangesUnblock IP Ranges 3 params
unblock_new_ipsunblock_new_ipsUnblocks IPv4 and IPv6 address ranges in the specified NamedLocation in Azure.
- IP Named Location's UUID
namedLocationUuidtext requiredSpecify the unique named location ID for which you want to unblock the IP addresses.
- IPv4 Ranges
ipv4_ipstextSpecify IP address ranges in IPv4 CIDR format (1.2.3.4/32) to be unblocked in the specified named location. You can specify multiple IPv4 ranges as comma-separated values. For example: 10.10.10.10/14, 10.10.10.10/13, 10.10.10.10/09
- IPv6 Ranges
ipv6_ipstextSpecify IP address ranges in IPv6 format, as defined in IETF RFC5962, to be unblocked in the specified named location. You can specify multiple IPv6 ranges as comma-separated values. For example: 2001:db8::/43, 2001:db8::/47
Returns@odata.context@odata.typeiddisplayNamemodifiedDateTimecreatedDateTimeisTrustedipRangesCreate IP Named Location 4 params
create_ip_range_locationcreate_ip_range_locationCreates a new IP named location in Azure based on the specified input parameter.
- Display Name
nametext requiredSpecify the display name of the named location to create in Azure.
- Is Trusted
is_trustedcheckboxSelect if the IP Range is trusted.
Default
false - IPv4 Ranges
ipv4_ipstextSpecify IP address ranges in IPv4 CIDR format (1.2.3.4/32) to be added in the specified named location. You can specify multiple IPv4 ranges as comma-separated values. For example: 10.10.10.10/14, 10.10.10.10/13, 10.10.10.10/09
- IPv6 Ranges
ipv6_ipstextSpecify IP address ranges in IPv6 format, as defined in IETF RFC5962, to be added in the specified named location. You can specify multiple IPv6 ranges as comma-separated values. For example: 2001:db8::/43, 2001:db8::/47
Returns@odata.context@odata.typeiddisplayNamemodifiedDateTimecreatedDateTimeisTrustedipRangesGet Security Incidents fork addition 6 params
get_security_incidentsget_security_incidentsRetrieves a list of alerts from the Microsoft Graph API based on the input parameters you have specified.
- Top
topintegerSpecifies the maximum number of incidents to return. If omitted, Microsoft Graph returns its default page size.
- Skip
skipintegerSkips the first N incidents before returning results. Primarily used for pagination.
- Filter
filtertextFilters incidents based on one or more properties using OData syntax. Example: status eq 'active'
- Order By
orderBytextSorts the returned incidents by a specified property in ascending (asc) or descending (desc) order. Example: lastUpdateDateTime desc
- Count
counttextReturns the total number of incidents that match the query in addition to the incident list. set it to 'true' if required.
- Fetch Alerts
fetchAlertscheckboxIf the checkbox is unchecked, alerts will not be fetched.
Default
true