Inconsistent behaviour when using CSOM to create DocumentSets with names containing "#" or "%" #9458
Open
1 of 9 tasks
Labels
area:csom/rest/api
Category: SharePoint Client Side Object Model SDK / REST API
type:bug-suspected
Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint CSOM
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Microsoft.SharePointOnline.CSOM: 16.1.24322.12000
Describe the bug / error
Special characters
#
and%
are supported in paths and file/folder names for some time:Supporting % and # in files and folders with the ResourcePath API
While this page does not mention
Document Sets
, you can use standard SharePoint UI to create new document set containing both of these characters:However, if you try to create new document set using CSOM, results are inconsistent:
#
is used, error message "File Not Found." is returned%
is used which is followed by some numeric value, it will be URL-decoded into another character%
is used and it cannot be URL-decoded, document set is created with correct nameSteps to reproduce
Document Set
content type to itExpected behavior
It is expected for CSOM to work correctly and create document sets with provided names.
Additional note 1: it seems JSOM partially works with
#
- error message is not return, however name is changed so that only part of provided value remains (Test 1#23
becomesTest 1
).Additional note 2: while standard UI is able to create document set with
#
, most likely it creates folder without it and renames afterwards; and if that folder already exists - it throws an error:The text was updated successfully, but these errors were encountered: