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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to create a new...
Power Automate
Suggested Answer

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

(0) ShareShare
ReportReport
Posted on by 1,946 Season of Giving Solutions 2025
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?
Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,081 on at
    Test with hard-coded "ServerRelativeUrl" value.
  • Suggested answer
    venturemavenwill Profile Picture
    1,198 Super User 2026 Season 1 on at
    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,946 Season of Giving Solutions 2025 on at
    @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,946 Season of Giving Solutions 2025 on at
    @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
    1,198 Super User 2026 Season 1 on at
    @johnjohnPter try to encode the # sign. For example, use %23 instead of # and see if the frontend displays the # sign. 
  • johnjohnPter Profile Picture
    1,946 Season of Giving Solutions 2025 on at
    @venturemavenwill if i encode it the ,the folder name will have %23 instead of #
  • VictorIvanidze Profile Picture
    13,081 on at
    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?
    Where is this hastTag value? Please explain.
  • johnjohnPter Profile Picture
    1,946 Season of Giving Solutions 2025 on at
    @VictorIvanidze the hastag inside the request , in the #1:-
     
     
    des/clients/Annualreports/#1/wweqwqe

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard