Microsoft Graph Mail v2
Read, triage and clean up Microsoft 365 mail through Graph
Reads, searches, moves, copies, deletes, sends and tags Outlook mail in Microsoft 365 through Graph, with tenant-fed mailbox and folder pickers.
microsoft-graph-mail-v2_3.0.2.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.
Microsoft Graph Mail v2 connects FortiSOAR to Outlook mail in a Microsoft 365 tenant through Microsoft Graph. It reads unread mail, searches one folder or the whole mailbox, fetches a message with its internet headers, and lists and fetches attachments (file and item attachments are stored in the FortiSOAR file store). It moves, copies and deletes messages, one at a time or in bulk (up to 200 per call), manages folders and Outlook categories, sends, replies and forwards mail, submits an email or a URL to Microsoft threat submission, and lists and deletes inbox rules. Mailbox, folder and rule fields are dropdowns fed from the tenant. Execute an API Request calls any Graph path with the connector's own credentials.
Live-tested on FortiSOAR 8.0.1 against a Microsoft 365 lab tenant. All 25 operations returned a live success on version 3.0.1, and the live suite passed again on 3.0.2 (32 calls ok, 6 expected refusals, 10 playbook branches). 3.0.2 stops configuration loading from opening files named after the configuration's sections.
Not live-tested
Error classes, for every operation unless noted:
- 401 (invalid or expired token): the lab token is valid, so the lab never produced this class. Replayed offline from the Graph error shape.
- 429 (throttled): the lab tenant was not throttled. Replayed offline.
- 403 (access denied): the lab app holds these permissions, so the lab did not produce this class. Execute an API Request is the exception: it returned a live access-denied error. Replayed offline for the other operations.
- 404 (not found): the live refusal was a not-found code for most operations, and those are live. For Get Child Folders, Send Email, Create Email Threat Submission and List Mailbox Users the lab produced no not-found error, so the class is replayed offline.
- Get Email Templates reads the FortiSOAR email templates and makes no Graph call, so no Graph error class applies to it.
Operation branches:
- Send Email with body type Email Template: the live captures sent a direct subject and body. The template path is covered offline only.
- Create Email Threat Submission, Email URL type: the live captures submitted email content. The URL type is covered offline only.
- Search Emails with the All Folders source: the live captures searched a single folder. All Folders is covered offline only.
- Get Child Folders returning child folders, and List Mail Folder Paths returning nested paths: the lab mailboxes had no child folders. Nested paths are covered offline only.
- Get Attachment on a reference (cloud-link) attachment: Graph would not create a reference attachment on the lab tenant, so only file and item attachments were live. Reference attachments are covered offline only.
- Delete Inbox Rule with the dropdown value form (Name [rule id]): the live captures passed the bare rule ID. The dropdown form is covered offline only.
Authentication
Authentication needs a Microsoft Entra ID app registration. For application permission sign-in, grant the application permissions Mail.ReadWrite, Mail.Send, User.Read.All and ThreatSubmission.ReadWrite.All (the last one is used only by Create Email Threat Submission), with admin consent. For delegated sign-in, the scopes are Mail.Read and Mail.ReadWrite. Paste the client ID and secret from the app registration into the configuration; do not share them.
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. You can choose between On behalf of User - Delegated Permission or Without a User - Application Permission. For more information, see the Getting Access Tokens section.
Options 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 requiredID of the tenant that you have been provided for your Azure Active Directory instance.
- Application (client) ID
client_idtext requiredUnique ID of the Azure Active Directory 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 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 - 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 requiredID of the tenant that you have been provided for your Azure Active Directory instance.
- Application (client) ID
client_idtext requiredUnique ID of the Azure Active Directory 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 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 required(Only Applicable to On behalf of User - Delegated Permission) The authorization code that you acquired during the authorization step. For more information, see the Getting Access Tokens using the Delegated Permissions method section.
- Redirect URL
redirect_urltext(Only Applicable to On behalf of User - Delegated Permission) The redirect_url 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_url's you have registered in your app registration portal.
- Verify SSL
verify_sslcheckboxSpecifies whether the SSL certificate for the server is to be verified or not. By default, this option is set as True.
Default
true
Operations · 25
Get Unread Emails 6 params
get_unread_emailsget_unread_emailsRetrieves all unread emails from your Microsoft Outlook account. You can also mark the retrieved Unread emails as 'Read'.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Source Folder
sourceselect requiredSelect the source of the folder from which you want to retrieve unread emails from your Microsoft Outlook account. To specify a source, you can choose between 'Folder ID' or 'Folder Path'.
Default
Folder PathOptions Folder IDFolder PathWhen Source Folder is Folder ID
- Folder ID
folder_idtext requiredIf you choose 'Folder ID', then in the Folder ID field, specify the ID of the folder from which you want to retrieve emails. If you want to retrieve emails from a nested folder, then you need to specify folder IDs in the Parent_folder_id/child_folder_id format.
When Source Folder is Folder Path
- Folder Path
folder_idselect requiredIf you choose 'Folder Path', then in the Folder Path field, specify the mailbox from which you want to retrieve emails. If you want to retrieve emails from the parent level folder, then you only need to specify the name of the parent folder, for example, Inbox. If you want to retrieve emails from a child folder, then you need to specify the folder path. For example to retrieve emails from the 'Phishing' mailbox that is present within the 'Inbox folder', enter Inbox/Phishing in this field. Pick a folder from the list; the list follows the mailbox you selected.
- Mark as Read
mark_as_readcheckboxSelect this option, i.e., set it to True (default), to mark all the retrieved unread emails from your Microsoft Outlook account as Read. By default, this is set to True.
Default
true - Parse Inline Images
parse_inlinecheckboxSelect this option, i.e., set it to True, to retrieve the body of the emails including inline images from your Microsoft Outlook account. By default, this is set to False (option is unchecked).
Default
false - Save Email
save_emailcheckboxSelect this option, i.e., set it to True, to save the retrieved email as a file in the 'Attachments' module. By default, this is set to False (option is unchecked).
Default
false - Limit
limitinteger(Optional) The maximum number of emails, based on your filter criterion, you want to include in the output of this operation. If you do not specify anything in this field then all unread emails based on your filter criterion will be included in the output of this operation. By default, this is set to 20.
Default
20
Search Emails 7 params
search_emailssearch_emailsRuns a query in your Outlook account and searches for emails, based on input parameters, such as folder name or path, the user's ID or email address, Odata query, etc you have specified
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Source Folder
sourceselect requiredSelect the source of the folder that you want to search for emails in your Microsoft Outlook account. To specify a source, you can choose between 'Folder ID' or 'Folder Path'. Choose 'All Folders' to search every folder of the mailbox (the mailbox-wide message list); the folder field is then hidden.
Default
Folder PathOptions Folder IDFolder PathAll FoldersWhen Source Folder is Folder ID
- Folder ID
folder_idtext requiredProvide folder ID from which you want to retrieves emails. If you want to retrieves mails from a nested folder in this case you need to provide folder IDs below format E.g. Parent_folder_id/child_folder_id.
When Source Folder is Folder Path
- Folder Path
folder_idselect requiredIf you choose 'Folder Path', then in the Folder Path field, specify the mailbox where you want to search for emails. If you want to search for emails from the parent level folder, then you only need to specify the name of the parent folder, for example, Inbox. If you want to search for emails from a child folder, then you need to specify the folder path. For example to search for emails from the 'Phishing' mailbox that is present within the 'Inbox folder', enter Inbox/Phishing in this field. Pick a folder from the list; the list follows the mailbox you selected.
- Odata Query
odata_querytextProvide the OData query which you want to filter the emails. Note: the query parameter '$filter' is not supported when using the 'Search' parameter. please refer this link <a href="https://docs.microsoft.com/en-us/graph/query-parameters">Odata Query Parameters</a>
- Search
searchtextSpecify the search string using which you want to search for emails in your Outlook account. For more information, see Search Parameters.
- Mark as Read
mark_readcheckboxSelect this option, i.e., set it to True, to mark the unread emails that are searched and retrieved from your Microsoft Outlook account as Read. By default, this is set to False (option is unchecked).
Default
true - Parse Inline Images
parse_inlinecheckboxSelect this option, i.e., set it to True, to search and retrieve the body of the emails including inline images from your Microsoft Outlook account. By default, this is set to False (option is unchecked).
- Limit
limitinteger(Optional) The maximum number of emails, based on your filter criterion, you want to include in the result of this operation. By default, this is set to 20.
Default
20
Get Folders 2 params
get_foldersget_foldersRetrieves a collection of folders under the root (Top of information store) folder from your Outlook account based on the user's ID or email address you have specified.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Limit
limitinteger(Optional) The maximum number of folders you want to include in the result of this operation. By default, this is set to 100
Default
100
Get Child Folders 3 params
get_child_foldersget_child_foldersRetrieves the list of child folders under the specified folder from your Outlook account based on the user's ID or email address and parent folder ID or path you have specified.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Source Folder
source_folderselect requiredSelect the source of the parent folder from which you want to retrieve child folders from your Microsoft Outlook account. To specify a source, you can choose between 'Folder ID' or 'Folder Path'.
Default
Folder PathOptions Folder IDFolder PathWhen Source Folder is Folder ID
- Folder ID
folder_idtext requiredIf you choose 'Folder ID', then in the Folder ID field, specify the ID of the parent folder from which you want to retrieve child folders.
When Source Folder is Folder Path
- Folder Path
folder_idselect requiredIf you choose 'Folder Path', then in the Folder Path field, specify the parent folder from which you want to retrieve child folders. If you want to return child folders from nested folders, then you need to specify the folder path. For example to return child folders of the 'Phishing' folder that is present within the 'Inbox folder', enter Inbox/Phishing in this field. Pick a folder from the list; the list follows the mailbox you selected.
- Limit
limitinteger(Optional) The maximum number of child folders you want to include in the result of this operation. By default, this is set to 100.
Default
100
Move Email 3 params
move_emailmove_emailMoves an email to a specified folder in your Outlook account based on the message ID, the user's ID or email address, and the destination folder you have specified.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Destination Folder
destination_folderselect requiredSelect the destination folder where you want to move the email. To specify a destination folder, you can choose to specify either a folder ID or a folder path.
Default
Folder PathOptions Folder IDFolder PathWhen Destination Folder is Folder ID
- Folder ID
folder_idtext requiredIf you choose 'Folder ID', then in the Folder ID field, specify the ID of the folder to which you want to move the specified email.
When Destination Folder is Folder Path
- Folder Path
folder_idselect requiredIf you choose 'Folder Path', then in the Folder Path field, specify the mailbox to which you want to move the specified email. If you want to move the email to a parent level folder, then you only need to specify the name of the parent folder, for example, Inbox. If you want to move the email to a child folder, then you need to specify the folder path. For example to move the email to the 'Phishing' mailbox that is present within the 'Inbox folder', enter Inbox/Phishing in this field. Pick a folder from the list; the list follows the mailbox you selected.
- Message ID
message_idtext requiredThe ID of the message that you want to move into the specified folder in Outlook.
ReturnsidwebLinkbodyflagfromisReadsenderisDraftreplyTosubjectchangeKeycategoriesimportance@odata.etagbodyPreviewccRecipientssentDateTimetoRecipientsbccRecipients@odata.contextconversationIdhasAttachmentsparentFolderIdcreatedDateTimereceivedDateTimeconversationIndexinternetMessageIdlastModifiedDateTimeisReadReceiptRequestedinferenceClassificationCopy Email 3 params
copy_emailcopy_emailCopies an email to a specified folder in your Outlook account based on the message ID, the user's ID or email address, and the destination folder you have specified.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Destination Folder
destination_folderselect requiredSelect the destination folder where you want to copy the email. To specify a destination folder, you can choose to specify either a folder ID or a folder path.
Default
Folder PathOptions Folder IDFolder PathWhen Destination Folder is Folder ID
- Folder ID
folder_idtext requiredIf you choose 'Folder ID', then in the Folder ID field, specify the ID of the folder to which you want to copy the specified email.
When Destination Folder is Folder Path
- Folder Path
folder_idselect requiredIf you choose 'Folder Path', then in the Folder Path field, specify the mailbox to which you want to copy the specified email. If you want to copy the email to a parent level folder, then you only need to specify the name of the parent folder, for example, Inbox. If you want to copy the email to a child folder, then you need to specify the folder path. For example to copy the email to the 'Phishing' mailbox that is present within the 'Inbox folder', enter Inbox/Phishing in this field. Pick a folder from the list; the list follows the mailbox you selected.
- Message ID
message_idtext requiredThe ID of the message that you want to copy into the specified folder in Outlook.
ReturnsidwebLinkbodyflagfromisReadsenderisDraftreplyTosubjectchangeKeycategoriesimportance@odata.etagbodyPreviewccRecipientssentDateTimetoRecipientsbccRecipients@odata.contextconversationIdhasAttachmentsparentFolderIdcreatedDateTimereceivedDateTimeconversationIndexinternetMessageIdlastModifiedDateTimeisReadReceiptRequestedinferenceClassificationDelete Email 3 params
delete_emaildelete_emailDeletes a specific email message in the specified user's mailbox based on the message ID, the user's ID or email address, and the source folder you have specified.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Source Folder
sourceselectSelect the source folder from which you want to delete the specified email. To specify a source, you can choose between 'Folder ID' or 'Folder Path'.
Default
Folder PathOptions Folder IDFolder PathWhen Source Folder is Folder ID
- Folder ID
folder_idtext requiredIf you choose 'Folder Path', then in the Folder Path field, specify the mailbox from which you want to delete the specified email. If you want to delete the email from a parent level folder, then you only need to specify the name of the parent folder, for example, Inbox. If you want to delete the email from a child folder, then you need to specify the folder path. For example to copy the email to the 'Phishing' mailbox that is present within the 'Inbox folder', enter Inbox/Phishing in this field.
When Source Folder is Folder Path
- Folder Path
folder_idselect requiredThe path to the mailbox from which you want to delete the email. If you want to delete the email from the parent level folder in which you can only provide the name of the parent folder. E.g. Inbox. or If you want to delete the email from child folder in that case you can provide folder path. For example, 'Phishing' folder that is present within 'Inbox', you can enter Inbox/Phishing in this field. Pick a folder from the list; the list follows the mailbox you selected.
- Message ID
message_idtext requiredThe ID of the message that you want to delete from the specified folder in Outlook.
ReturnsstatusmessageDelete Messages (Bulk) 1 param
delete_messages_bulkdelete_messages_bulkDeletes many messages in one call, one {user_id, message_id} pair each, across any mailboxes. Each deletion is reported on its own: a message that cannot be deleted (for example, already gone) lands in Error_List and the rest still run. Limit 200 messages per call.
- User List
user_listjson requiredA list of {user_id, message_id} objects, one per message to delete. Up to 200 entries.
ReturnsMessage_Deleted_ListError_ListTotal_RequestedTotal_Users_ProcessedGet Email Templates
get_email_templatesget_email_templatesGet available email templates
No parameters.
Send Email 8 params
send_emailsend_emailSends an email mail to specified recipients from your Outlook account based on the recipient's email addresses, subject of the email, email content, etc you have specified.
- From
fromtext requiredThe email address from which you want to sent the email.
- Body Type
body_typeselectSelect the format in which you want to send the email. You can choose from the following options: Rich Text: Select to specify a subject and body of the email. Email Template: Select an email template to use to send the email. An existing email template is passed as an input for the email subject and body (content) allowing you to leverage an existing email template and build upon it, thereby, avoiding re-work and ensuring consistency.
Default
Rich TextOptions Rich TextEmail TemplateWhen Body Type is Rich Text
- Subject
subjecttext requiredSpecify a subject of the email that you want to send from the Microsoft Outlook mailbox account.
- Body
bodyrichtext(Optional) Specify a message or content of the email that you want to send from your Outlook account. You can add formatted content, images, and even custom jinja expressions to use dynamic values, in the Body field.
When Body Type is Email Template
- Email Template
email_templatesselect requiredSelect an email template to use to send the email. An existing email template is passed as an input for the email subject and body (content) allowing you to leverage an existing email template and build upon it, thereby, avoiding re-work and ensuring consistency. NOTE: This feature of using preexisting email templates for sending emails is only available in FortiSOAR™ v7.6.5 and later.
- To Recipients
to_recipientstext requiredEmail IDs of the members to whom you want to send the email message from your Outlook account. You must add the email IDs in the CSV or list format. For example, abc@xyz.com, def@lmn.com Important: You must specify email ID(s) in at least one of the following fields: To Recipients, Cc Recipients, or Bcc Recipients.
- Cc Recipients
cc_recipientstextEmail IDs of the members to be added to the Cc list of the email message that you want to send from your Outlook account. You must add the email IDs in the CSV or list format.
- Bcc Recipients
bcc_recipientstextEmail IDs of the members to be added to the Bcc list of the email message that you want to send from your Outlook account. You must add the email IDs in the CSV or list format.
- Attachment IRIs
iri_listtext(Optional) List of IRI ID(s) of the file(s) that you want to attach to the email that you want to send from your Outlook account. IRI IDs are used to access files from the FortiSOAR 'Attachments' module. You must add the Attachment IRIs in the CSV or list format.
- Flag
flagselect(Optional) Select the flag value to set the 'Status' of the specified email that you want to send from your Outlook account. You can choose between the following options: Complete, Flagged, or Not Flagged.
Options CompleteFlaggedNot Flagged - Importance
importanceselect(Optional) Select the importance value to set the 'Importance' of the specified email that you want to send from your Outlook account. You can choose between the following options: Low, Normal, or High
Options LowNormalHigh
ReturnsstatusmessageForward Email 4 params
forward_emailforward_emailForwards a specific email message to specified recipients from your Outlook account based on the recipient's email addresses, message ID, and email content you have specified.
- To Recipients
to_recipientstext requiredEmail IDs of the members to whom you want to forward the email message from your Outlook account. You must add the email IDs in the CSV or list format. For example, abc@xyz.com, def@lmn.com
- From Recipients
from_recipientstext requiredThe email address from which you want to forward the email.
- Message ID
message_idtext requiredID of the email message that you want to forward to the specified recipient's addresses.
- Body
bodyrichtext(Optional) Message or content of the email that you want to add while forwarding the same from your Outlook account.
ReturnsstatusmessageSend Mail as Reply 7 params
send_email_as_replysend_email_as_replySend mail as a reply to a specific email message to specified recipients in your Outlook account based on the message ID, recipient's email addresses, subject of the email, email content, etc you have specified.
- Message ID
message_idtext requiredID of the email message to which you want to send a reply.
- From Recipients
from_recipientstext requiredThe email address from which you want to send mail as reply to the specified email thread.
- To Recipients
totextEmail IDs of the members to whom you want to send the reply email from your Outlook account. Specify the email IDs in the CSV or list format. For example, abc@xyz.com, def@lmn.com. If user does not provide this value in that case send email as reply from original sender of the email.
- Cc Recipients
cc_recipientstextEmail IDs of the members to be added to the Cc list of the email message that you want to send a reply email from your Outlook account. You must add the email IDs in the CSV or list format.
- Bcc Recipients
bcc_recipientstextEmail IDs of the members to be added to the Bcc list of the email message that you want to send a reply email from your Outlook account. You must add the email IDs in the CSV or list format.
- Body
bodyrichtext(Optional) Message or content of the email that you want to send as a reply from your Outlook account.
- Attachment IRIs
iri_listtextList of IRI ID(s) of the file(s) that you want to attach to the reply email that you want to send from your Outlook account. IRI IDs are used to access files from the FortiSOAR 'Attachments' module. You must add the Attachment IRIs in the CSV or list format.
ReturnsstatusmessageCreate Email Threat Submission 2 params
create_email_threat_submissioncreate_email_threat_submissionCreates a new email threat submission rule based on email threat type, category and other input parameters that you have specified.
- Threat Submission Type
inputselect requiredOptions Email Content Threat SubmissionEmail URL Threat SubmissionWhen Threat Submission Type is Email Content Threat Submission
- Data Type
@odata.typetext requiredSpecify the data type of the email threat submission rule to create. For example: microsoft.graph.security.emailContentThreatSubmission
Default
#microsoft.graph.security.emailContentThreatSubmission - Category
categoryselect requiredSpecify the original category of the submission.
Default
SpamOptions Not JunkSpamPhishingMalware - Recipient Email Address
recipientEmailAddresstext requiredSpecify the email address (in SMTP format) of the recipient who received the email.
- File Content
fileContenttext requiredSpecify the X-MS-Exchange-Organization-Network-Message-Id of email threat submission rule to create.
Default
X-MS-Exchange-Organization-Network-Message-Id:
When Threat Submission Type is Email URL Threat Submission
- Data Type
@odata.typetext requiredSpecify the data type of the email threat submission rule to create. For example: microsoft.graph.security.emailContentThreatSubmission
Default
#microsoft.graph.security.emailUrlThreatSubmission - Category
categoryselect requiredSpecify the original category of the submission.
Default
SpamOptions Not JunkSpamPhishingMalware - Recipient Email Address
recipientEmailAddresstext requiredSpecify the email address (in SMTP format) of the recipient who received the email.
- Message URL
messageUrltext requiredSpecify the URL of the message to be submitted. For example: https://graph.microsoft.com/beta/users/your-user-id/messages/message-id
- Other Parameters
other_paramsjsonSpecify the key-value pairs of parameters to send as request body to this action. For more information, refer https://learn.microsoft.com/en-us/graph/api/security-emailthreatsubmission-post-emailthreats?view=graph-rest-beta&tabs=http#request-body
Returns@odata.context@odata.typeidclientSourcecreatedDateTimecontentTypestatustenantIdcategorysourcerecipientEmailAddressinternetMessageIdsubjectsendersenderIPreceivedDateTimeoriginalCategorymessageUrlresultadminReviewattackSimulationInfotenantAllowOrBlockListActioncreatedByGet Email Categories 2 params
get_email_categoriesget_email_categoriesGets the categories assigned to the email based on the message ID and User ID or User Principal Name that you have specified.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Message ID
message_idtext requiredSpecify the message ID of the email message to get the list of available categories.
Returnscategoriesmessage_idemai_addressAdd Email Category 3 params
add_email_categoryadd_email_categoryAssigns categories to an email message in Outlook based on the Message ID and User ID or User Principal Name that you have specified.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Message ID
message_idtext requiredSpecify the message ID of the email message to assign the email categories.
- Category
categorytext requiredSpecify the CSV list of categories to assign to the email in Outlook.
ReturnsidwebLinkbodyflagfromisReadsenderisDraftreplyTosubjectchangeKeycategoriesimportance@odata.etagbodyPreviewccRecipientssentDateTimetoRecipientsbccRecipients@odata.contextconversationIdhasAttachmentsparentFolderIdcreatedDateTimereceivedDateTimeconversationIndexinternetMessageIdlastModifiedDateTimeisReadReceiptRequestedinferenceClassificationRemove Email Category 3 params
remove_email_categoryremove_email_categoryRemove specified categories from an email message in Outlook based on the Message ID and User ID or User Principal Name that you have specified.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Message ID
message_idtext requiredSpecify the message ID of the email message from which to remove the email categories.
- Category
categorytext requiredSpecify the CSV list of categories to remove from the email in Outlook.
ReturnsidwebLinkbodyflagfromisReadsenderisDraftreplyTosubjectchangeKeycategoriesimportance@odata.etagbodyPreviewccRecipientssentDateTimetoRecipientsbccRecipients@odata.contextconversationIdhasAttachmentsparentFolderIdcreatedDateTimereceivedDateTimeconversationIndexinternetMessageIdlastModifiedDateTimeisReadReceiptRequestedinferenceClassificationExecute an API Request 4 params
execute_api_requestexecute_api_requestSends an API request to any Microsoft Graph Mail API endpoint based on specified HTTP method, endpoint, and other input parameters that you have specified, enabling flexible API interactions tailored to user needs.
- Endpoint
endpointtext requiredSpecify the target API URL path for the request. For example, if the website is https://example.com and URL path is https://example.com/images/pic.jpg, the endpoint would be /images/pic.jpg.
- Method
methodselect requiredSelect an HTTP action for the request. You can select from the following options: DELETE, GET, PATCH, POST, PUT
Default
GETOptions DELETEGETPATCHPOSTPUT - Query Parameters
query_paramsjson(Optional) Specify any optional parameters to add to the URL and refine the request.
- Payload
payloadjson(Optional) Specify data, as JSON, to be sent as the request payload (typically for POST or PUT requests).
Get Message 2 params
get_messageget_messageGets one message by ID with its internet message headers (for phishing triage), body and attachment metadata.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Message ID
message_idtext requiredThe ID of the message that you want to move into the specified folder in Outlook.
ReturnsidsubjectbodyPreviewinternetMessageIdhasAttachmentsinternetMessageHeadersattachmentsList Attachments 2 params
list_attachmentslist_attachmentsLists the attachments of one message as metadata (name, type, size, inline flag). Attachment bytes are not returned; use Get Attachment to fetch one.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Message ID
message_idtext requiredThe ID of the message that you want to move into the specified folder in Outlook.
ReturnsvalueGet Attachment 3 params
get_attachmentget_attachmentFetches one attachment. File attachments and item attachments (saved as .eml) are stored in the FortiSOAR file store and returned with cyops_file_path and a SHA-256. Reference attachments are not downloaded; sourceUrl is returned.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Message ID
message_idtext requiredThe ID of the message that you want to move into the specified folder in Outlook.
- Attachment ID
attachment_idtext requiredThe ID of the attachment to fetch.
Returnsidnameattachment_typesavedcyops_file_pathsha256sizenoteList Inbox Rules 1 param
list_inbox_ruleslist_inbox_rulesLists the inbox rules of a mailbox. Each rule carries forwardsOrRedirects and deletesMail flags. Use it in business email compromise (BEC) checks.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
ReturnsiddisplayNamesequenceisEnabledactionsconditionsforwardsOrRedirectsdeletesMailDelete Inbox Rule 2 params
delete_inbox_ruledelete_inbox_ruleDeletes one inbox rule from a mailbox by its rule ID. Use it to remove attacker forwarding or deletion rules; the change is not reversible from this connector.
- User ID/User Principal Name
user_idselect requiredPick the user or mailbox (user principal name, usually an email address) from the tenant users. The list shows up to 999 users.
- Rule ID
rule_idselect requiredThe inbox rule to delete. Pick it from the list of the mailbox rules; a bare rule ID also works.
Returnsstatusmessagerule_idList Mailbox Users
list_mailbox_userslist_mailbox_usersLists the user principal names in the tenant for the mailbox dropdowns (first 999 users).
No parameters.
List Mail Folder Paths
list_mail_folder_pathslist_mail_folder_pathsLists the mail folder paths of the selected mailbox for the folder dropdowns (up to three levels).
No parameters.
List Inbox Rule Choices
list_inbox_rule_choiceslist_inbox_rule_choicesLists the inbox rules of the selected mailbox as 'Name [rule id]' for the rule dropdown.
No parameters.