{"id":362,"date":"2023-11-29T15:13:29","date_gmt":"2023-11-29T14:13:29","guid":{"rendered":"https:\/\/france.magicsoftware.com\/blog\/?p=362"},"modified":"2025-03-13T17:42:32","modified_gmt":"2025-03-13T16:42:32","slug":"sharepoint-online-magic-xpi","status":"publish","type":"post","link":"https:\/\/france.magicsoftware.com\/blog\/magic-xpi\/sharepoint-online-magic-xpi\/","title":{"rendered":"SharePoint Online &#8211; Magic xpi: How to Get the Content list of a SharePoint folder and download files locally using REST Sharepoint API"},"content":{"rendered":"\n<p>Describe the different steps for connecting Magic xpi with SharepointOnline using REST Sharepoint API (*)<\/p>\n\n\n\n<p>(*) Sharepoint can be accessed also via REST Microsoft Graph API (not described in this post)<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Goal<\/strong> : Download files from Sharepoint Online Folder<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"326\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_12-1024x326.png\" alt=\"\" class=\"wp-image-420\" style=\"width:596px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_12-1024x326.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_12-300x95.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_12-768x244.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_12.png 1364w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-verse\">1\/ Check that you can call REST Sharepoint Online API using Postman with your credentials<\/pre>\n\n\n\n<p>Send a POST on <strong>https:\/\/accounts.accesscontrol.windows.net\/&lt;yourtenantid&gt;\/tokens\/OAuth\/2<\/strong> by passing grant_type, client_id, client_secret, resource in other to get the token<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1019\" height=\"708\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_1-1.png\" alt=\"\" class=\"wp-image-372\" style=\"width:542px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_1-1.png 1019w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_1-1-300x208.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_1-1-768x534.png 768w\" sizes=\"auto, (max-width: 1019px) 100vw, 1019px\" \/><\/figure>\n\n\n\n<p>Send a GET on https:\/\/<strong><em>&lt;YourSharePointCollectionURL&gt;<\/em><\/strong>.sharepoint.com\/sites\/<strong>&lt;SPsite&gt;<\/strong>\/_api\/web\/GetFolderByServerRelativeUrl(&lsquo;\/sites\/<strong>&lt;SPsite&gt;<\/strong>\/<strong>&lt;subfolder1&gt;<\/strong>\/<strong>&lt;subfolder2&gt;<\/strong>\/&rsquo;)\/files  <\/p>\n\n\n\n<p>For example in my case :<\/p>\n\n\n\n<p>https:\/\/<strong><em>&lt;YourSharePointCollectionURL&gt;<\/em><\/strong>.sharepoint.com\/sites\/<strong>MSE-France<\/strong>\/_api\/web\/GetFolderByServerRelativeUrl(&lsquo;\/sites\/<strong>MSE-France<\/strong>\/SaadLibrary2\/test2\/&rsquo;)\/files   to check that you can retrieve all the information related to folder content.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"567\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_2-1024x567.png\" alt=\"\" class=\"wp-image-374\" style=\"width:545px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_2-1024x567.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_2-300x166.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_2-768x426.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_2.png 1406w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>(*) client_id, client_secret, tenantid and resource can be generated using these steps below<\/p>\n\n\n\n<p>1.1 Navigate to : <em><strong>https:\/\/&lt;YourSharePointCollectionURL&gt;\/_layouts\/15\/appregnew.aspx<\/strong><\/em> to register a new Sharepoint app<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"850\" height=\"278\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_3.png\" alt=\"\" class=\"wp-image-377\" style=\"width:477px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_3.png 850w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_3-300x98.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_3-768x251.png 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/figure>\n\n\n\n<p>1.2 after generating client id and client secret, navigate to :<\/p>\n\n\n\n<p><strong>https:\/\/<em>&lt;YourSharePointCollectionURL&gt;<\/em>\/_layouts\/15\/appinv.aspx<\/strong> to grant permission to your app<\/p>\n\n\n\n<p>fill the information and copy\/paste the xml below in the field Apps permission request XML<\/p>\n\n\n\n<p>&lt;AppPermissionRequests AllowAppOnlyPolicy=\u00a0\u00bbtrue\u00a0\u00bb&gt; &lt;AppPermissionRequest Scope=\u00a0\u00bb<a href=\"http:\/\/sharepoint\/content\/sitecollection\/web\">http:\/\/sharepoint\/content\/sitecollection\/web<\/a>\u00a0\u00bb Right=\u00a0\u00bbFullControl\u00a0\u00bb \/&gt; &lt;\/AppPermissionRequests&gt;<\/p>\n\n\n\n<p>1.3 Navigate to : <strong>https:\/\/<em>&lt;YourSharePointCollectionURL&gt;<\/em>\/_layouts\/15\/appprincipals.aspx<\/strong> to get the tenantid and clientid with @<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"850\" height=\"174\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_4.png\" alt=\"\" class=\"wp-image-380\" style=\"width:664px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_4.png 850w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_4-300x61.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_4-768x157.png 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/figure>\n\n\n\n<p>2\/ Create a New Magic xpi Flow with a Flow Data Step first and update a variable with the body credentials<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"736\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_5.png\" alt=\"\" class=\"wp-image-384\" style=\"width:622px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_5.png 961w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_5-300x230.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_5-768x588.png 768w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/figure>\n\n\n\n<p>3\/ Create a REST Client Magic xpi resource to navigate to <strong>https:\/\/accounts.accesscontrol.windows.net<\/strong> to get the Bearer token (Project=&gt;Settings=&gt;Resources)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"289\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_6-1024x289.png\" alt=\"\" class=\"wp-image-387\" style=\"width:648px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_6-1024x289.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_6-300x85.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_6-768x216.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_6.png 1192w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>4\/ Use REST Client Connector to call the previous URL<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"726\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_7-1.png\" alt=\"\" class=\"wp-image-397\" style=\"width:391px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_7-1.png 856w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_7-1-300x254.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_7-1-768x651.png 768w\" sizes=\"auto, (max-width: 856px) 100vw, 856px\" \/><\/figure>\n\n\n\n<p>5\/ Parse the json response to get the token using a Flow Data Component<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"688\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_8.png\" alt=\"\" class=\"wp-image-402\" style=\"width:483px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_8.png 1023w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_8-300x202.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_8-768x517.png 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/><\/figure>\n\n\n\n<p>You will use the variable C.AccessToken later on in the Authorization Header parameter<\/p>\n\n\n\n<p>6\/ Create a REST Client Magic xpi resource to call sharepoint methods (Project=&gt;Settings=&gt;Resources)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1022\" height=\"316\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_9.png\" alt=\"\" class=\"wp-image-407\" style=\"width:629px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_9.png 1022w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_9-300x93.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_9-768x237.png 768w\" sizes=\"auto, (max-width: 1022px) 100vw, 1022px\" \/><\/figure>\n\n\n\n<p>7\/ Drag and Drop a REST Client Connector linked to the previous resource and configure the connector to set the path <strong>{List}<\/strong> with Get operation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"919\" height=\"604\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_10-1.png\" alt=\"\" class=\"wp-image-411\" style=\"width:626px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_10-1.png 919w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_10-1-300x197.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_10-1-768x505.png 768w\" sizes=\"auto, (max-width: 919px) 100vw, 919px\" \/><\/figure>\n\n\n\n<p>Enter the value : &lsquo;Bearer &lsquo;&amp;trim(c.AccessToken)  for the Authorization in the Header Parameters<\/p>\n\n\n\n<p>8\/ Update <strong>list<\/strong> parameter with the expression : &lsquo;<strong>GetFolderByServerRelativeUrl(\u00a0\u00bb&lt;FolderPath&gt;\u00a0\u00bb)\/files<\/strong>&lsquo;<\/p>\n\n\n\n<p>example : GetFolderByServerRelativeUrl(\u00a0\u00bb\/sites\/MSE-France\/SaadLibrary2\/test2\u00a0\u00bb)\/files<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"893\" height=\"566\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_11.png\" alt=\"\" class=\"wp-image-414\" style=\"width:541px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_11.png 893w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_11-300x190.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_11-768x487.png 768w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/><\/figure>\n\n\n\n<p>9\/ Drag and Drop a Datamapper component to parse the result and make a loop to call another flow that will responsible to download the file<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"285\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_13-1024x285.png\" alt=\"\" class=\"wp-image-424\" style=\"width:873px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_13-1024x285.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_13-300x83.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_13-768x213.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_13.png 1317w\" 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=\"902\" height=\"595\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_14.png\" alt=\"\" class=\"wp-image-427\" style=\"width:436px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_14.png 902w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_14-300x198.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_14-768x507.png 768w\" sizes=\"auto, (max-width: 902px) 100vw, 902px\" \/><\/figure>\n\n\n\n<p>Set F.FileName and F.RelativeURL variables with Name and ServerRelativeURL.<\/p>\n\n\n\n<p>10\/ Create another path in the resource repository <strong>{monpath}<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"304\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_15-1-1024x304.png\" alt=\"\" class=\"wp-image-433\" style=\"width:526px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_15-1-1024x304.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_15-1-300x89.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_15-1-768x228.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_15-1.png 1094w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>11\/ Drag &amp; Drop a REST Client connector and right click to configure the connector<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"990\" height=\"591\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_16.png\" alt=\"\" class=\"wp-image-436\" style=\"width:553px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_16.png 990w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_16-300x179.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_16-768x458.png 768w\" sizes=\"auto, (max-width: 990px) 100vw, 990px\" \/><\/figure>\n\n\n\n<p>Set <strong>monpath<\/strong> parameter with the expression : &lsquo;<strong>GetFolderByServerRelativeUrl(\u00a0\u00bb&rsquo;&amp;Trim (F.RelativeURL)&amp;\u00a0\u00bb&rsquo;)\/Files(\u00a0\u00bb&rsquo;&amp;Trim (F.FileName)&amp;\u00a0\u00bb&rsquo;)\/$Value<\/strong>&lsquo;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"808\" height=\"557\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_17.png\" alt=\"\" class=\"wp-image-437\" style=\"width:485px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_17.png 808w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_17-300x207.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_17-768x529.png 768w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/figure>\n\n\n\n<p>12\/ Drag &amp; Drop a FileManagement component to save the file on the disk<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"557\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_18-1024x557.png\" alt=\"\" class=\"wp-image-439\" style=\"width:596px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_18-1024x557.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_18-300x163.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_18-768x418.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_18.png 1111w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>13\/ If the previous step \u00ab\u00a0Get File\u00a0\u00bb is successfull then delete the file on sharepoint folder<\/p>\n\n\n\n<p>Create another path in the resource repository <strong>{delete}<\/strong><\/p>\n\n\n\n<p>Don&rsquo;t forget to set in the header : <strong>X-HTTP-Method to DELETE<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"409\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_19-1024x409.png\" alt=\"\" class=\"wp-image-443\" style=\"width:606px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_19-1024x409.png 1024w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_19-300x120.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_19-768x306.png 768w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_19.png 1118w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>14\/ Drag &amp; Drop a REST Client connector to call the delete method at the end of the flow<\/p>\n\n\n\n<p>Choose a Post operation<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"931\" height=\"625\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_20.png\" alt=\"\" class=\"wp-image-446\" style=\"width:546px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_20.png 931w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_20-300x201.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_20-768x516.png 768w\" sizes=\"auto, (max-width: 931px) 100vw, 931px\" \/><\/figure>\n\n\n\n<p>Update the parameter <strong>delete<\/strong> with the expression : <strong>&lsquo;GetFolderByServerRelativeUrl(\u00a0\u00bb&rsquo;&amp;Trim (F.RelativeURL)&amp;\u00a0\u00bb&rsquo;)\/Files(\u00a0\u00bb&rsquo;&amp;Trim (F.FileName)&amp;\u00a0\u00bb&rsquo;)&rsquo;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"376\" src=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_21.png\" alt=\"\" class=\"wp-image-448\" style=\"width:536px;height:auto\" srcset=\"https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_21.png 784w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_21-300x144.png 300w, https:\/\/france.magicsoftware.com\/blog\/wp-content\/uploads\/2023\/11\/SharepointOnline_21-768x368.png 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/figure>\n\n\n\n<p>15\/ Document reference : <a href=\"https:\/\/www.c-sharpcorner.com\/article\/how-to-test-sharepoint-online-rest-apis-using-postman-tool\/\">https:\/\/www.c-sharpcorner.com\/article\/how-to-test-sharepoint-online-rest-apis-using-postman-tool\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Describe the different steps for connecting Magic xpi with SharepointOnline using REST Sharepoint API (*) (*) Sharepoint can be accessed also via REST Microsoft Graph API (not described in this post) Goal : Download files from Sharepoint Online Folder 1\/ Check that you can call REST Sharepoint Online API using Postman with your credentials Send [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":858,"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-362","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\/2023\/11\/SP_SP1.png","_links":{"self":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/362","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=362"}],"version-history":[{"count":29,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"predecessor-version":[{"id":2903,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/posts\/362\/revisions\/2903"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media\/858"}],"wp:attachment":[{"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/france.magicsoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}