Office.context.mailbox.item.saveAsync fails during OnSend function on Outlook for web/New Outlook

Victor Calarasu 15 Reputation points
2025-02-06T07:33:50.1933333+00:00

I have an Add-in created for Outlook Web which adds headers to emails in order to send them securely. It operated both through Task Pane and on the OnSend functionality of Outlook Web.

When pressing the Outlook Send Button (OnSend function), what I want to do is get the draft ID in order to set some headers and send the item using Microsoft Graph API.

When pressing the Outlook Send Button the Office.context.mailbox.item.saveAsync() function fails with :

error: OSF_DDA_Error code: 9021 message: "Connection error occurred while trying to save the item on the server." name: "SaveError"

If I save the draft manually, or it gets automatically saved by Outlook or do the same flow using the Task Pane (opening the add-in through the Apps button), it works correctly.

It is only happening on new emails.

this wasn't happening before and we didn't do any change in this part of the code. It started happening since the 31 January 2025 (I saw that there was an update of the 30th of January). could this be an issue with outlook/office-js, since this wasn't happening before this point of time and we didn't do any changes in the code?

Outlook
Outlook
A family of Microsoft email and calendar products.
4,461 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,244 questions
{count} vote

1 answer

Sort by: Most helpful
  1. User_mcrd 0 Reputation points
    2025-02-07T09:44:08.8+00:00

    Same issue over here, with huge impact! Is there a solution available yet?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.