UiPath Documentation
activities
latest
false
Productivity activities

Files troubleshooting

When connecting as a Service Principal, you don't have a "personal" OneDrive, because you aren't authenticating on behalf of a user.

Upload/Create files when using ApplicationIdAndSecret authentication type​

When connecting as a Service Principal, you don't have a "personal" OneDrive, because you aren't authenticating on behalf of a user. Therefore, you can only create a workbook or upload a file in a document library of a SharePoint site to which the Service Principal has access.

Make sure your Azure registered application has at least the following Graph API application permissions: Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Sites.ReadWrite.All.

Expose file size for downloaded files​

Starting with v2.0.0, to retrieve file size for downloaded files (e.g., from a Download File activity), you can use the following method in a Log Message activity:

GetSizeInBytes()

Note that the size may not be accurate or a value of -1 can be retrieved if the size can't actually be determined.

Was this page helpful?

Connect

Need help? Support(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated