We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Create Folder action failing while Get Site succeeds in SharePoint Online Spoke

Daniel142
Tera Expert

Hi Team,

 

I’m currently configuring the SharePoint Online integration in ServiceNow using the SharePoint Online spoke and I found a behavior that I would like to confirm.


Current behavior

The connection itself appears to be working correctly because actions such as Get Site are returning successful responses.

Daniel142_0-1779481731392.png

 

However, when trying to use the Create Folder action, the step fails.


Error received

The response body returned is:

{
  "error": {
    "code": "BadRequest",
    "message": "Resource not found for the segment '_api'.",
    "innerError": {
      "date": "2026-05-18T16:31:35",
      "request-id": "xxxxxxxx",
      "client-request-id": "xxxxxxxx"
    }
  }
}

Daniel142_2-1779481914153.png

 

Additional details

  • The SharePoint connection test is successful.
  • OAuth authentication appears to be working correctly.
  • Get Site action works without issue.
  • The failure only happens with Create Folder.
  • We are using Microsoft Graph-based authentication.

I would like to confirm:

  1. Is the Create Folder action expecting a different Site URL format?
  2. Is there any known limitation when using Graph authentication with this action?
  3. Should the folder path be relative to the document library root?
  4. Is additional configuration required for the Document Library parameter?

Additional context:

  • Site: /sites/TestSP
  • Library: Documentos compartidos
  • Target folder example: Folder1

 

Thank you in advance for your support!

2 REPLIES 2

Tanushree Maiti
Tera Patron

Hi @Daniel142 

 

Can you validate your end point .

Please try making a test API call from Postman to verify that it’s working correctly. Also, confirm with the SharePoint team that you’re using the correct endpoint URL and request parameters.

 

refer post on similar issue:

Error with SharePoint Online Spoke - BadRequest, message: Resource not found for the segment _api 

 

Also check: https://stackoverflow.com/questions/79684914/graph-api-badrequest-message-resource-not-found-for-the...

https://learn.microsoft.com/en-us/answers/questions/2281480/resource-not-found-for-the-segment-tenan...

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Hugo V
Tera Contributor

Hello,

Facing the same issue, I noticed that Microsoft SharePoint Online Spoke uses 2 different connections:

From the documentation:
"You can perform some actions by using the SharePoint Online connection and the remaining actions by using the SharePoint Graph connection."

In our case:
Get Site action uses Graph connection and works fine
Create folder uses Sharepoint Online connection and therefore does not work with SP Graph connection.

In this case you want to either setup a Sharepoint Online connection and use it for your create folder action.
or setup an outbound REST message to create folders using Sharepoint Graph Connection.

See this link for the list of actions for each connection type:
Microsoft SharePoint Online Spoke • Australia Workflow Data Fabric • Documentation produit | Service...

See this link for Sharepoint Graph documentation including create folder:
Create a new folder - Microsoft Graph v1.0 | Microsoft Learn


In my case I had to use Graph Connector only and ended up creating a rest message with a few http methods for my use case (get site, get drives, create folder, write file, etc...)

Hope this helps !

Regards