0

I have this REST API call to SharePoint online, to check if a folder already exists in a document library :

GET _api/web/GetFolderByServerRelativeUrl('Shared Documents/test test/test#')

I am getting this error:

"status": 400
"message": "The expression "web/GetFolderByServerRelativeUrl('Shared Documents/test test/test" is not valid.
clientRequestId: 5ed8a094-6933-4f2d-b734-2ba9b1a7c8ea
serviceRequestId: 1375d7a1-904b-e000-6f5b-0acbcfb044bc",
"source": "https://******.sharepoint.com/sites/PROD-2/_api/web/GetFolderByServerRelativeUrl('Shared%20Documents/test%20test/test#')

Microsoft.SharePoint.Client.InvalidClientQueryException

If I remove the #, the request will work fine, any advice? I need to have the # since I am archiving some files and hence I am creating the folders in advance. So since the user can enter # using the UI, I need to cover this inside my API call.

Here is the full action which I did inside Power Automate:

enter image description here

Regards

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.