SharePoint Upload File Error: (401) Unauthorized

I am using the “Upload File” SharePoint activity and getting the following error:

image

Everything in the Application Scope is configured correctly. I was successful with getting a file and creating a new SharePoint folder.

Below is what I have for Item URL and Local Path just to verify:

image

Could this be due to a security parameter within the SharePoint environment? Hoping someone can clarify. Thank you in advance!

It is purely due to authorization @bsylvester

If you are able to create a new folder, then it is authorized for sure. but if you are trying to upload files or download files, then we need to check the folder permissions and the security context of the sharepoint

Thank you @HareeshMR. What’s odd is that I do have access to upload files via the UI, but not when I run the UiPath activity. I also had no problems downloading a file and moving it a local folder via the Get File activity. In light of that, do you still think there still could be folder permissions that are preventing the bot from uploading a file? I also have the trial and access to support so I may ask them.

No need as you are able to get success responce for get file using activities @bsylvester,

The issue is strange now. I don’t understand the issue behind the error. Are you sure the sharepoint URL and the item URL used in the Upload Files activity?

3 Likes

@HareeshMR it was a simple mistake (isn’t it always?? :slight_smile: ); the Item URL was missing the Library Name at the beginning of the path. Once I fixed that, I was able to upload a file. At least the post could be useful for anyone encountering this error message.

2 Likes

Glad you got the solution @bsylvester

Thanks for letting us know the issue :slight_smile:

1 Like

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