Forum Discussion
New Outlook Office.js Html body insert fails with error 9011 HtmlSanitizationFailure
Your add-in inserts plain text, but every Body API rejects even minimal HTML in New Outlook with error 9011. Microsoft’s Office.Body documentation supports HTML insertion when getTypeAsync reports HTML; its documented errors do not list 9011 or HtmlSanitizationFailure. This looks like a New Outlook regression or service defect, not an expected requirement to abandon HTML. Log Outlook build, Mailbox requirement-set support, body type, and complete asyncResult.error. Retest in a new message, signatures disabled, using only a small bold fragment—no full document, style block, script, SVG, or remote content. Run the same add-in against Outlook on the web and classic Outlook with the same mailbox. If only New Outlook fails, retain text coercion as a temporary fallback and submit the minimal reproduction through New Outlook feedback and Microsoft support. There is no documented alternative HTML API that guarantees bypassing the sanitizer.