Microsoft OneDrive
76 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 app registration page 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 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/ 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 driveid string required unique identifier itemid string required unique identifier item object optional parameter for create drive upload session @microsoft graph conflictbehavior string optional parameter for create drive upload session defercommit boolean optional parameter for create drive upload session 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 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\\" {\\"datacenter\\" \\"brazil south\\",\\"slice\\" \\"e\\",\\"ring\\" \\"3\\",\\"scaleunit\\" \\"0 ", "odata version" "4 0", "date" "wed, 25 jan 2023 23 08 23 gmt" }, "reason" "ok", "json body" { "@odata context" "https //graph microsoft com/v1 0/$metadata#microsoft graph uploadsession", "expirationdatetime" "2023 01 25t23 23 23 922z", "nextexpectedranges" \[], "uploadurl" "https //swimlaneintegrations sharepoint com/ api/v2 0/drives/b!62ee6kgzpk6bvv9ms " } } ] 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 groupid string required unique identifier itemid string required unique identifier item object optional parameter for create group upload session @microsoft graph conflictbehavior string optional parameter for create group upload session defercommit boolean optional parameter for create group upload session 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 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\\" {\\"datacenter\\" \\"brazil south\\",\\"slice\\" \\"e\\",\\"ring\\" \\"3\\",\\"scaleunit\\" \\"0 ", "odata version" "4 0", "date" "wed, 25 jan 2023 23 26 26 gmt" }, "reason" "ok", "json body" { "@odata context" "https //graph microsoft com/v1 0/$metadata#microsoft graph uploadsession", "expirationdatetime" "2023 01 25t23 41 27 003z", "nextexpectedranges" \[], "uploadurl" "https //swimlaneintegrations sharepoint com/sites/integrationsteamtest/ api/v2 0 " } } ] 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 siteid string required unique identifier itemid string required unique identifier item object optional parameter for create site upload session @microsoft graph conflictbehavior string optional parameter for create site upload session defercommit boolean optional parameter for create site upload session 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 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\\" {\\"datacenter\\" \\"brazil south\\",\\"slice\\" \\"e\\",\\"ring\\" \\"3\\",\\"scaleunit\\" \\"0 ", "odata version" "4 0", "date" "wed, 25 jan 2023 23 24 43 gmt" }, "reason" "ok", "json body" { "@odata context" "https //graph microsoft com/v1 0/$metadata#microsoft graph uploadsession", "expirationdatetime" "2023 01 25t23 39 43 294z", "nextexpectedranges" \[], "uploadurl" "https //swimlaneintegrations my sharepoint com/personal/surf e2e monitor swimlan " } } ] 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 userid string required unique identifier itemid string required unique identifier item object optional parameter for create user upload session @microsoft graph conflictbehavior string optional parameter for create user upload session defercommit boolean optional parameter for create user upload session 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 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\\" {\\"datacenter\\" \\"brazil south\\",\\"slice\\" \\"e\\",\\"ring\\" \\"3\\",\\"scaleunit\\" \\"0 ", "odata version" "4 0", "date" "wed, 25 jan 2023 23 28 54 gmt" }, "reason" "ok", "json body" { "@odata context" "https //graph microsoft com/v1 0/$metadata#microsoft graph uploadsession", "expirationdatetime" "2023 01 25t23 43 55 141z", "nextexpectedranges" \[], "uploadurl" "https //swimlaneintegrations my sharepoint com/personal/integrations swimlaneint " } } ] 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 group id string required unique identifier item id string required unique identifier output parameter type description file object file file name string name of the resource file string output field file 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 site id string required unique identifier item id string required unique identifier output parameter type description file object file file name string name of the resource file string output field file 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 user id string required unique identifier item id string required unique identifier output parameter type description file object file file name string name of the resource file string output field file 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 drive id string required unique identifier item id string required unique identifier output parameter type description file object file file name string name of the resource file string output field file 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 file string optional parameter for upload drive file file name string optional name of the resource drive id string required unique identifier parent id string required unique identifier filename string required name of the resource headers object required http headers for the request content type string required type of the resource 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 application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource lastmodifiedby object output field lastmodifiedby application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource parentreference object output field parentreference example \[ { "status code" 200, "response headers" { "content type" "application/json", "date" "thu, 01 jan 2024 00 00 00 gmt" }, "reason" "ok", "json body" { "@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" {}, "lastmodifiedby" {}, "parentreference" {}, "file" {}, "filesysteminfo" {} } } ] 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 parent item id string required unique identifier drive id string required unique identifier name string required name of the resource folder object required parameter for create drive folder @microsoft graph conflictbehavior string required parameter for create drive folder 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 application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource lastmodifiedby object output field lastmodifiedby application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource parentreference object output field parentreference drivetype string type of the resource example \[ { "status code" 200, "response headers" { "content type" "application/json", "date" "thu, 01 jan 2024 00 00 00 gmt" }, "reason" "ok", "json body" { "@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" {}, "lastmodifiedby" {}, "parentreference" {}, "filesysteminfo" {}, "folder" {}, "shared" {} } } ] 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 parent item id string required unique identifier group id string required unique identifier name string required name of the resource folder object required parameter for create group folder @microsoft graph conflictbehavior string required parameter for create group folder 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 application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource lastmodifiedby object output field lastmodifiedby application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource parentreference object output field parentreference drivetype string type of the resource example \[ { "status code" 200, "response headers" { "content type" "application/json", "date" "thu, 01 jan 2024 00 00 00 gmt" }, "reason" "ok", "json body" { "@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" {}, "lastmodifiedby" {}, "parentreference" {}, "filesysteminfo" {}, "folder" {}, "shared" {} } } ] 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 parent item id string required unique identifier site id string required unique identifier name string required name of the resource folder object required parameter for create site folder @microsoft graph conflictbehavior string required parameter for create site folder 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 application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource lastmodifiedby object output field lastmodifiedby application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource parentreference object output field parentreference drivetype string type of the resource example \[ { "status code" 200, "response headers" { "content type" "application/json", "date" "thu, 01 jan 2024 00 00 00 gmt" }, "reason" "ok", "json body" { "@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" {}, "lastmodifiedby" {}, "parentreference" {}, "filesysteminfo" {}, "folder" {} } } ] 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 parent item id string required unique identifier user id string required unique identifier name string required name of the resource folder object required parameter for create user folder @microsoft graph conflictbehavior string required parameter for create user folder 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 application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource lastmodifiedby object output field lastmodifiedby application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource parentreference object output field parentreference drivetype string type of the resource example \[ { "status code" 200, "response headers" { "content type" "application/json", "date" "thu, 01 jan 2024 00 00 00 gmt" }, "reason" "ok", "json body" { "@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" {}, "lastmodifiedby" {}, "parentreference" {}, "filesysteminfo" {}, "folder" {} } } ] 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 file string optional parameter for upload file to session file name string optional name of the resource example \[ \[ { "status code" 202, "response headers" { "cache control" "no cache, no store", "pragma" "no cache", "transfer encoding" "chunked", "content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=false;charset=utf 8", "expires" " 1", "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\\"", "x networkstatistics" "0,525568,0,0,340,0,24489", "x sharepointhealthscore" "0", "x sp serverstate" "readonly=0", "odata version" "4 0", "spclientservicerequestduration" "1217", "x aspnet version" "4 0 30319", "x databoundary" "none", "x 1dscollectorurl" "https //mobile events data microsoft com/onecollector/1 0/", "x ariacollectorurl" "https //browser pipe aria microsoft com/collector/3 0/", "sprequestguid" "f4dc8fa0 e02a 3000 35ef 8a075232d2f3", "request id" "f4dc8fa0 e02a 3000 35ef 8a075232d2f3", "ms cv" "oi/c9crgada174ohujls8w\ 0", "strict transport security" "max age=31536000", "x frame options" "sameorigin", "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;", "x powered by" "asp net", "microsoftsharepointteamservices" "16 0 0 23304", "x content type options" "nosniff", "x ms invokeapp" "1; requirereadonly", "x cache" "config nocache", "x msedge ref" "ref a a572f0fba87443c5a1cb23842ff954b9 ref b rio01edge0617 ref c 2023 01 26t01 12 47z", "date" "thu, 26 jan 2023 01 12 48 gmt" }, "reason" "accepted", "json body" { "@odata context" "https //swimlaneintegrations sharepoint com/ api/v2 0/$metadata#onedrive uploadsession", "expirationdatetime" "2023 01 26t01 27 48 703z", "nextexpectedranges" \[ "983040 3199999" ] } }, { "status code" 202, "response headers" { "cache control" "no cache, no store", "pragma" "no cache", "transfer encoding" "chunked", "content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=false;charset=utf 8", "expires" " 1", "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\\"", "x networkstatistics" "0,525568,0,0,1855,0,26209", "x sharepointhealthscore" "3", "x sp serverstate" "readonly=0", "odata version" "4 0", "spclientservicerequestduration" "1128", "x aspnet version" "4 0 30319", "x databoundary" "none", "x 1dscollectorurl" "https //mobile events data microsoft com/onecollector/1 0/", "x ariacollectorurl" "https //browser pipe aria microsoft com/collector/3 0/", "sprequestguid" "f4dc8fa0 a089 3000 35ef 8e7b0d58b234", "request id" "f4dc8fa0 a089 3000 35ef 8e7b0d58b234", "ms cv" "oi/c9imgada17457dviyna 0", "strict transport security" "max age=31536000", "x frame options" "sameorigin", "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;", "x powered by" "asp net", "microsoftsharepointteamservices" "16 0 0 23304", "x content type options" "nosniff", "x ms invokeapp" "1; requirereadonly", "x cache" "config nocache", "x msedge ref" "ref a 6c864fb7f9784094bc5791f842b1d4b5 ref b rio01edge0617 ref c 2023 01 26t01 12 49z", "date" "thu, 26 jan 2023 01 12 50 gmt" }, "reason" "accepted", "json body" { "@odata context" "https //swimlaneintegrations sharepoint com/ api/v2 0/$metadata#onedrive uploadsession", "expirationdatetime" "2023 01 26t01 27 50 015z", "nextexpectedranges" \[ "1966080 3199999" ] } }, { "status code" 202, "response headers" { "cache control" "no cache, no store", "pragma" "no cache", "transfer encoding" "chunked", "content type" "application/json;odata metadata=minimal;odata streaming=true;ieee754compatible=false;charset=utf 8", "expires" " 1", "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\\"", "x networkstatistics" "0,525568,0,0,3402,0,27931", "x sharepointhealthscore" "0", "x sp serverstate" "readonly=0", "odata version" "4 0", "spclientservicerequestduration" "781", "x aspnet version" "4 0 30319", "x databoundary" "none", 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 file string optional parameter for upload group file file name string optional name of the resource group id string required unique identifier parent id string required unique identifier filename string required name of the resource headers object required http headers for the request content type string required type of the resource 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 application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource lastmodifiedby object output field lastmodifiedby application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource parentreference object output field parentreference 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\\" \\"e\\",\\"ring\\" \\"3\\",\\"scaleunit\\" \\"0 ", "odata version" "4 0", "date" "wed, 25 jan 2023 22 07 53 gmt" }, "reason" "created", "json body" { "@odata context" "https //graph microsoft com/v1 0/$metadata#groups('2c435237 2587 4d26 a318 fc853 ", "@microsoft graph downloadurl" "https //swimlaneintegrations sharepoint com/sites/integrationsteamtest/ layouts/ ", "createddatetime" "2023 01 25t22 07 54z", "etag" "\\"{19aa9284 2353 43ba 916b 8fc671f0c4a2},1\\"", "id" "01hchocoeeskvbsuzdxjbzc24pyzy7brfc", "lastmodifieddatetime" "2023 01 25t22 07 54z", "name" "deleteme png", "weburl" "https //swimlaneintegrations sharepoint com/sites/integrationsteamtest/shared%20 ", "ctag" "\\"c {19aa9284 2353 43ba 916b 8fc671f0c4a2},1\\"", "size" 0, "createdby" {}, "lastmodifiedby" {}, "parentreference" {}, "file" {}, "filesysteminfo" {} } } ] 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 file string optional parameter for upload site file file name string optional name of the resource site id string required unique identifier parent id string required unique identifier filename string required name of the resource headers object required http headers for the request content type string required type of the resource 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 application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource lastmodifiedby object output field lastmodifiedby application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource parentreference object output field parentreference 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\\" \\"e\\",\\"ring\\" \\"3\\",\\"scaleunit\\" \\"0 ", "odata version" "4 0", "date" "wed, 25 jan 2023 22 14 41 gmt" }, "reason" "created", "json body" { "@odata context" "https //graph microsoft com/v1 0/$metadata#sites('f9454dfb d96b 46d1 9186 5fb7fd ", "@microsoft graph downloadurl" "https //swimlaneintegrations my sharepoint com/personal/surf e2e monitor swimlan ", "createddatetime" "2023 01 25t22 14 41z", "etag" "\\"{fc782e60 ee7b 4800 98bb 66284772a3a3},1\\"", "id" "01jxuhnjtafz4py67oabejro3gfbdxfi5d", "lastmodifieddatetime" "2023 01 25t22 14 41z", "name" "deleteme png", "weburl" "https //swimlaneintegrations my sharepoint com/personal/surf e2e monitor swimlan ", "ctag" "\\"c {fc782e60 ee7b 4800 98bb 66284772a3a3},1\\"", "size" 0, "createdby" {}, "lastmodifiedby" {}, "parentreference" {}, "file" {}, "filesysteminfo" {} } } ] 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 file string optional parameter for upload user file file name string optional name of the resource user id string required unique identifier parent id string required unique identifier filename string required name of the resource headers object required http headers for the request content type string required type of the resource 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 application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource lastmodifiedby object output field lastmodifiedby application object output field application id string unique identifier displayname string name of the resource user object output field user displayname string name of the resource parentreference object output field parentreference 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\\" \\"e\\",\\"ring\\" \\"3\\",\\"scaleunit\\" \\"0 ", "odata version" "4 0", "date" "wed, 25 jan 2023 22 19 18 gmt" }, "reason" "created", "json body" { "@odata context" "https //graph microsoft com/v1 0/$metadata#users('2b77f477 3a9f 4823 a882 6fb6ca ", "@microsoft graph downloadurl" "https //swimlaneintegrations my sharepoint com/personal/integrations swimlaneint ", "createddatetime" "2023 01 25t22 19 19z", "etag" "\\"{9c54062e 6d63 4285 97cb 20912cbbe669},1\\"", "id" "01b3zfazboazkjyy3nqvbjpszasewlxztj", "lastmodifieddatetime" "2023 01 25t22 19 19z", "name" "deleteme png", "weburl" "https //swimlaneintegrations my sharepoint com/personal/integrations swimlaneint ", "ctag" "\\"c {9c54062e 6d63 4285 97cb 20912cbbe669},1\\"", "size" 0, "createdby" {}, "lastmodifiedby" {}, "parentreference" {}, "file" {}, "filesysteminfo" {} } } ] response headers header description example cache control directives for caching mechanisms no store, no cache client request id http response header client request id 5a55a006 67e1 429c 9d56 0c03064f9c4f content encoding http response header content encoding gzip content type the media type of the resource application/json date the date and time at which the message was originated wed, 25 jan 2023 22 14 41 gmt location the url to redirect a page to https //graph microsoft com https //graph microsoft com odata version http response header odata version 4 0 request id http response header request id 15474ed8 4799 4652 a448 6d5defc8c245 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" "002","roleinstance" "cp1pepf00002f10"}} notes an introduction to microsoft graph api https //social technet microsoft com/wiki/contents/articles/33525 an introduction to microsoft graph api aspxmicrosoft graph security api homepage https //www microsoft com/en us/security/intelligence security apimicrosoft graph rest api v1 0 reference https //docs microsoft com/en us/graph/api/overview?view=graph rest 1 0query parameters documentation odata v4 https //docs microsoft com/en us/graph/query parametersmicrosoft graph security api v1 0 refrence https //docs microsoft com/en us/graph/api/resources/security api overview?view=graph rest betaazure ad oauth2 flow https //docs microsoft com/en us/azure/active directory/develop/v1 protocols oauth codeoauthlib legacy application client 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) limiting application permissions to specific exchange online mailboxes https //docs microsoft com/en us/graph/auth limit mailbox access