Microsoft OneDrive
77 min
the onedrive connector allows swimlane to integrate with microsoft graph onedrive enpoints prerequisites ensure that you have administrator rights so that you can add permissions that will fully utilize all capabilities within this connector capabilities the microsoft graph api connector gives the ability to get and update security alerts, and modify user licenses and sessions create drive folder create group folder create site folder create user folder dowload drive file upload drive file asset setup 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 securityevents read all securityevents readwrite all mail readwrite mail send 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 14\ navigate to the overview tab on the left menu 15\ 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 notes https //social technet microsoft com/wiki/contents/articles/33525 an introduction to microsoft graph api aspx https //www microsoft com/en us/security/intelligence security api https //docs microsoft com/en us/graph/api/overview?view=graph rest 1 0 https //docs microsoft com/en us/graph/query parameters https //docs microsoft com/en us/graph/api/resources/security api overview?view=graph rest beta https //docs microsoft com/en us/azure/active directory/develop/v1 protocols oauth code 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) https //docs microsoft com/en us/graph/auth limit mailbox access configurations 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 actions create drive upload session onedrive create drive upload session endpoint url v1 0/drives/{{driveid}}/items/{{itemid}}/createuploadsession method post input argument name type required description path parameters driveid string required parameters for the create drive upload session action path parameters itemid string required parameters for the create drive upload session action item object optional parameter for create drive upload session item \@microsoft graph conflictbehavior string optional parameter for create drive upload session defercommit boolean optional parameter for create drive upload session input example {"json body" {"item" {"@microsoft graph conflictbehavior" "rename"},"defercommit"\ false},"path parameters" {"driveid" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","itemid" "01ctnnumzoiwp5d4b3vfblk55cw42njvmw"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data expirationdatetime string time value nextexpectedranges array output field nextexpectedranges uploadurl string url endpoint for the request output example {"status code" 200,"response headers" {"cache control" "no store, no cache","transfer encoding" "chunked","content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=f ","content encoding" "gzip","location" "https //graph microsoft com","vary" "accept encoding","strict transport security" "max age=31536000","request id" "61afa009 0a5c 46cc 876f 74dc0c9479c3","client request id" "61afa009 0a5c 46cc 876f 74dc0c9479c3","x ms ags diagnostic" "{\\"serverinfo\\" {\\"d create group upload session onedrive create group upload session endpoint url v1 0/groups/{{groupid}}/drive/items/{{itemid}}/createuploadsession method post input argument name type required description path parameters groupid string required parameters for the create group upload session action path parameters itemid string required parameters for the create group upload session action item object optional parameter for create group upload session item \@microsoft graph conflictbehavior string optional parameter for create group upload session defercommit boolean optional parameter for create group upload session input example {"json body" {"item" {"@microsoft graph conflictbehavior" "rename"},"defercommit"\ false},"path parameters" {"groupid" "2c435237 2587 4d26 a318 fc8537094d7b","itemid" "01hchocoeeskvbsuzdxjbzc24pyzy7brfc"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data expirationdatetime string time value nextexpectedranges array output field nextexpectedranges uploadurl string url endpoint for the request output example {"status code" 200,"response headers" {"cache control" "no store, no cache","transfer encoding" "chunked","content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=f ","content encoding" "gzip","location" "https //graph microsoft com","vary" "accept encoding","strict transport security" "max age=31536000","request id" "15474ed8 4799 4652 a448 6d5defc8c245","client request id" "15474ed8 4799 4652 a448 6d5defc8c245","x ms ags diagnostic" "{\\"serverinfo\\" {\\"d create site upload session onedrive create site upload session endpoint url v1 0/sites/{{siteid}}/drive/items/{{itemid}}/createuploadsession method post input argument name type required description path parameters siteid string required parameters for the create site upload session action path parameters itemid string required parameters for the create site upload session action item object optional parameter for create site upload session item \@microsoft graph conflictbehavior string optional parameter for create site upload session defercommit boolean optional parameter for create site upload session input example {"json body" {"item" {"@microsoft graph conflictbehavior" "rename"},"defercommit"\ false},"path parameters" {"siteid" "f9454dfb d96b 46d1 9186 5fb7fda501b4","itemid" "01jxuhnjtafz4py67oabejro3gfbdxfi5d"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data expirationdatetime string time value nextexpectedranges array output field nextexpectedranges uploadurl string url endpoint for the request output example {"status code" 200,"response headers" {"cache control" "no store, no cache","transfer encoding" "chunked","content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=f ","content encoding" "gzip","location" "https //graph microsoft com","vary" "accept encoding","strict transport security" "max age=31536000","request id" "329c0044 1a0d 42e7 b7f0 ff3a7cb978d0","client request id" "329c0044 1a0d 42e7 b7f0 ff3a7cb978d0","x ms ags diagnostic" "{\\"serverinfo\\" {\\"d create user upload session onedrive create user upload session endpoint url v1 0/users/{{userid}}/drive/items/{{itemid}}/createuploadsession method post input argument name type required description path parameters userid string required parameters for the create user upload session action path parameters itemid string required parameters for the create user upload session action item object optional parameter for create user upload session item \@microsoft graph conflictbehavior string optional parameter for create user upload session defercommit boolean optional parameter for create user upload session input example {"json body" {"item" {"@microsoft graph conflictbehavior" "rename"},"defercommit"\ false},"path parameters" {"userid" "2b77f477 3a9f 4823 a882 6fb6cae8c7f9","itemid" "01b3zfazboazkjyy3nqvbjpszasewlxztj"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data expirationdatetime string time value nextexpectedranges array output field nextexpectedranges uploadurl string url endpoint for the request output example {"status code" 200,"response headers" {"cache control" "no store, no cache","transfer encoding" "chunked","content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=f ","content encoding" "gzip","location" "https //graph microsoft com","vary" "accept encoding","strict transport security" "max age=31536000","request id" "777c3816 7968 49ac a311 afcd86404d9f","client request id" "777c3816 7968 49ac a311 afcd86404d9f","x ms ags diagnostic" "{\\"serverinfo\\" {\\"d download group file onedrive download group file endpoint url v1 0/groups/{{group id}}/drive/items/{{item id}}/content method get input argument name type required description path parameters group id string required parameters for the download group file action path parameters item id string required parameters for the download group file action input example {"path parameters" {"group id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","item id" "01ctnnumzoiwp5d4b3vfblk55cw42njvmw"}} output parameter type description file object file file file name string name of the resource file file string output field file file output example {"file" {"file name" "example name","file" "string"}} download site file onedrive download site file endpoint url v1 0/sites/{{site id}}/drive/items/{{item id}}/content method get input argument name type required description path parameters site id string required parameters for the download site file action path parameters item id string required parameters for the download site file action input example {"path parameters" {"site id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","item id" "01ctnnumzoiwp5d4b3vfblk55cw42njvmw"}} output parameter type description file object file file file name string name of the resource file file string output field file file output example {"file" {"file name" "example name","file" "string"}} download user file onedrive download user file endpoint url v1 0/users/{{user id}}/drive/items/{{item id}}/content method get input argument name type required description path parameters user id string required parameters for the download user file action path parameters item id string required parameters for the download user file action input example {"path parameters" {"user id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","item id" "01ctnnumzoiwp5d4b3vfblk55cw42njvmw"}} output parameter type description file object file file file name string name of the resource file file string output field file file output example {"file" {"file name" "example name","file" "string"}} download drive file download the contents of the primary stream (file) of a driveitem endpoint url v1 0/drives/{{drive id}}/items/{{item id}}/content method get input argument name type required description path parameters drive id string required parameters for the download drive file action path parameters item id string required parameters for the download drive file action input example {"path parameters" {"drive id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","item id" "01ctnnumzoiwp5d4b3vfblk55cw42njvmw"}} output parameter type description file object file file file name string name of the resource file file string output field file file output example {"file" {"file name" "example name","file" "string"}} upload drive file create an upload session to allow your app to upload files up to the maximum file size endpoint url v1 0/drives/{{drive id}}/items/{{parent id}} /{{filename}} /content method put input argument name type required description attachments array required file to be uploaded attachments file string optional parameter for upload drive file attachments file name string optional name of the resource path parameters drive id string required parameters for the upload drive file action path parameters parent id string required parameters for the upload drive file action path parameters filename string required parameters for the upload drive file action headers object required http headers for the request headers content type string required http headers for the request input example {"path parameters" {"drive id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","parent id" "root","filename" "deleteme png"},"headers" {"content type" "text/plain"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @microsoft graph downloadurl string url endpoint for the request createddatetime string time value etag string output field etag id string unique identifier lastmodifieddatetime string time value name string name of the resource weburl string url endpoint for the request ctag string output field ctag size number output field size createdby object output field createdby createdby application object output field createdby application createdby application id string unique identifier createdby application displayname string name of the resource createdby user object output field createdby user createdby user displayname string name of the resource lastmodifiedby object output field lastmodifiedby lastmodifiedby application object output field lastmodifiedby application lastmodifiedby application id string unique identifier lastmodifiedby application displayname string name of the resource lastmodifiedby user object output field lastmodifiedby user lastmodifiedby user displayname string name of the resource parentreference object output field parentreference output example {"@odata context" "string","@microsoft graph downloadurl" "string","createddatetime" "string","etag" "string","id" "12345678 1234 1234 1234 123456789abc","lastmodifieddatetime" "string","name" "example name","weburl" "string","ctag" "string","size" 123,"createdby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}},"lastmodifiedby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"} create drive folder creates a new folder or driveitem in a drive with a specified parent item or path endpoint url v1 0/drives/{{drive id}}/items/{{parent item id}}/children method post input argument name type required description path parameters parent item id string required parameters for the create drive folder action path parameters drive id string required parameters for the create drive folder action name string optional name of the resource folder object optional parameter for create drive folder @microsoft graph conflictbehavior string optional parameter for create drive folder input example {"json body" {"name" "you can delete this folder","folder" {},"@microsoft graph conflictbehavior" "rename"},"path parameters" {"parent item id" "root","drive id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data createddatetime string time value etag string output field etag id string unique identifier lastmodifieddatetime string time value name string name of the resource weburl string url endpoint for the request ctag string output field ctag size number output field size createdby object output field createdby createdby application object output field createdby application createdby application id string unique identifier createdby application displayname string name of the resource createdby user object output field createdby user createdby user displayname string name of the resource lastmodifiedby object output field lastmodifiedby lastmodifiedby application object output field lastmodifiedby application lastmodifiedby application id string unique identifier lastmodifiedby application displayname string name of the resource lastmodifiedby user object output field lastmodifiedby user lastmodifiedby user displayname string name of the resource parentreference object output field parentreference parentreference drivetype string type of the resource output example {"@odata context" "string","createddatetime" "string","etag" "string","id" "12345678 1234 1234 1234 123456789abc","lastmodifieddatetime" "string","name" "example name","weburl" "string","ctag" "string","size" 123,"createdby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}},"lastmodifiedby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}}, create group folder creates a new folder or driveitem in a drive with a specified parent item or path endpoint url v1 0/groups/{{group id}}/drive/items/{{parent item id}}/children method post input argument name type required description path parameters parent item id string required parameters for the create group folder action path parameters group id string required parameters for the create group folder action name string optional name of the resource folder object optional parameter for create group folder @microsoft graph conflictbehavior string optional parameter for create group folder input example {"json body" {"name" "test folder name","folder" {},"@microsoft graph conflictbehavior" "rename"},"path parameters" {"parent item id" "root","group id" "swimlaneintegrations my sharepoint com,f9454dfb d96b 46d1 9186 5fb7fda501b4,93abcf70 857e 40a0 a57e 9d58a3ffed21"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data createddatetime string time value etag string output field etag id string unique identifier lastmodifieddatetime string time value name string name of the resource weburl string url endpoint for the request ctag string output field ctag size number output field size createdby object output field createdby createdby application object output field createdby application createdby application id string unique identifier createdby application displayname string name of the resource createdby user object output field createdby user createdby user displayname string name of the resource lastmodifiedby object output field lastmodifiedby lastmodifiedby application object output field lastmodifiedby application lastmodifiedby application id string unique identifier lastmodifiedby application displayname string name of the resource lastmodifiedby user object output field lastmodifiedby user lastmodifiedby user displayname string name of the resource parentreference object output field parentreference parentreference drivetype string type of the resource output example {"@odata context" "string","createddatetime" "string","etag" "string","id" "12345678 1234 1234 1234 123456789abc","lastmodifieddatetime" "string","name" "example name","weburl" "string","ctag" "string","size" 123,"createdby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}},"lastmodifiedby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}}, create site folder creates a new folder or driveitem in a drive with a specified parent item or path endpoint url v1 0/sites/{{site id}}/drive/items/{{parent item id}}/children method post input argument name type required description path parameters parent item id string required parameters for the create site folder action path parameters site id string required parameters for the create site folder action name string optional name of the resource folder object optional parameter for create site folder @microsoft graph conflictbehavior string optional parameter for create site folder input example {"json body" {"name" "test folder name","folder" {},"@microsoft graph conflictbehavior" "rename"},"path parameters" {"parent item id" "root","site id" "swimlaneintegrations my sharepoint com,f9454dfb d96b 46d1 9186 5fb7fda501b4,93abcf70 857e 40a0 a57e 9d58a3ffed21"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data createddatetime string time value etag string output field etag id string unique identifier lastmodifieddatetime string time value name string name of the resource weburl string url endpoint for the request ctag string output field ctag size number output field size createdby object output field createdby createdby application object output field createdby application createdby application id string unique identifier createdby application displayname string name of the resource createdby user object output field createdby user createdby user displayname string name of the resource lastmodifiedby object output field lastmodifiedby lastmodifiedby application object output field lastmodifiedby application lastmodifiedby application id string unique identifier lastmodifiedby application displayname string name of the resource lastmodifiedby user object output field lastmodifiedby user lastmodifiedby user displayname string name of the resource parentreference object output field parentreference parentreference drivetype string type of the resource output example {"@odata context" "string","createddatetime" "string","etag" "string","id" "12345678 1234 1234 1234 123456789abc","lastmodifieddatetime" "string","name" "example name","weburl" "string","ctag" "string","size" 123,"createdby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}},"lastmodifiedby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}}, create user folder creates a new folder or driveitem in a drive with a specified parent item or path endpoint url v1 0/users/{{user id}}/drive/items/{{parent item id}}/children method post input argument name type required description path parameters parent item id string required parameters for the create user folder action path parameters user id string required parameters for the create user folder action name string optional name of the resource folder object optional parameter for create user folder @microsoft graph conflictbehavior string optional parameter for create user folder input example {"json body" {"name" "you can delete this folder","folder" {},"@microsoft graph conflictbehavior" "rename"},"path parameters" {"parent item id" "root","user id" "2b77f477 3a9f 4823 a882 6fb6cae8c7f9"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data createddatetime string time value etag string output field etag id string unique identifier lastmodifieddatetime string time value name string name of the resource weburl string url endpoint for the request ctag string output field ctag size number output field size createdby object output field createdby createdby application object output field createdby application createdby application id string unique identifier createdby application displayname string name of the resource createdby user object output field createdby user createdby user displayname string name of the resource lastmodifiedby object output field lastmodifiedby lastmodifiedby application object output field lastmodifiedby application lastmodifiedby application id string unique identifier lastmodifiedby application displayname string name of the resource lastmodifiedby user object output field lastmodifiedby user lastmodifiedby user displayname string name of the resource parentreference object output field parentreference parentreference drivetype string type of the resource output example {"@odata context" "string","createddatetime" "string","etag" "string","id" "12345678 1234 1234 1234 123456789abc","lastmodifieddatetime" "string","name" "example name","weburl" "string","ctag" "string","size" 123,"createdby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}},"lastmodifiedby" {"application" {"id" "12345678 1234 1234 1234 123456789abc","displayname" "example name"},"user" {"displayname" "example name"}}, upload file to session onedrive upload file to session endpoint method put input argument name type required description upload url string required url endpoint for the request attachments array required file to be uploaded attachments file string optional parameter for upload file to session attachments file name string optional name of the resource input example {"upload url" "string","attachments" \[{"file" "string","file name" "example name"}]} output example {"@odata context" "https //swimlaneintegrations sharepoint com/ api/v2 0/$metadata#onedrive uploads ","expirationdatetime" "2023 01 26t01 27 48 703z","nextexpectedranges" \["983040 3199999"]} upload group file onedrive upload group file endpoint url v1 0/groups/{{group id}}/drive/items/{{parent id}} /{{filename}} /content method put input argument name type required description attachments array required file to be uploaded attachments file string optional parameter for upload group file attachments file name string optional name of the resource path parameters group id string required parameters for the upload group file action path parameters parent id string required parameters for the upload group file action path parameters filename string required parameters for the upload group file action headers object required http headers for the request headers content type string required http headers for the request input example {"path parameters" {"group id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","parent id" "root","filename" "deleteme png"},"headers" {"content type" "text/plain"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @microsoft graph downloadurl string url endpoint for the request createddatetime string time value etag string output field etag id string unique identifier lastmodifieddatetime string time value name string name of the resource weburl string url endpoint for the request ctag string output field ctag size number output field size createdby object output field createdby createdby application object output field createdby application createdby application id string unique identifier createdby application displayname string name of the resource createdby user object output field createdby user createdby user displayname string name of the resource lastmodifiedby object output field lastmodifiedby lastmodifiedby application object output field lastmodifiedby application lastmodifiedby application id string unique identifier lastmodifiedby application displayname string name of the resource lastmodifiedby user object output field lastmodifiedby user lastmodifiedby user displayname string name of the resource parentreference object output field parentreference output example {"status code" 201,"response headers" {"cache control" "no store, no cache","transfer encoding" "chunked","content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=f ","content encoding" "gzip","vary" "accept encoding","strict transport security" "max age=31536000","request id" "5a55a006 67e1 429c 9d56 0c03064f9c4f","client request id" "5a55a006 67e1 429c 9d56 0c03064f9c4f","x ms ags diagnostic" "{\\"serverinfo\\" {\\"datacenter\\" \\"brazil south\\",\\"slice\\" \\" upload site file onedrive upload site file endpoint url v1 0/sites/{{site id}}/drive/items/{{parent id}} /{{filename}} /content method put input argument name type required description attachments array required file to be uploaded attachments file string optional parameter for upload site file attachments file name string optional name of the resource path parameters site id string required parameters for the upload site file action path parameters parent id string required parameters for the upload site file action path parameters filename string required parameters for the upload site file action headers object required http headers for the request headers content type string required http headers for the request input example {"path parameters" {"site id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","parent id" "root","filename" "deleteme png"},"headers" {"content type" "text/plain"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @microsoft graph downloadurl string url endpoint for the request createddatetime string time value etag string output field etag id string unique identifier lastmodifieddatetime string time value name string name of the resource weburl string url endpoint for the request ctag string output field ctag size number output field size createdby object output field createdby createdby application object output field createdby application createdby application id string unique identifier createdby application displayname string name of the resource createdby user object output field createdby user createdby user displayname string name of the resource lastmodifiedby object output field lastmodifiedby lastmodifiedby application object output field lastmodifiedby application lastmodifiedby application id string unique identifier lastmodifiedby application displayname string name of the resource lastmodifiedby user object output field lastmodifiedby user lastmodifiedby user displayname string name of the resource parentreference object output field parentreference output example {"status code" 201,"response headers" {"cache control" "no store, no cache","transfer encoding" "chunked","content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=f ","content encoding" "gzip","vary" "accept encoding","strict transport security" "max age=31536000","request id" "dd6ae12c 92e5 4c2d 80ae 863fe306e180","client request id" "dd6ae12c 92e5 4c2d 80ae 863fe306e180","x ms ags diagnostic" "{\\"serverinfo\\" {\\"datacenter\\" \\"brazil south\\",\\"slice\\" \\" upload user file onedrive upload user file endpoint url v1 0/users/{{user id}}/drive/items/{{parent id}} /{{filename}} /content method put input argument name type required description attachments array required file to be uploaded attachments file string optional parameter for upload user file attachments file name string optional name of the resource path parameters user id string required parameters for the upload user file action path parameters parent id string required parameters for the upload user file action path parameters filename string required parameters for the upload user file action headers object required http headers for the request headers content type string required http headers for the request input example {"path parameters" {"user id" "b!62ee6kgzpk6bvv9mse16 a28d8piiivirkgudagsj6psxvivqlxmqpcptbwegqwh","parent id" "root","filename" "deleteme png"},"headers" {"content type" "text/plain"}} output parameter type description status code number http status code of the response reason string response reason phrase @odata context string response data @microsoft graph downloadurl string url endpoint for the request createddatetime string time value etag string output field etag id string unique identifier lastmodifieddatetime string time value name string name of the resource weburl string url endpoint for the request ctag string output field ctag size number output field size createdby object output field createdby createdby application object output field createdby application createdby application id string unique identifier createdby application displayname string name of the resource createdby user object output field createdby user createdby user displayname string name of the resource lastmodifiedby object output field lastmodifiedby lastmodifiedby application object output field lastmodifiedby application lastmodifiedby application id string unique identifier lastmodifiedby application displayname string name of the resource lastmodifiedby user object output field lastmodifiedby user lastmodifiedby user displayname string name of the resource parentreference object output field parentreference output example {"status code" 201,"response headers" {"cache control" "no store, no cache","transfer encoding" "chunked","content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=f ","content encoding" "gzip","vary" "accept encoding","strict transport security" "max age=31536000","request id" "4d66220a 21cc 4de5 852a 0d82e19dddae","client request id" "4d66220a 21cc 4de5 852a 0d82e19dddae","x ms ags diagnostic" "{\\"serverinfo\\" {\\"datacenter\\" \\"brazil south\\",\\"slice\\" \\" response headers header description example cache control directives for caching mechanisms no store, no cache client request id http response header client request id dd6ae12c 92e5 4c2d 80ae 863fe306e180 content encoding http response header content encoding gzip content security policy http response header content security policy frame ancestors 'self' teams microsoft com teams microsoft com skype com teams microsoft us local teams office com powerapps com yammer com officeapps live com office com stream azure test net microsoftstream com dynamics com microsoft com securebroker sharepointonline com; 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 wed, 25 jan 2023 22 07 53 gmt expires the date/time after which the response is considered stale 1 location the url to redirect a page to https //graph microsoft com microsoftsharepointteamservices http response header microsoftsharepointteamservices 16 0 0 23304 ms cv http response header ms cv oi/c9crgada174ohujls8w\ 0 odata version http response header odata version 4 0 p3p http response header p3p cp="all ind dsp cor adm cono cur cuso ivao ivdo psa psd tai telo our samo cnt com int nav onl phy pre pur uni" pragma http response header pragma no cache request id http response header request id f4dc8fa0 e02a 3000 35ef 8a075232d2f3 spclientservicerequestduration http response header spclientservicerequestduration 1217 sprequestguid http response header sprequestguid f4dc8fa0 e02a 3000 35ef 8a075232d2f3 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 1dscollectorurl http response header x 1dscollectorurl https //mobile events data microsoft com/onecollector/1 0/ x ariacollectorurl http response header x ariacollectorurl https //browser pipe aria microsoft com/collector/3 0/ x aspnet version http response header x aspnet version 4 0 30319 x cache http response header x cache config nocache x content type options http response header x content type options nosniff x databoundary http response header x databoundary none x frame options http response header x frame options sameorigin x ms ags diagnostic http response header x ms ags diagnostic {"serverinfo" {"datacenter" "brazil south","slice" "e","ring" "3","scaleunit" "000","roleinstance" "cp1pepf00003791"}} x ms invokeapp http response header x ms invokeapp 1; requirereadonly x msedge ref http response header x msedge ref ref a a572f0fba87443c5a1cb23842ff954b9 ref b rio01edge0617 ref c 2023 01 26t01 12 47z x networkstatistics http response header x networkstatistics 0,525568,0,0,340,0,24489 x powered by http response header x powered by asp net x sharepointhealthscore http response header x sharepointhealthscore 0 x sp serverstate http response header x sp serverstate readonly=0