This issue you are experiencing when accessing SharePoint folder contains special characters like ampersand "&" through PnP Framework for .NET, is known challenge. SharePoint imposes restrictions on certain characters in file and folder names, which can lead to unexpected errors when these characters are present.
To ensure compatibility, consider renaming folders to eliminate special characters. For example, rename "Reporting & Metrics" to "Reporting and Metrics".
If renaming is not feasible, ensure that special characters are properly URL-encoded in your code, the ampersand "&" should be encoded as "%26".
When dealing with special characters, consider using GetFolderByServerRelativePath
instead of GetFolderByServerRelativeUrl
, as they handle special characters more effectively.
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.