web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Trying to create a new sharepoint folder using rest api, error "not found"

(0) ShareShare
ReportReport
Posted on by 1,740 Super User 2024 Season 1
I have this call to create a new sharepoint Folder:-
 
 
where the "ServerRelativeUrl" value = " "/des/clients/Annualreports/#1/wweqwqe/""
 
 
But i got this error:-
 
{
  "error": {
    "code"502,
    "source""flow-apim-europe-002-westeurope-01.azure-apim.net",
    "clientRequestId""68761ac8-3ad9-44f4-bbba-f0bc48cd37d9",
    "message""BadGateway",
    "innerError": {
      "status"502,
      "message""(null) \"des/clients/Annualreports/#1/wweqwqe\" not found.\r\nclientRequestId: 68761ac8-3ad9-44f4-bbba-f0bc48cd37d9\r\nserviceRequestId: 1d71d7a1-409c-e000-6f5b-08e8117a88ee",
      "source""https://*******.sharepoint.com/_api/web/folders",
      "errors": [
        "-2130247139",
        "Microsoft.SharePoint.SPException"
      ]
    }
  }
}
 
 
Any advice?
I have the same question (0)
  • VictorIvanidze Profile Picture
    12,839 on at
    Trying to create a new sharepoint folder using rest api, error "not found"
    Test with hard-coded "ServerRelativeUrl" value.
  • Suggested answer
    venturemavenwill Profile Picture
    955 Super User 2025 Season 2 on at
    Trying to create a new sharepoint folder using rest api, error "not found"
    There are two problems I see 
     
    The following are illegal characters in a folder name
     
    ~, #, %, & , *, {, }, \, :, <, >, ?, /, |, "
    also, it would appear that your variable is outputting "wweqwqe\" instead of "wweqwqe/"

    Try replacing both and giving it another try
  • johnjohnPter Profile Picture
    1,740 Super User 2024 Season 1 on at
    Trying to create a new sharepoint folder using rest api, error "not found"
    @VictorIvanidze same issue the problem is with this hasTag value, if i remove it the problem will be solved, but i want to keep it. any advice?
  • johnjohnPter Profile Picture
    1,740 Super User 2024 Season 1 on at
    Trying to create a new sharepoint folder using rest api, error "not found"
    @venturemavenwill I am not using any of these special characters  ,, the problem seems to be with the # ... which i want to have, as we can add # using the UI when creating new folders
     
    Also for the "wweqwqe\" instead of "wweqwqe/" .. this is how power automate show the folder inside the output.. the folder i am passing end with / and not \
  • Suggested answer
    venturemavenwill Profile Picture
    955 Super User 2025 Season 2 on at
    Trying to create a new sharepoint folder using rest api, error "not found"
    @johnjohnPter try to encode the # sign. For example, use %23 instead of # and see if the frontend displays the # sign. 
  • johnjohnPter Profile Picture
    1,740 Super User 2024 Season 1 on at
    Trying to create a new sharepoint folder using rest api, error "not found"
    @venturemavenwill if i encode it the ,the folder name will have %23 instead of #

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 722 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
developerAJ Profile Picture

developerAJ 283

Last 30 days Overall leaderboard