Microsoft Graph API Mail and Communication
this connector provides integration with microsoft graph api for managing mail and communication services, enabling automated workflows for email operations, contact management, and event scheduling microsoft graph api mail and communication connector enables seamless integration with microsoft's email and communication services it allows users to automate email management tasks such as creating contacts and events, deleting emails, and managing attachments directly within swimlane turbine this integration empowers security teams to streamline communication related workflows, enhance incident response, and maintain up to date contact information without manual intervention configuration prerequisites to utilize the microsoft graph api mail and communication connector, ensure you have the following prerequisites client credentials and tenant id authentication with these parameters url endpoint for microsoft graph api client id application id registered in azure ad client secret key generated for the application in azure ad tenant id directory id of the azure ad tenant scope permissions required for the api calls oauth 2 0 client credentials with these parameters url endpoint for microsoft graph api client id application id registered in azure ad client secret key generated for the application in azure ad token url url to retrieve the oauth token scope permissions required for the api calls delegated flow authentication with these parameters url endpoint for microsoft graph api tenant id directory id of the azure ad tenant and so on authentication methods oauth 2 0 client credentials authentication with these parameters url endpoint for microsoft graph api client id application (client) id registered in azure ad client secret client secret (key) generated for the application in azure ad token url url to retrieve the oauth token scope permissions the app requires password grant (delegated authentication) for acting on behalf of a user url endpoint for microsoft graph api tenant id directory id of the azure ad tenant oauth un user's username to authenticate oauth pwd user's password to authenticate oauth cl id application (client) id registered in azure ad oauth cl secret client secret (key) generated for the application in azure ad login url login url default value is https //login microsoftonline com (optional) scope permissions the app requires optional field (optional) asset credentials specific to your organization (microsoft graph api asset tenant id) url endpoint for microsoft graph api client id application (client) id registered in azure ad client secret client secret (key) generated for the application in azure ad tenant id directory id of the azure ad tenant scope permissions the app requires authentication for oauth2 refresh token grant credentials for microsoft graph api authentication url endpoint for microsoft graph api client id application (client) id registered in azure ad client secret client secret (key) generated for the application in azure ad refresh token refresh token scope permissions the app requires capabilities the microsoft graph api connector gives the ability to get and update security alerts, and modify user licenses and sessions create contact create event delete email expand and get item properties attached to message export email as eml forward email get email attachments get emails get emails from folder get emails from a folder get list of child folders get manager root level move email reply to email send email and so on asset setup client credential flow authentication authentication uses azure application oauth2 you will need an admin account in azure to create the application recommended application permissions (feel free use custom permissions if you only use certain actions) user readwrite all directory readwrite all directory accessasuser all mail readwrite mail send auditlog read all mail readbasic all user readwrite all userauthenticationmethod read all userauthenticationmethod readwrite all in order to set up the asset, you need the following azure application client id azure application client secret azure tenant id steps to create the azure app go to the https //portal azure com/#blade/microsoft aad registeredapps/applicationslistblade in the azure portal click new registration enter a name for your new application and choose accounts in this organizational directory only , then click register at the bottom navigate to the api permissions tab on the left navigation menu select add a permission select microsoft graph select application permissions , then mark all the permissions you need for the actions you are using (see suggested permissions at the top of the asset setup section) click the add permissions button at the bottom of the page select grant admin consent for your organization, then your permissions should look as below navigate to the certificates & secrets tab and select new client secret fill out the description and expiration, then click the add button at the bottom the value of the secret you just created is the client secret needed for the swimlane asset navigate to the overview tab on the left menu the client id and tenant id needed in the asset are shown on this page the client id , tenant id , and client secret described in the steps above are the credentials you need for the asset password flow (delegated auth) use delegated permissions, instead of application permissions, and generate client id , tenant id , and client secret as described in the above client credential flow authentication we also need an username and a password for this authentication authentication flow for oauth2 refresh token oauth 2 0 refresh token grant, which requires a refresh token , tenant id , client id and client secret use this auth with accounts which have mfa enabled to generate a refresh token please follow the instructions below in step 3 of the above mentioned setup instructions, please provide a redirect uri and select the platform as 'web', before clicking on register at the the bottom proceed with the remaining steps to generate 'client id', tenant id and client secret add the permissions in delegated permissions the swimlane team will provide a python script and instructions on how to use the script to generate the refresh token limit access to specific mailboxes administrators who want to limit app access to specific mailboxes can create an application access policy by using the new applicationaccesspolicy powershell cmdlet for more information please see the article https //docs microsoft com/en us/graph/auth limit mailbox access action setup odata filters information on the filter input formatting can be found https //docs microsoft com/en us/graph/query parameters#filter parameter keep in mind that not specifying a folder as an input will result in the query affecting all possible folders example if we want to ingest only unread emails, and we don't set the input "folder", we will ingest all unread emails from all folders, including "deleted items", "junk", etc well known folders well known folders can be used instead of folder ids for email actions all well known folder names can be found https //docs microsoft com/en us/graph/api/resources/mailfolder?view=graph rest 1 0 sites get site all the sites actions require the site id to be executed the site id can be obtained using the action sites get site, in order to run the action the site hostname and site name are needed this two values can be found in a site url https //{site hostname} sharepoint com/sites/{site name} for example if our site url is https //swimlaneintegrations sharepoint com/sites/integrationssite we should use site hostname swimlaneintegrations site name integrationssite after the action execution you can find the site id on the id output field sites create list in order to create a list with its columns, use the input columns you can find all the possible values with its configuration on the following table property name type description boolean https //docs microsoft com/en us/graph/api/resources/booleancolumn?view=graph rest 1 0 this column stores boolean values calculated https //docs microsoft com/en us/graph/api/resources/calculatedcolumn?view=graph rest 1 0 this column's data is calculated based on other columns choice https //docs microsoft com/en us/graph/api/resources/choicecolumn?view=graph rest 1 0 this column stores data from a list of choices currency https //docs microsoft com/en us/graph/api/resources/currencycolumn?view=graph rest 1 0 this column stores currency values datetime https //docs microsoft com/en us/graph/api/resources/datetimecolumn?view=graph rest 1 0 this column stores datetime values geolocation https //docs microsoft com/en us/graph/api/resources/geolocationcolumn?view=graph rest 1 0 this column stores a geolocation lookup https //docs microsoft com/en us/graph/api/resources/lookupcolumn?view=graph rest 1 0 this column's data is looked up from another source in the site number https //docs microsoft com/en us/graph/api/resources/numbercolumn?view=graph rest 1 0 this column stores number values personorgroup https //docs microsoft com/en us/graph/api/resources/personorgroupcolumn?view=graph rest 1 0 this column stores person or group values text https //docs microsoft com/en us/graph/api/resources/textcolumn?view=graph rest 1 0 this column stores text values validation https //docs microsoft com/en us/graph/api/resources/columnvalidation?view=graph rest 1 0 this column stores validation formula and message for the column hyperlinkorpicture https //docs microsoft com/en us/graph/api/resources/hyperlinkorpicturecolumn?view=graph rest 1 0 this column stores hyperlink or picture values term https //docs microsoft com/en us/graph/api/resources/termcolumn?view=graph rest 1 0 this column stores taxonomy terms thumbnail https //docs microsoft com/en us/graph/api/resources/thumbnailcolumn?view=graph rest 1 0 this column stores thumbnail values contentapprovalstatus https //docs microsoft com/en us/graph/api/resources/contentapprovalstatuscolumn?view=graph rest 1 0 this column stores content approval status for a complete version of this table please see https //docs microsoft com/en us/graph/api/resources/columndefinition?view=graph rest 1 0#properties create list column refer to the above table to get the type properties and column type input the type properties are documented within the links in the type column get list items in order to use the filter input please refer to the docid\ ylawlxbir2lxxs3j7 sh section the column used to filter the output must be indexed, see the https //support microsoft com/en us/office/add an index to a list or library column f3f00554 b7dc 44d1 a2ed d477eac463b0?ui=en us\&rs=en us\&ad=us to add an index to a list limitations when using $filter and $orderby in the same query to get messages, make sure to specify properties in the following ways properties that appear in $orderby must also appear in $filter properties that appear in $orderby are in the same order as in $filter properties that are present in $orderby appear in $filter before any properties that aren't failing to do this results in the following error error code inefficientfilter error message the restriction or sort order is too complex for this operation the assign/remove user license requires either the disabled plans and accompanying sku ids to assign licenses or the sku id of the license you want to remove the get security alert has additional information it can return there are a large number of fields that don't relate to many alerts, so they are not mapped; you can add them if desired notes https //social technet microsoft com/wiki/contents/articles/33525 an introduction to microsoft graph api aspx https //docs microsoft com/en us/graph/api/overview?view=graph rest 1 0 https //docs microsoft com/en us/graph/query parameters https //requests oauthlib readthedocs io/en/latest/oauth2 workflow\ html#legacy application flow , this is sort of a hack to bypass manual login (typically required) configurations microsoft graph api asset tenant id authenticates using client credentials and tenant id configuration parameters parameter description type required url a url to the target host string required tenant id the tenant id string required client id the client id string required client secret the client secret string required scope list of permission scopes for this action array required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional password grant (delegated authentication) authenticates on behalf of a user using oauth 2 0 credentials configuration parameters parameter description type required url a url to the target host string required login url string optional tenant id string required oauth un the username for authentication string required oauth pwd the password for authentication string required oauth cl id the client id string required oauth cl secret the client secret string required scope permission scopes for this action array optional verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional oauth 2 0 client credentials authenticates using oauth 2 0 client credentials configuration parameters parameter description type required url a url to the target host string required token url must start with https //login microsoftonline com/ and then continue with the tenant id, and then be prepended with /oauth2/v2 0/token string required client id the client id string required client secret the client secret string required scope list of permission scopes for this action array required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional ms graph openid connect refresh token grant authenticates using refresh token configuration parameters parameter description type required url a url to the target host string required cl id the client id string required cl secret the client secret string required refresh token refresh token string optional verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions create contact adds a new contact to a specified folder in microsoft graph api using the provided 'id' requires path parameters and json body endpoint url /v1 0/users/{{id}}/contacts method post input argument name type required description path parameters id string required parameters for the create contact action givenname string optional the contact's given name surname string optional the contact's surname emailaddresses array optional the contact's email addresses emailaddresses address string optional the email address of the contact emailaddresses name string optional the display name of the contact businessphones array optional the contact's business phone numbers input example {"json body" {"givenname" "pavel","surname" "bansky","emailaddresses" \[{"address" "pavelb\@contoso com","name" "pavel bansky"}],"businessphones" \["+1 732 555 0102"]},"path parameters" {"id" "aaron ooi swimlane com#ext#@swimlaneintegrations onmicrosoft com"}} output parameter type description status code number http status code of the response reason string response reason phrase id string unique identifier createddatetime string time value lastmodifieddatetime string time value displayname string name of the resource output example {"id" "id value","createddatetime" "2015 11 09t02 14 32z","lastmodifieddatetime" "2015 11 09t02 14 32z","displayname" "pavel bansky"} create event creates a new calendar event in a user's calendar identified by email address using the microsoft graph api endpoint url /v1 0/users/{{email address}}/events method post input argument name type required description path parameters email address string required parameters for the create event action headers object optional http headers for the request headers prefer string optional specify the time zone for the start and end times in the response subject string optional the text of the event's subject line body object optional the body of the message associated with the event it can be in html or text format body contenttype string optional the content of the item body content string optional the type of the content start object optional the start date, time, and time zone of the event by default, the start time is in utc start datetime string optional a single point of time in a combined date and time representation ({date}t{time}; for example, 2017 08 29t04 00 00 0000000) start timezone string optional represents a time zone, for example, "pacific standard time" end object optional the date, time, and time zone that the event ends by default, the end time is in utc end datetime string optional a single point of time in a combined date and time representation ({date}t{time}; for example, 2017 08 29t04 00 00 0000000) end timezone string optional represents a time zone, for example, "pacific standard time" location object optional the location of the event location displayname string optional the name associated with the location locations array optional the locations where the event is held or attended from the location and locations properties always correspond with each other if you update the location property, any prior locations in the locations collection would be removed and replaced by the new location value locations displayname string optional the name associated with the location locations locationtype string optional the type of location locations uniqueidtype string optional for internal use only locations locationemailaddress string optional optional email address of the location locations locationuri string optional optional uri representing the location locations uniqueid string optional for internal use only locations address object optional the street address of the location locations address city string optional the city locations address countryorregion string optional the country or region it's a free format string value, for example, "united states" input example {"path parameters" {"email address" "integrations\@swimlaneintegrations onmicrosoft com"},"headers" {"prefer" "outlook timezone=\\"pacific standard time\\""}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @odata etag string response data id string unique identifier createddatetime string time value lastmodifieddatetime string time value changekey string output field changekey categories array output field categories transactionid object unique identifier originalstarttimezone string output field originalstarttimezone originalendtimezone string output field originalendtimezone icaluid string unique identifier uid string unique identifier reminderminutesbeforestart number output field reminderminutesbeforestart isreminderon boolean output field isreminderon hasattachments boolean output field hasattachments subject string output field subject bodypreview string request body data importance string output field importance sensitivity string output field sensitivity isallday boolean output field isallday iscancelled boolean output field iscancelled isorganizer boolean output field isorganizer responserequested boolean output field responserequested output example {"@odata context" "string","@odata etag" "string","id" "12345678 1234 1234 1234 123456789abc","createddatetime" "string","lastmodifieddatetime" "string","changekey" "string","categories" \["string"],"transactionid" {},"originalstarttimezone" "string","originalendtimezone" "string","icaluid" "string","uid" "string","reminderminutesbeforestart" 123,"isreminderon"\ true,"hasattachments"\ true} delete email permanently removes an email from a specified mailbox by using the email address and email id through microsoft graph api endpoint url /v1 0/users/{{email address}}/messages/{{email id}} method delete input argument name type required description path parameters email address string required the account associated with the email path parameters email id string required the id of the email input example {"path parameters" {"email address" "string","email id" "string"}} output parameter type description status code number http status code of the response reason string response reason phrase response text string output field response text output example {"response text" "string"} expand and get item properties attached to message retrieves properties of an email attachment using the provided email address, email id, and attachment id in microsoft graph api endpoint url /v1 0/users/{{email address}}/messages/{{email id}}/attachments/{{attachment id}}/ method get input argument name type required description path parameters email address string required the account associated with the email path parameters email id string required the id of the email to retrieve attachments from path parameters attachment id string required attachment id remove content bytes boolean optional remove content bytes from the response parameters $expand string optional to get the properties of an item attachment (contact, event, or message) input example {"parameters" {"$expand" "microsoft graph itemattachment/item"},"path parameters" {"email address" "integrations\@ onmicrosoft com","email id" "aamkadmxzmu3zwq4ltmzngitngy3zc1im2uxlwm3mdqzogvjmzlknwbgaaaaaaahypwuvwmwsrfeylv6xhmzbwcbjrt9 oidtlplg45rvpkcaaaaaaemaacbjrt9 oidtlplg45rvpkcaaqxsrlaaaa=","attachment id" "aamkadmxzmu3zwq4ltmzngitngy3zc1im2uxlwm3mdqzogvjmzlknwbgaaaaaaahypwuvwmwsrfeylv6xhmzbwcbjrt9 oidtlplg45rvpkcaaaaaaemaacbjrt9 oidtlplg45rvpkcaaqxsrlaaaabegaqabype5lwci5cg91dh8n8e s="},"remove content bytes"\ true} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @odata type string response data id string unique identifier lastmodifieddatetime string time value name string name of the resource contenttype object type of the resource size number output field size isinline boolean output field isinline item\@odata associationlink string response data item\@odata navigationlink string response data item object output field item item \@odata type string response data item id string unique identifier item createddatetime string time value item lastmodifieddatetime string time value item receiveddatetime string time value item sentdatetime string time value item hasattachments boolean output field item hasattachments item internetmessageid string unique identifier item subject string output field item subject item bodypreview string request body data item importance string output field item importance item conversationid string unique identifier output example {"@odata context" "string","@odata type" "string","id" "12345678 1234 1234 1234 123456789abc","lastmodifieddatetime" "string","name" "example name","contenttype" {},"size" 123,"isinline"\ true,"item\@odata associationlink" "string","item\@odata navigationlink" "string","item" {"@odata type" "string","id" "12345678 1234 1234 1234 123456789abc","createddatetime" "string","lastmodifieddatetime" "string","receiveddatetime" "string","sentdatetime" "string","hasattachments"\ true,"internetmessageid" "stri export email as eml exports an email as an eml file by using a specified id and email address via the microsoft graph api endpoint url /v1 0/users/{{email address}}/messages/{{id}}/$value method get input argument name type required description path parameters email address string required parameters for the export email as eml action path parameters id string required parameters for the export email as eml action filename string optional filename for the generated eml file default {first 20 characters of message id} eml input example {"path parameters" {"email address" "travis riley\@swimlaneintegrations onmicrosoft com","id" "kh5kvs jt3jbwcgdzougk1yryre5w5mstjuaaaaaaemaacgdzougk1yryre5w5mstjuaaoqsnsjaaa="}} output parameter type description status code number http status code of the response reason string response reason phrase file object attachments file file string output field file file file file name string name of the resource output example {"file" {"file" "string","file name" "example name"}} forward email forwards an email from a specified address to designated recipients with an optional comment using microsoft graph api endpoint url /v1 0/users/{{email address}}/messages/{{email id}}/forward method post input argument name type required description path parameters email address string required the account associated with the email path parameters email id string required the id of the email comment string optional a comment to include can be an empty string torecipients array optional the list of direct recipient objects torecipients emailaddress object required parameter for forward email torecipients emailaddress address string required parameter for forward email torecipients emailaddress name string optional name of the resource input example {"path parameters" {"email address" "string","email id" "string"},"comment" "string","torecipients" \[{"emailaddress" {"address" "string","name" "example name"}}]} output parameter type description status code number http status code of the response reason string response reason phrase response text string output field response text output example {"response text" "string"} get email attachments retrieve all attachments from a specified email in microsoft graph api using the provided email address and email id endpoint url /v1 0/users/{{email address}}/messages/{{email id}}/attachments method get input argument name type required description path parameters email address string required the account associated with the email path parameters email id string required the id of the email to retrieve attachments from parameters $expand string optional to get the properties of an item attachment (contact, event, or message) remove content bytes boolean optional the account associated with the email input example {"parameters" {"$expand" "microsoft graph itemattachment/item"}} output parameter type description status code number http status code of the response reason string response reason phrase attachments array output field attachments attachments 0 object output field attachments 0 attachments 0 file name string name of the resource attachments 0 file string output field attachments 0 file @odata context string response data value array value for the parameter value \@odata type string response data value \@odata mediacontenttype string response data value id string unique identifier value lastmodifieddatetime string value for the parameter value name string name of the resource value contenttype string type of the resource value size number value for the parameter value isinline boolean value for the parameter value contentid object unique identifier value contentlocation object value for the parameter output example {"@odata context" "https //graph microsoft com/v1 0/$metadata#users('integrations%40swimlaneintegra ","value" \[{"@odata type" "#microsoft graph fileattachment","@odata mediacontenttype" "image/png","id" "aamkadmxzmu3zwq4ltmzngitngy3zc1im2uxlwm3mdqzogvjmzlknwbgaaaaaaahypwuvwmwsrfeylv6 ","lastmodifieddatetime" "2022 05 11t04 55 25z","name" "test file png","contenttype" "image/png","size" 1569,"isinline"\ false,"contentid"\ null,"contentlocation"\ null}]} get emails retrieves a list of emails for a given 'email address' using the microsoft graph api, providing access to user messages endpoint url /v1 0/users/{{email address}}/messages method get input argument name type required description path parameters email address string required the account associated with the email parameters count string optional include a count of the total number of items in a collection alongside the page of data values returned from microsoft graph parameters filter string optional use the $filter query parameter to retrieve just a subset of a collection for guidance on using $filter, see https //learn microsoft com/en us/graph/filter query parameter parameters orderby string optional to sort the results in ascending or descending order, append either asc or desc to the field name, separated by a space parameters top number optional sets the page size of results headers object optional http headers for the request headers prefer string optional the format of the body and uniquebody properties to be returned in values can be "text" or "html" a preference applied header is returned as confirmation if this prefer header is specified if the header is not specified, the body and uniquebody properties are returned in html format input example {"headers" {"prefer" "outlook body content type='text'"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @odata count number response data value array value for the parameter value \@odata etag string response data value id string unique identifier value createddatetime string value for the parameter value lastmodifieddatetime string value for the parameter value changekey string value for the parameter value categories array value for the parameter value categories file name string name of the resource value categories file string value for the parameter value receiveddatetime string value for the parameter value sentdatetime string value for the parameter value hasattachments boolean value for the parameter value internetmessageid string unique identifier value subject string value for the parameter value bodypreview string request body data value importance string value for the parameter value parentfolderid string unique identifier value conversationid string unique identifier value conversationindex string value for the parameter value isdeliveryreceiptrequested object value for the parameter value isreadreceiptrequested boolean value for the parameter output example {"@odata context" "string","@odata count" 123,"value" \[{"@odata etag" "string","id" "12345678 1234 1234 1234 123456789abc","createddatetime" "string","lastmodifieddatetime" "string","changekey" "string","categories" \[],"receiveddatetime" "string","sentdatetime" "string","hasattachments"\ true,"internetmessageid" "string","subject" "string","bodypreview" "string","importance" "string","parentfolderid" "string","conversationid" "string"}],"@odata nextlink" "string"} get emails from a folder retrieve emails from a specified folder in a user's mailbox on microsoft graph api using the email address and folder id endpoint url /v1 0/users/{{email address}}/mailfolders/{{folder id}}/messages method get input argument name type required description path parameters email address string required the account associated with the email path parameters folder id string required the folder to get emails from parameters count string optional include a count of the total number of items in a collection alongside the page of data values returned from microsoft graph parameters filter string optional use the $filter query parameter to retrieve just a subset of a collection for guidance on using $filter, see https //learn microsoft com/en us/graph/filter query parameter parameters orderby string optional to sort the results in ascending or descending order, append either asc or desc to the field name, separated by a space parameters top number optional sets the page size of results headers object optional http headers for the request headers prefer string optional the format of the body and uniquebody properties to be returned in values can be "text" or "html" a preference applied header is returned as confirmation if this prefer header is specified if the header is not specified, the body and uniquebody properties are returned in html format input example {"headers" {"prefer" "outlook body content type='text'"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @odata count number response data value array value for the parameter value \@odata etag string response data value id string unique identifier value createddatetime string value for the parameter value lastmodifieddatetime string value for the parameter value changekey string value for the parameter value categories array value for the parameter value categories file name string name of the resource value categories file string value for the parameter value receiveddatetime string value for the parameter value sentdatetime string value for the parameter value hasattachments boolean value for the parameter value internetmessageid string unique identifier value subject string value for the parameter value bodypreview string request body data value importance string value for the parameter value parentfolderid string unique identifier value conversationid string unique identifier value conversationindex string value for the parameter value isdeliveryreceiptrequested object value for the parameter value isreadreceiptrequested boolean value for the parameter output example {"@odata context" "string","@odata count" 123,"value" \[{"@odata etag" "string","id" "12345678 1234 1234 1234 123456789abc","createddatetime" "string","lastmodifieddatetime" "string","changekey" "string","categories" \[],"receiveddatetime" "string","sentdatetime" "string","hasattachments"\ true,"internetmessageid" "string","subject" "string","bodypreview" "string","importance" "string","parentfolderid" "string","conversationid" "string"}],"@odata nextlink" "string"} get emails from folder retrieve emails from a specified folder in a user's microsoft graph api account using the email address and folder id endpoint url /v1 0/users/{{email address}}/mailfolders/{{folder id}}/messages method get input argument name type required description path parameters email address string required the account associated with the email path parameters folder id string required the folder id, or a well known folder name for a list of supported well known folder names, see https //learn microsoft com/en us/graph/api/resources/mailfolder?view=graph rest 1 0 parameters count string optional include a count of the total number of items in a collection alongside the page of data values returned from microsoft graph parameters filter string optional use the $filter query parameter to retrieve just a subset of a collection for guidance on using $filter, see https //learn microsoft com/en us/graph/filter query parameter parameters orderby string optional to sort the results in ascending or descending order, append either asc or desc to the field name, separated by a space parameters top number optional sets the page size of results input example {"path parameters" {"email address" "string","folder id" "string"},"parameters" {"count" "false","filter" "string","orderby" "string","top" 123}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @odata count number response data value array value for the parameter value \@odata etag string response data value id string unique identifier value createddatetime string value for the parameter value lastmodifieddatetime string value for the parameter value changekey string value for the parameter value categories array value for the parameter value categories file name string name of the resource value categories file string value for the parameter value receiveddatetime string value for the parameter value sentdatetime string value for the parameter value hasattachments boolean value for the parameter value internetmessageid string unique identifier value subject string value for the parameter value bodypreview string request body data value importance string value for the parameter value parentfolderid string unique identifier value conversationid string unique identifier value conversationindex string value for the parameter value isdeliveryreceiptrequested boolean value for the parameter value isreadreceiptrequested boolean value for the parameter output example {"@odata context" "string","@odata count" 123,"value" \[{"@odata etag" "string","id" "12345678 1234 1234 1234 123456789abc","createddatetime" "string","lastmodifieddatetime" "string","changekey" "string","categories" \[],"receiveddatetime" "string","sentdatetime" "string","hasattachments"\ true,"internetmessageid" "string","subject" "string","bodypreview" "string","importance" "string","parentfolderid" "string","conversationid" "string"}],"@odata nextlink" "string"} get list of child folders retrieve a list of child folders from a specified folder in microsoft graph api, using the provided email address and folder id endpoint url /v1 0/users/{{email address}}/mailfolders/{{folder id}}/childfolders method get input argument name type required description path parameters email address string required the account associated with the email path parameters folder id string required the mailfolder's unique identifier parameters includehiddenfolders boolean optional to include hidden child folders in the response input example {"parameters" {"includehiddenfolders"\ true},"path parameters" {"email address" "saikumarbadri845\@gmail com","folder id" "aqmkadawatnizmyazc1jodnklti5mjutmdacltawcgauaaad4nnqhykabkob7n4gzr"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data value array value for the parameter value id string unique identifier value displayname string name of the resource value parentfolderid string unique identifier value childfoldercount number value for the parameter value unreaditemcount number value for the parameter value totalitemcount number value for the parameter value sizeinbytes number value for the parameter value ishidden boolean unique identifier output example {"@odata context" "string","value" \[{"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name","parentfolderid" "string","childfoldercount" 123,"unreaditemcount" 123,"totalitemcount" 123,"sizeinbytes" 123,"ishidden"\ true}]} get manager root level retrieve the direct manager's root level details in microsoft graph api using a user's id or userprincipalname endpoint url v1 0/users/{{id|userprincipalname}} method get input argument name type required description `path parameters id userprincipalname` string required the user's id or userprincipalname headers object optional http headers for the request headers consistencylevel string optional required when the request includes the $levels=n in the $expand query parameter parameters $levels string optional the n value of $levels can be max (to return all managers) or a number between 1 and 1000 parameters $select string optional to select the individual manager's properties parameters $expand string optional to retrieve the manager's information for specified levels, selected id and displayname input example {"parameters" {"$levels" "max","$select" "id","$expand" "manager($levels=max;$select=id,displayname)"},"path parameters" {"id|userprincipalname" "357b1656 cfad 4b3f a4c4 4a03bdcd6468"},"headers" {"consistencylevel" "eventual"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data businessphones array output field businessphones businessphones file name string name of the resource businessphones file string output field businessphones file displayname string name of the resource givenname object name of the resource jobtitle object output field jobtitle mail string output field mail mobilephone object output field mobilephone officelocation object output field officelocation preferredlanguage object output field preferredlanguage surname object name of the resource userprincipalname string name of the resource id string unique identifier output example {"@odata context" "string","businessphones" \[{"file name" "example name","file" "string"}],"displayname" "example name","givenname" {},"jobtitle" {},"mail" "string","mobilephone" {},"officelocation" {},"preferredlanguage" {},"surname" {},"userprincipalname" "example name","id" "12345678 1234 1234 1234 123456789abc"} move email relocate an email to a specified folder in a user's mailbox on microsoft graph api using their email address, email id, and destination id endpoint url /v1 0/users/{{email address}}/messages/{{email id}}/move method post input argument name type required description path parameters email address string required the account associated with the email path parameters email id string required the id of the email destinationid string optional the destination folder id, or a well known folder name input example {"path parameters" {"email address" "string","email id" "string"},"destinationid" "string"} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @odata etag string response data id string unique identifier createddatetime string time value lastmodifieddatetime string time value changekey string output field changekey categories array output field categories categories file name string name of the resource categories file string output field categories file receiveddatetime string time value sentdatetime string time value hasattachments boolean output field hasattachments internetmessageid string unique identifier subject string output field subject bodypreview string request body data importance string output field importance parentfolderid string unique identifier conversationid string unique identifier conversationindex string output field conversationindex isdeliveryreceiptrequested object output field isdeliveryreceiptrequested isreadreceiptrequested boolean output field isreadreceiptrequested isread boolean output field isread isdraft boolean output field isdraft output example {"@odata context" "string","@odata etag" "string","id" "12345678 1234 1234 1234 123456789abc","createddatetime" "string","lastmodifieddatetime" "string","changekey" "string","categories" \[{"file name" "example name","file" "string"}],"receiveddatetime" "string","sentdatetime" "string","hasattachments"\ true,"internetmessageid" "string","subject" "string","bodypreview" "string","importance" "string","parentfolderid" "string"} reply to email send a custom reply to an email by specifying the recipient's address and email id using microsoft graph api endpoint url /v1 0/users/{{email address}}/messages/{{email id}}/reply method post input argument name type required description path parameters email address string required the account associated with the email path parameters email id string required the id of the email comment string optional a comment to include can be an empty string savetosentitems boolean optional indicates whether to save the message in sent items specify it only if the parameter is false; default is true optional message object optional the message to send message subject string optional the subject of the email message body object optional the body of the message it can be in html or text format message body content string optional the content of the item message body contenttype string optional the type of the content possible values are text and html message sender object optional the account that is actually used to generate the message in most cases, this value is the same as the from property message sender address string required response message message sender name string optional name of the resource message replyto array optional the email addresses to use when replying message replyto emailaddress object required response message message replyto emailaddress address string required response message message replyto emailaddress name string optional name of the resource message torecipients array optional the list of direct recipient objects message torecipients emailaddress object required response message message torecipients emailaddress address string required response message message torecipients emailaddress name string optional name of the resource message ccrecipients array optional the list of cc recipient objects message ccrecipients emailaddress object required response message message ccrecipients emailaddress address string required response message message ccrecipients emailaddress name string optional name of the resource message bccrecipients array optional the list of bcc recipient objects input example {"path parameters" {"email address" "string","email id" "string"},"comment" "string","savetosentitems"\ true,"message" {"subject" "string","body" {"content" "string","contenttype" "string"},"sender" {"address" "string","name" "example name"},"replyto" \[{"emailaddress" {"address" "string","name" "example name"}}],"torecipients" \[{"emailaddress" {"address" "string","name" "example name"}}],"ccrecipients" \[{"emailaddress" {"address" "string","name" "example name"}}],"bccrecipients" \[{"emailaddress" {"address" "string","name" "example name"}}],"attachments" \[{"contentbytes" "string","name" "example name","@odata type" "#microsoft graph fileattachment","contenttype" "text/plain"}]}} output parameter type description status code number http status code of the response reason string response reason phrase response text string output field response text output example {"response text" "string"} send email sends a custom email through microsoft graph api using the recipient's email address and provided message content endpoint url /v1 0/users/{{email address}}/sendmail method post input argument name type required description path parameters email address string required the account associated with the email savetosentitems boolean optional indicates whether to save the message in sent items specify it only if the parameter is false; default is true optional message object optional the message to send message subject string optional the subject of the email message body object optional the body of the message it can be in html or text format message body content string optional the content of the item message body contenttype string optional the type of the content possible values are text and html message replyto array optional the email addresses to use when replying message replyto emailaddress object required response message message replyto emailaddress address string required response message message replyto emailaddress name string optional name of the resource message torecipients array required the list of direct recipient objects message torecipients emailaddress object required response message message torecipients emailaddress address string required response message message torecipients emailaddress name string optional name of the resource message ccrecipients array optional the list of cc recipient objects message ccrecipients emailaddress object required response message message ccrecipients emailaddress address string required response message message ccrecipients emailaddress name string optional name of the resource message bccrecipients array optional the list of bcc recipient objects message bccrecipients emailaddress object required response message message bccrecipients emailaddress address string required response message message bccrecipients emailaddress name string optional name of the resource message attachments array optional items attached to this email message attachments contentbytes string optional response content input example {"path parameters" {"email address" "string"},"savetosentitems"\ true,"message" {"subject" "string","body" {"content" "string","contenttype" "string"},"replyto" \[{"emailaddress" {"address" "string","name" "example name"}}],"torecipients" \[{"emailaddress" {"address" "string","name" "example name"}}],"ccrecipients" \[{"emailaddress" {"address" "string","name" "example name"}}],"bccrecipients" \[{"emailaddress" {"address" "string","name" "example name"}}],"attachments" \[{"contentbytes" "string","name" "example name","@odata type" "#microsoft graph fileattachment","contenttype" "text/plain"}]}} output parameter type description status code number http status code of the response reason string response reason phrase response text string output field response text output example {"response text" "string"} update message updates specific email properties in microsoft graph api using a unique userprincipalname and message id endpoint url /users/{{userprincipalname}}/messages/{{id}} method patch input argument name type required description path parameters userprincipalname string required the email address of the user path parameters id string required the unique identifier of the message bccrecipients array optional the list of bcc recipient objects bccrecipients emailaddress object required parameter for update message bccrecipients emailaddress address string required parameter for update message bccrecipients emailaddress name string optional name of the resource body object optional the body of the message updatable only if isdraft = true body contenttype string required request body data body content string required request body data categories array optional the categories associated with the message ccrecipients array optional the cc recipients for the message ccrecipients emailaddress object required parameter for update message ccrecipients emailaddress address string required parameter for update message ccrecipients emailaddress name string optional name of the resource flag object optional the flag value that indicates the status, start date, due date, or completion date for the message flag flagstatus string optional status value flag startdatetime object optional time value flag startdatetime datetime string optional time value flag startdatetime timezone string optional parameter for update message flag duedatetime object optional time value flag duedatetime datetime string optional time value flag duedatetime timezone string optional parameter for update message flag completeddatetime object optional time value flag completeddatetime datetime string optional time value flag completeddatetime timezone string optional parameter for update message input example {"path parameters" {"userprincipalname" "example name","id" "12345678 1234 1234 1234 123456789abc"},"bccrecipients" \[{"emailaddress" {"address" "string","name" "example name"}}],"body" {"contenttype" "string","content" "string"},"categories" \["string"],"ccrecipients" \[{"emailaddress" {"address" "string","name" "example name"}}],"flag" {"flagstatus" "active","startdatetime" {"datetime" "string","timezone" "string"},"duedatetime" {"datetime" "string","timezone" "string"},"completeddatetime" {"datetime" "string","timezone" "string"}},"from" {"emailaddress" {"address" "string","name" "example name"}},"importance" "string","inferenceclassification" "string","internetmessageid" "string","isdeliveryreceiptrequested"\ true,"isread"\ true,"isreadreceiptrequested"\ true,"multivalueextendedproperties" \[{"id" "12345678 1234 1234 1234 123456789abc","value" \["string"]}],"replyto" \[{"emailaddress" {"address" "string","name" "example name"}}],"sender" {"emailaddress" {"address" "string","name" "example name"}},"singlevalueextendedproperties" \[{"id" "12345678 1234 1234 1234 123456789abc","value" "string"}],"subject" "string","torecipients" \[{"emailaddress" {"address" "string","name" "example name"}}]} output parameter type description status code number http status code of the response reason string response reason phrase receiveddatetime string time value sentdatetime string time value hasattachments boolean output field hasattachments subject string output field subject body object request body data body contenttype string request body data body content string request body data bodypreview string request body data inferenceclassification string output field inferenceclassification output example {"receiveddatetime" "datetime value","sentdatetime" "datetime value","hasattachments"\ true,"subject" "subject value","body" {"contenttype" "","content" "content value"},"bodypreview" "bodypreview value","inferenceclassification" "other"} response headers header description example cache control directives for caching mechanisms private client request id http response header client request id 3ff4b446 2326 4e40 8d83 166d3dd82bb2 content encoding http response header content encoding gzip content length the length of the response body in bytes 0 content type the media type of the resource application/json; odata metadata=minimal; odata streaming=true; ieee754compatible=false; charset=utf 8 date the date and time at which the message was originated mon, 12 aug 2024 05 05 47 gmt location the url to redirect a page to https //graph microsoft com/v1 0/users('integrations\@swimlaneintegrations onmicrosoft com')/events('aamkadmxzmu3zwq4ltmzngitngy3zc1im2uxlwm3mdqzogvjmzlknwbgaaaaaaahypwuvwmwsrfeylv6xhmzbwcbjrt9 oidtlplg45rvpkcaaaaaaenaacbjrt9 oidtlplg45rvpkcaasilbybaaa= ') odata version http response header odata version 4 0 request id http response header request id f2584bdf 0295 424e bdb1 2df08413c0c3 strict transport security http response header strict transport security max age=31536000 transfer encoding http response header transfer encoding chunked vary http response header vary accept encoding x ms ags diagnostic http response header x ms ags diagnostic {"serverinfo" {"datacenter" "brazil south","slice" "e","ring" "3","scaleunit" "000","roleinstance" "cp1pepf00002f05"}} x ms resource unit http response header x ms resource unit 2