This seems like it's working in our SharePoint instances now! An update must be rolling out
CSOM Microsoft.SharePoint.Client.Web throws exception when loading ServerRelativePath
We recently have been experiencing an issue when loading the ServerRelativePath property of the Web object.
This was previously working yesterday and for the last 4+ years but suddenly has stopped.
3 answers
Sort by: Most helpful
-
-
Xyza Xue_MSFT 29,356 Reputation points Microsoft External Staff
2025-02-12T05:49:00.7+00:00 Hi @AdamMurchison-0306 ,
Since we can't reproduce your situation, we need to narrow down the problem and try some things.
- It's possible that a recent update or patch to the SharePoint environment introduced a change in how certain properties or methods behave. Check the version of SharePoint you're running and whether any recent updates were applied.
- Verify that your application or user context has the correct permissions. A change in user permissions or roles could prevent the
ServerRelativePath
property from being accessed correctly.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
-
Xyza Xue_MSFT 29,356 Reputation points Microsoft External Staff
2025-02-12T10:05:27.4966667+00:00 Hi @AdamMurchison-0306 ,
Maybe the truth is as you say. This could be an update issue, and for now, we'll just have to be patient and wait for an update to fix the problem. It seems as though you've found a temporary solution to the problem. I would make a brief summary of this thread:
Issue Symptom:
CSOM Microsoft.SharePoint.Client.Web throws exception when loading ServerRelativePath.
Current status:
A workaround seems to be using
Web.RootFolder.ServerRelativePath
. The latest version of the CSOM package https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM (16.1.25611.12000) still provides the property on theWeb
object.You could click the "Accept Answer" button for this summary to close this thread, and this can make it easier for other community member's to see the useful information when reading this thread. Thanks for your understanding!