Creating a Onenote notebook with special characters fails with SDK and Graph API, but succeeds from the Onedrive UI

Vinanth S Bharadwa 26 Reputation points
2023-02-16T05:41:16.7+00:00

User's image

I can create a notebook named Test#% from the Onedrive web, but when I try to do the same with API or SDK I see the calls failing.

User's image

Is this a known issue?

Are there any workarounds for this?

OneNote
OneNote
A family of Microsoft products that enable users to capture, organize, and reuse notes electronically.
177 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,269 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bhanu Kiran 3,526 Reputation points
    2023-02-16T05:48:55.64+00:00

    Hello @Vinanth S Bharadwa ,

    As per documentation, In the request body, supply a name for the notebook.

    Notebook names must be unique. The name cannot contain more than 128 characters or contain the following characters: ?*/:<>|'"

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".