# 365 SharePoint

**URL:** <https://forum.uipath.com/t/365-sharepoint/493237>\
**Category:** Activities\
**Tags:** sharepoint, web, question, microsoft-office365, activities\
**Created:** [November 24, 2022, 8:16am UTC](https://forum.uipath.com/t/365-sharepoint/493237 "2022-11-24T08:16:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmad\_Rais](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ahmad_rais/32/253800_2.png) [@Ahmad\_Rais](https://forum.uipath.com/u/Ahmad_Rais)\
**Post date:** [November 24, 2022, 8:16am UTC](https://forum.uipath.com/t/365-sharepoint/493237/1 "2022-11-24T08:16:58Z")

</div>

How do we download a Sharepoint Folder into Local ?

Regards  
Ahmad

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [November 24, 2022, 8:35am UTC](https://forum.uipath.com/t/365-sharepoint/493237/2 "2022-11-24T08:35:00Z")

</div>

Hi @Ahmad_Rais

You cannot download whole folder at once… you have to use a loop to iterate theough all files and recreate the folder in your local. For downloading files you can use download file activity

Cheers

---

<div class="post-metadata">

**Author:** ![Ahmad\_Rais](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ahmad_rais/32/253800_2.png) [@Ahmad\_Rais](https://forum.uipath.com/u/Ahmad_Rais)\
**Post date:** [November 24, 2022, 8:36am UTC](https://forum.uipath.com/t/365-sharepoint/493237/3 "2022-11-24T08:36:19Z")

</div>

then we cannot download a file if we dont know the name of the file?,

Regards  
ahmad

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [November 24, 2022, 8:43am UTC](https://forum.uipath.com/t/365-sharepoint/493237/5 "2022-11-24T08:43:47Z")

</div>

Hi @Ahmad_Rais

You have an activity for each file/folder which will givw you all the files under a folder

[https://docs.uipath.com/activities/docs/office365-for-each-file-folder](https://docs.uipath.com/activities/docs/office365-for-each-file-folder)

Cheers

---

<div class="post-metadata">

**Author:** ![Ahmad\_Rais](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ahmad_rais/32/253800_2.png) [@Ahmad\_Rais](https://forum.uipath.com/u/Ahmad_Rais)\
**Post date:** [November 24, 2022, 8:46am UTC](https://forum.uipath.com/t/365-sharepoint/493237/6 "2022-11-24T08:46:08Z")

</div>

can you please proved an example on the structure and what to fill in on the propertis ?

im kinda lost here

regards  
ahmad

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [November 24, 2022, 8:51am UTC](https://forum.uipath.com/t/365-sharepoint/493237/7 "2022-11-24T08:51:44Z")

</div>

Hi @Ahmad_Rais

say your url is `https://www.sharepoint.com/sites/<sitename>/<drivename>/subfolder1/subfolder2/files.xlsx`

```auto
Sp url - https://www.sharepoint.com/sites/<sitename>
library/Drivename - <drivename> ( this might be different go to site settings to see the exact name or inspect the elment to see the backend name)
Sub folders - subfolder1
Query - Subfolder2

```

cheers

---

<div class="post-metadata">

**Author:** ![Gokul001](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gokul001/32/462734_2.png) [@Gokul001](https://forum.uipath.com/u/Gokul001)\
**Post date:** [November 24, 2022, 9:04am UTC](https://forum.uipath.com/t/365-sharepoint/493237/8 "2022-11-24T09:04:07Z")

</div>

Hi @Ahmad_Rais

Check out this video link and thread

[![](https://global.discourse-cdn.com/uipath/original/4X/0/f/f/0ffedffc8e6025bc752ef9c614d4916dff69b8fa.jpeg "Download file from any folder from SharePoint Site to local machine #SharepointUiPathIntegration") ](https://www.youtube.com/watch?v=5prk27uw81w)

> [@Download file explicitly from sharepoint](https://forum.uipath.com/t/download-file-explicitly-from-sharepoint/230647/4):
>
> Then you can simply use urlmon code (as long as you are running on Windows based machine). Code: Option Explicit #If Win64 Then Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias \_ "URLDownloadToFileA" ( \_ ByVal pCaller As LongLong, \_ ByVal szURL As String, \_ ByVal szFileName As String, \_ ByVal dwReserved As LongLong, \_ ByVal lpfnCB As LongLong) As LongLong #Else Private Declare Function URLDownloadToFile Lib "…

Regards  
Gokul

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [November 24, 2022, 9:50am UTC](https://forum.uipath.com/t/365-sharepoint/493237/11 "2022-11-24T09:50:34Z")

</div>

Hi @Ahmad_Rais

this is how you will use it

 ![image](https://global.discourse-cdn.com/uipath/original/4X/2/7/4/274a546830904dc0d906ccd9e8faf9013e6094e1.png)

instead of \* you can try leaving blank

cheers

---

<div class="post-metadata">

**Author:** ![Ahmad\_Rais](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ahmad_rais/32/253800_2.png) [@Ahmad\_Rais](https://forum.uipath.com/u/Ahmad_Rais)\
**Post date:** [November 25, 2022, 2:47am UTC](https://forum.uipath.com/t/365-sharepoint/493237/12 "2022-11-25T02:47:54Z")

</div>

Hi ,

it says code access denied ,  
or i no longer have access

but i can download if only 1 file using find files and folder  
then using download flle activity

Regards

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [November 25, 2022, 6:09am UTC](https://forum.uipath.com/t/365-sharepoint/493237/13 "2022-11-25T06:09:21Z")

</div>

Hi @Ahmad_Rais

You might not be having access to the sub folders thats is the folder in which the final folder is present . Office 365 needs it because if you want to download a file from folder x then you should have permissions to one folder down for folder x

Cheers

---

<div class="post-metadata">

**Author:** ![Ahmad\_Rais](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ahmad_rais/32/253800_2.png) [@Ahmad\_Rais](https://forum.uipath.com/u/Ahmad_Rais)\
**Post date:** [November 25, 2022, 7:29am UTC](https://forum.uipath.com/t/365-sharepoint/493237/14 "2022-11-25T07:29:08Z")

</div>

i have check the access , and i do have it,

dows it have any connection with Api Permission ?,  
i only use graph Delegated Permission.

regards  
ahmad

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [November 25, 2022, 7:33am UTC](https://forum.uipath.com/t/365-sharepoint/493237/15 "2022-11-25T07:33:19Z")

</div>

Hi @Ahmad_Rais

Say your folder structure is folder1/folder2subfolder1/subfolder2/subfolder3/file.xlsx

And if you want to run for each file/folder on subfolder3 then you need to have complete access starting from subfolder1 as to get the item

Can you show or share the actual workflow please

Cheers

---

<div class="post-metadata">

**Author:** ![Ahmad\_Rais](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ahmad_rais/32/253800_2.png) [@Ahmad\_Rais](https://forum.uipath.com/u/Ahmad_Rais)\
**Post date:** [November 25, 2022, 7:34am UTC](https://forum.uipath.com/t/365-sharepoint/493237/16 "2022-11-25T07:34:14Z")

</div>

Hi ,

the full acess is edit access right?

thanks

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [November 25, 2022, 7:35am UTC](https://forum.uipath.com/t/365-sharepoint/493237/17 "2022-11-25T07:35:01Z")

</div>

Hi @Ahmad_Rais

Yes edit access is the full access…

Cheers

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [November 28, 2022, 7:35am UTC](https://forum.uipath.com/t/365-sharepoint/493237/18 "2022-11-28T07:35:25Z")

</div>

Closed on November 28, 2022, 7:35am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
