Hi all
I'm using the SharePoint List Folder action in Power Automate Desktop.
The flow started throwing an error on Monday, immediately after the weekend suggesting some sort of Microsoft update as there were no changes on my side whatsoever (permissions, folders etc)
This is the error I'm getting on the SharePoint List Folder action:
Additional info:
{
"StatusCode": "403",
"Message": "",
"Body": {
"status": 403.0,
"message": "Attempted to perform an unauthorized operation.\r\nclientRequestId: xxxxxxxx-3331-481d-xxxx-xxxxxxxxxxxx,g85jd8ad-xxxx-453b-xxxx-xxxxxx5d0xx1\r\nserviceRequestId: xxxx4ra1-xxed-xxx0-bexx-xxxxxbb5bf0a",
"source": "https://Companysite.sharepoint.com/sites/Client/_api/web/GetFolderByServerRelativePath(decodedUrl=@p)?$expand=Folders,Files&@p='%2fsites%2fClient%2fShared+Documents%2fGeneral%2fTableau+Workbooks'",
"errors": [
"-xxx702xxx1",
"System.UnauthorizedAccessException"
]
}
I believe it has to do with some sort of encoding issue, let me explain why.
I'm pulling in the SharePoint folder path dynamically and the value looks like this: %252fShared%2bDocuments%252fGeneral%252fTableau%2bWorkbooks%252f (note this was working all along). Note that initially this path did not work as the File Identifier in the action: /Shared Documents/General/Tableau Workbooks/. And therefore I had to replace the / and spaces with %252f and %2b respectively.
Now as a test, I just created a test flow with only the SharePoint List folder action in it.
Instead of using a variables for the site address and File identifier fields in the action, I just selected the drop down and selected the site address that was available and I did the same thing for the file identifier and I was able to select /Shared Documents/General/Tableau Workbooks/. I ran the flow and it worked beautifully
The .id value of the variable produced from the Sharepoint List action was: %252fShared%2bDocuments%252fGeneral%252fTableau%2bWorkbooks%252fClient_Operations_Dashboard_20240904.twbx.
Because the flow ran perfectly, this suggested that there are no permission issues like the error says.
It seems the SharePoint List Folder action (or the API it's using) may have changed how it handles or expects file paths in Power Automate Desktop
Does anyone know how to fix it?