A family of Microsoft products that enable users to capture, organize, and reuse notes electronically.
Hello stemarcoh,
Thank you for taking the time to explain the behavior in detail.
I reviewed the available public information, but I could not find documentation that specifically confirms whether this behavior is expected by design. In particular, the current documentation does not clearly state whether OneNote should preserve the local style exactly as submitted or remove it when the same formatting is already defined elsewhere.
Since this behavior involves how OneNote processes the page content internally after UpdatePageContent is called, confirming the exact reason would require knowledge and diagnostic capabilities beyond what is available through the community forum. I would therefore recommend opening a support request with Microsoft through the Microsoft 365 admin center: https://admin.cloud.microsoft
Once signed in, your Microsoft 365 administrator can select Help & support, describe the issue, and choose Contact support. Microsoft documents the support-request process here: Get support - Microsoft 365 admin | Microsoft Learn
Through a formal support request, the case can be reviewed by an engineer with the appropriate developer and product expertise. The support team can also determine whether any additional diagnostic or backend information is available to explain how OneNote handles the style attribute in this scenario.
When submitting the request, I recommend including the OneNote version and build, a minimal XML example before calling UpdatePageContent, and the XML returned afterward by GetPageContent. This will help the assigned engineer understand and reproduce the behavior more efficiently.
I hope this points you toward the right support channel for a more definitive answer. If you receive any additional findings from Microsoft Support, please feel free to update this thread, as the information may also be helpful to others encountering the same behavior.
Kind regards,
Note: Please follow the steps in documentation to enable e-mail notifications if you want to receive the related email notification for this thread.