Download file from URL giving 403 error

Hi,

I have a URL with me for sharepoint list item attachment.

And i am trying to download file using “download file from url” activity but it is throwing me below error:

RemoteException wrapping System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (FORBIDDEN).

Please note: I am able to download file manually by directly opening URL in browser, so I do have the access.

Also, I am able to download file from below URL:
https://global.discourse-cdn.com/uipath/original/3X/1/0/10bc70a2391659f17b8db310308dfdcdd4fe71d2.png

What can be the issue?

Regards
Sonali

@sonaliaggarwal47

The issue is authentication in case of sharepoint urls

Cheers

@Anil_G,

Yeah, that makes sense.

But then how to download the same?

I am trying using O365 download file activity as well.

But in that case, its asking for drive item details, but this is not a drive instead a list item.

Any suggestions?

Regards
Sonali

@sonaliaggarwal47

The list item attachments are stored in list correlated DB so difficult to get the document library as such

As there is no direct way the activity is also not offered

As of now the only work around that is left is to use rest api and get the attachment as graph api does not support..

Another way that we did is to instead of direct attachment we uploaded files to document library and provided the url in the list item

Cheers

1 Like

@Anil_G,

Thanks for your inputs.

We can’t have the sharepoint list structure changed for now. Its a very old process.

So, we have done below, it worked:

  1. Create attachment files on a sharepoint library(under same site) via power automate.
  2. call it using UiPath
  3. Download files from sharepoint library using “Download File” activity.

Regards
Sonali

1 Like

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