{"id":805,"date":"2024-06-19T13:38:47","date_gmt":"2024-06-19T12:38:47","guid":{"rendered":"https:\/\/france.magicsoftware.com\/blog\/?p=805"},"modified":"2026-03-26T10:57:55","modified_gmt":"2026-03-26T09:57:55","slug":"sharepoint-online-magic-xpi-how-to-get-the-content-list-of-a-sharepoint-folder-download-files-locally-and-upload-files-using-rest-microsoft-graph-api","status":"publish","type":"post","link":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/sharepoint-online-magic-xpi-how-to-get-the-content-list-of-a-sharepoint-folder-download-files-locally-and-upload-files-using-rest-microsoft-graph-api\/","title":{"rendered":"SharePoint Online Graph API \u2013 Magic xpi: How to Get the Content list of a SharePoint folder ,download files locally , upload Files and Retrieve Data from List  using REST Microsoft Graph API"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">Describe the different steps for connecting Magic xpi with SharepointOnline using REST Microsoft Graph API<\/p>\n\n\n\n<p>1\/ Define in Azure Portal  An app registration and add permission for Sharepoint through Microsoft Graph<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"600\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG1-1024x600.png\" alt=\"\" class=\"wp-image-807\" style=\"width:612px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG1-1024x600.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG1-300x176.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG1-768x450.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG1.png 1295w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>2\/ Check that you can have access via Postman<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"584\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG2-1024x584.png\" alt=\"\" class=\"wp-image-809\" style=\"width:847px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG2-1024x584.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG2-300x171.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG2-768x438.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG2.png 1230w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>3\/ Define a REST Client Resource in Magic xpi Studio<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG3-1024x342.png\" alt=\"\" class=\"wp-image-811\" style=\"width:1055px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG3-1024x342.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG3-300x100.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG3-768x256.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG3.png 1333w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>4\/ Define 2 Paths \/{list} and \/{urladdition}<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"523\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG4-1024x523.png\" alt=\"\" class=\"wp-image-813\" style=\"width:904px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG4-1024x523.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG4-300x153.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG4-768x392.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG4.png 1381w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>5\/ To Get the Sharepoint ID Site that you want, Drag and Drop REST Client connector and configure the connector like below and click OK<\/p>\n\n\n\n<p>(*) In my example sharepoint web site is : https:\/\/magicsw365.sharepoint.com\/sites\/MSEFRANCE<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"592\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG5-1024x592.png\" alt=\"\" class=\"wp-image-816\" style=\"width:906px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG5-1024x592.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG5-300x174.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG5-768x444.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG5.png 1238w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"319\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG6-1024x319.png\" alt=\"\" class=\"wp-image-818\" style=\"width:914px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG6-1024x319.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG6-300x93.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG6-768x239.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG6.png 1243w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>6\/ Parse the JSON response with the mapper to retrieve the ID<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"315\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG7-1024x315.png\" alt=\"\" class=\"wp-image-820\" style=\"width:913px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG7-1024x315.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG7-300x92.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG7-768x237.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG7.png 1078w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>6\/ To List the content of the website, use a <strong>GET<\/strong> with this type of URL &lsquo;<strong>\/sites\/{IDSite}\/lists<\/strong>&lsquo;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"482\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG8-1024x482.png\" alt=\"\" class=\"wp-image-822\" style=\"width:933px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG8-1024x482.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG8-300x141.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG8-768x362.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG8.png 1197w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>7\/ Parse the JSON response to retrieve the ID List that you want (set the condition that you want (for example : Src.JSON\u00a0\u00bbS1\/Root Schema\/value\/A Schema\/webUrl\u00a0\u00bb =&rsquo;https:\/\/magicsw365.sharepoint.com\/sites\/MSEFRANCE\/FRANCE&rsquo;)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"376\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG9-1024x376.png\" alt=\"\" class=\"wp-image-824\" style=\"width:918px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG9-1024x376.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG9-300x110.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG9-768x282.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG9.png 1095w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>8\/ To list the items, make a <strong>GET<\/strong> with this kind of URL : &lsquo;<strong>\/sites\/{IDSite}\/lists\/{IDList}\/items<\/strong>&lsquo;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"353\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG10-1024x353.png\" alt=\"\" class=\"wp-image-826\" style=\"width:980px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG10-1024x353.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG10-300x103.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG10-768x265.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG10.png 1218w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>9\/ If you want to retrieve only the SubFolders list, parse the JSON Response like below<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"385\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG11-1024x385.png\" alt=\"\" class=\"wp-image-831\" style=\"width:988px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG11-1024x385.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG11-300x113.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG11-768x289.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG11.png 1217w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>10\/ <strong>If you want to download files from sharepoint Site you can bypass steps 6,7,8 and 9<\/strong>, make a <strong>GET<\/strong> with this type of URL first : &lsquo;<strong>\/sites\/{IDSite}\/drives<\/strong>&lsquo; to retrieve the driveID<\/p>\n\n\n\n<p>(*) To get the IDSite, you can make a GET on : <strong>https:\/\/graph.microsoft.com\/v1.0\/sites<\/strong>  (if you have the right to do it according to your token)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG12-1024x300.png\" alt=\"\" class=\"wp-image-833\" style=\"width:998px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG12-1024x300.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG12-300x88.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG12-768x225.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG12.png 1187w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Parse the JSON response and make a filter on your desired site (webURL) to retrieve only 1 driveID<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"319\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG13-1024x319.png\" alt=\"\" class=\"wp-image-835\" style=\"width:1020px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG13-1024x319.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG13-300x93.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG13-768x239.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG13.png 1304w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>11\/ To List the content, <\/p>\n\n\n\n<p>You have several options :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>make a <strong>GET<\/strong> with this kind of URL : &lsquo;<strong>\/drives\/{driveID}\/root:\/Fic:\/Children<\/strong>&lsquo;<\/li>\n<\/ul>\n\n\n\n<p>(*) &lsquo;Fic&rsquo; is my Subfolder name (can be replaced with your ID)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"270\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG14-1024x270.png\" alt=\"\" class=\"wp-image-836\" style=\"width:1006px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG14-1024x270.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG14-300x79.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG14-768x203.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG14.png 1242w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"985\" height=\"657\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG15.png\" alt=\"\" class=\"wp-image-838\" style=\"width:703px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG15.png 985w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG15-300x200.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG15-768x512.png 768w\" sizes=\"auto, (max-width: 985px) 100vw, 985px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>make a <strong>GET<\/strong> with this kind of URL : &lsquo;<strong>\/drives\/{driveID}\/items?$filter=name eq \u00a0\u00bb\u00a0\u00bb &lsquo;<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"348\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG_MG1-1024x348.png\" alt=\"\" class=\"wp-image-3513\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG_MG1-1024x348.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG_MG1-300x102.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG_MG1-768x261.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG_MG1.png 1194w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>12\/ Use the Datamapper to parse the JSON response and make a loop to download each file by calling a flow and passing the <strong>@microsoft.graph.downloadUrl<\/strong><\/p>\n\n\n\n<p>and the <strong>name<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"321\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG16-1024x321.png\" alt=\"\" class=\"wp-image-840\" style=\"width:999px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG16-1024x321.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG16-300x94.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG16-768x240.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG16.png 1501w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>13\/ In the Called Flow, do a simple HTTP GET with the downloadUrl<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"355\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG17-1024x355.png\" alt=\"\" class=\"wp-image-842\" style=\"width:994px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG17-1024x355.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG17-300x104.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG17-768x266.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG17.png 1431w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And use FileManagement component to save the file locally<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"427\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG18-1024x427.png\" alt=\"\" class=\"wp-image-843\" style=\"width:1000px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG18-1024x427.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG18-300x125.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG18-768x320.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG18.png 1172w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>14\/ To Upload a file on the subfolder named \u00ab\u00a0<strong>Fic<\/strong>\u00ab\u00a0, make a <strong>Put<\/strong> and set the {urladdition} parameter to : &lsquo;<strong>\/drives\/{DriveID}\/items\/root:\/{SubfolderName}\/{Filename}:\/content<\/strong>&lsquo;<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Below steps are mandatory<\/strong><\/p>\n\n\n\n<p>(*) Set <strong>DataBlob<\/strong> parameter with a Blob variable. Use the File2Blb function to load the file content and Update the Blob variable with <strong>BINARY encoding<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"130\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG23-1024x130.png\" alt=\"\" class=\"wp-image-1922\" style=\"width:554px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG23-1024x130.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG23-300x38.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG23-768x97.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG23.png 1177w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>(**) Don&rsquo;t forget to Set the \u00ab\u00a0<strong>Request Content Type<\/strong>\u00a0\u00bb with the desired content in the REST Client configuration screen<\/p>\n\n\n\n<p>(for <strong>PDF <\/strong>: <strong>application\/pdf<\/strong>, for <strong>JPEG <\/strong>: <strong>image\/jpeg<\/strong> and so on so forth &#8230;)<\/p>\n\n\n\n<p>(***) Set the <strong>Desired Encoding<\/strong> to <strong>Binary<\/strong> in the configuration screen<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"855\" height=\"676\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG24-1.png\" alt=\"\" class=\"wp-image-1938\" style=\"width:474px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG24-1.png 855w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG24-1-300x237.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG24-1-768x607.png 768w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG19-1024x412.png\" alt=\"\" class=\"wp-image-847\" style=\"width:999px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG19-1024x412.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG19-300x121.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG19-768x309.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG19.png 1211w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>15\/ To delete a file, do a <strong>Delete HTTP operation<\/strong> with this type of URL : &lsquo;<strong>https:\/\/graph.microsoft.com\/v1.0\/sites\/{IDSite}\/lists\/{IDList}\/items\/{FileID}<\/strong>&lsquo; in the configuration screen<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"523\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG21-1024x523.png\" alt=\"\" class=\"wp-image-851\" style=\"width:848px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG21-1024x523.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG21-300x153.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG21-768x392.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG21.png 1277w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"481\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG28.png\" alt=\"\" class=\"wp-image-1975\" style=\"width:369px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG28.png 756w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG28-300x191.png 300w\" sizes=\"auto, (max-width: 756px) 100vw, 756px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"345\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG20-1-1024x345.png\" alt=\"\" class=\"wp-image-852\" style=\"width:917px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG20-1-1024x345.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG20-1-300x101.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG20-1-768x259.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG20-1.png 1147w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>16\/ If you want to retrieve data Content from <strong>Sharepoint List<\/strong>, Do a Get with this type of URL : &lsquo;<strong>https:\/\/graph.microsoft.com\/v1.0\/sites\/{IDSite}\/lists\/{IDList}\/items?$expand=fields($select=*)<\/strong><\/p>\n\n\n\n<p>You can specify <strong>select *<\/strong>  to retrieve all columns.<\/p>\n\n\n\n<p>(*) <a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/api\/listitem-list?view=graph-rest-1.0&amp;tabs=http\">https:\/\/learn.microsoft.com\/en-us\/graph\/api\/listitem-list?view=graph-rest-1.0&amp;tabs=http<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"761\" height=\"672\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG25.png\" alt=\"\" class=\"wp-image-1979\" style=\"width:327px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG25.png 761w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG25-300x265.png 300w\" sizes=\"auto, (max-width: 761px) 100vw, 761px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"602\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG26.png\" alt=\"\" class=\"wp-image-1948\" style=\"width:585px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG26.png 911w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG26-300x198.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG26-768x508.png 768w\" sizes=\"auto, (max-width: 911px) 100vw, 911px\" \/><\/figure>\n\n\n\n<p>The ID of the site that you want can be retrieve with a Get on <strong>https:\/\/graph.microsoft.com\/v1.0\/sites<\/strong><\/p>\n\n\n\n<p>The ID of the list that you want can be retrieve with a Get on <strong>https:\/\/graph.microsoft.com\/v1.0\/sites\/{IDSite}\/lists\/<\/strong><\/p>\n\n\n\n<p>You can use a Datamapper to parse the JSON response and map you desired columns to a Flat File<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"811\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG27-1024x811.png\" alt=\"\" class=\"wp-image-1953\" style=\"width:539px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG27-1024x811.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG27-300x238.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG27-768x608.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG27.png 1058w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>17 \/ Documentation<\/p>\n\n\n\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/api\/overview?view=graph-rest-1.0&amp;preserve-view=true\" title=\"\">https:\/\/learn.microsoft.com\/en-us\/graph\/api\/overview?view=graph-rest-1.0&amp;preserve-view=true<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Describe the different steps for connecting Magic xpi with SharepointOnline using REST Microsoft Graph API 1\/ Define in Azure Portal An app registration and add permission for Sharepoint through Microsoft Graph 2\/ Check that you can have access via Postman 3\/ Define a REST Client Resource in Magic xpi Studio 4\/ Define 2 Paths \/{list} [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":857,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4,28,26],"tags":[14,23,13],"class_list":["post-805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magic-xpi","category-microsoft","category-sharepoint","tag-magic-xpi","tag-rest","tag-sharepoint"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2024\/06\/SP_MG22.png","_links":{"self":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=805"}],"version-history":[{"count":77,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/805\/revisions"}],"predecessor-version":[{"id":3522,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/805\/revisions\/3522"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media\/857"}],"wp:attachment":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}