sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

CSOM AddSubFolder no longer working in one of our SharePoint Online tenants > unkown error

Open chr-sad opened this issue 1 year ago • 15 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

CSOM

Developer environment

None

What browser(s) / client(s) have you tested

  • [ ] 💥 Internet Explorer
  • [ ] 💥 Microsoft Edge
  • [ ] 💥 Google Chrome
  • [ ] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [x] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

CSOM with PowerShell 5.1.22000.2538

Describe the bug / error

As of today, it is no longer possible to create a folder in SharePoint Online using CSOM and the AddSubFolder() API in one of our tenants. Until yesterday (October 29, 2025), this worked without any problems. I tried it in this tenant in two different site collections, including a newly created list without any customization. When I run the exact same script on a second tenant in our company (also a newly created list without any customization), everything works fine. As far as I can tell, no changes have been made to the configuration on our side. There are also no further error details.

Is anyone else experiencing this problem?

Steps to reproduce

... $ParentList.Context.Load($ParentList.RootFolder) $ParentList.RootFolder.AddSubFolder("test") $ParentList.Context.Load($ParentList) $ParentList.Context.ExecuteQuery()

unknown error in one tenant

Expected behavior

The folder "test" should be created without any error.

chr-sad avatar Oct 30 '25 13:10 chr-sad

Hi @chr-sad, Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.
If you don’t receive a reply within two working days, please use this escalation form to escalate.

Ashlesha-MSFT avatar Oct 30 '25 14:10 Ashlesha-MSFT

The problem still exists today (October 31, 2025) in our tenant. Hopefully it is only an issue with this specific tenant.

chr-sad avatar Oct 31 '25 12:10 chr-sad

We are facing the same issue since 28th of october in our tenant - we didn't change a thing and have nothing to debug ("Unknown error")

Dee-san avatar Oct 31 '25 12:10 Dee-san

@Dee-san That's not good—thanks for letting us know. @Ashlesha-MSFT If this behavior reaches productive tenants, we will have a huge and critical problem, as all of our solutions will no longer work!

chr-sad avatar Oct 31 '25 13:10 chr-sad

@chr-sad, Based on the initial investigation, this appears to be a tenant-specific issue. I will tag the engineering team to escalate this issue so they can investigate the service behavior in your tenant.

To help us reproduce the issue accurately, could you please provide the following details:

  • Tenant URL where the issue occurs
  • Site collection and list/library name used in the script
  • A test account or App Registration (if possible) with permissions to run the CSOM AddSubFolder() call

Once we have these details, provide all necessary information to the engineering team for further investigation.

Ashlesha-MSFT avatar Oct 31 '25 15:10 Ashlesha-MSFT

@Ashlesha-MSFT thank you. We have already prepared your required informations. Is there a way to send this in a private way since i do not want to publish this sensitive data here on github?

Unfortunately, we now also have our first productive customer reporting this problem.

chr-sad avatar Nov 03 '25 14:11 chr-sad

@chr-sad, Thank you for preparing the requested information. To keep your tenant details private, please send them directly via email instead of posting them here.

You can share the details with me at [email protected]

Ashlesha-MSFT avatar Nov 04 '25 06:11 Ashlesha-MSFT

@Ashlesha-MSFT I have sent the requested information. We now have 3 productive customers with an outage. We now have three productive customers with one failure. We are currently trying a workaround with AddSubFolderUsingPath. Initial incomplete tests suggest that this could still work.

chr-sad avatar Nov 04 '25 07:11 chr-sad

@Ashlesha-MSFT it seems, that in the newest Microsoft.SharePoint.Client.dll for SP Online the AddSubFolder API has changed.

It is no longer: public void AddSubFolder( string leafName )

but requires a second parameter.

chr-sad avatar Nov 04 '25 08:11 chr-sad

We ran in the same issue in C#. We have a couple of customer projects where we use it. Do you have any idea when it will be fixed?

FelixMD15 avatar Nov 05 '25 15:11 FelixMD15

@FelixMD15 just for your information - we have prepared a hotfix for our customers and changed to "AddSubFolderUsingPath" API. This one is still working if you can not wait for an official fix.

chr-sad avatar Nov 05 '25 15:11 chr-sad

@Ashlesha-MSFT why is this issue still not listed in SharePoint Admin Message Center (at least not in ours)? This kind of thing must be clearly visible as a service disruption so that at least the SharePoint administrators are aware of it.

chr-sad avatar Nov 05 '25 16:11 chr-sad

We see the same issue on customer tenants, starting October 28, 2025 and still present.

@Ashlesha-MSFT any update or timeline when a fix is rolled out?

fheinicke avatar Nov 11 '25 15:11 fheinicke

@FelixMD15 just for your information - we have prepared a hotfix for our customers and changed to "AddSubFolderUsingPath" API. This one is still working if you can not wait for an official fix.

Can confirm that the workaround using AddSubFolderUsingPath is working, thanks @chr-sad.

$leafPath = [Microsoft.SharePoint.Client.ResourcePath]::FromDecodedUrl($subFolderName)
$parentFolder.AddSubFolderUsingPath($leafPath)
$parentFolder.Context.ExecuteQuery()

fheinicke avatar Nov 12 '25 12:11 fheinicke

Does the regular Add and AddUsingPath work on the FolderCollection? That's what's being used in PnP Framework (see https://github.com/pnp/pnpframework/blob/dev/src/lib/PnP.Framework/Extensions/FileFolderExtensions.cs#L458-L573)

jansenbe avatar Nov 20 '25 11:11 jansenbe