Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving the ChangeKey after calling saveAsync fails in Classic Outlook for Windows #5252

Open
alex-swiftify opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback

Comments

@alex-swiftify
Copy link

Our office.js add-in is adding a button to the Compose Mail window, which is supposed to send the composed email and close the window (as well as call into our API).
The same code that works perfectly in new Outlook for Windows fails to retrieve the ChangeKey in classic Outlook for Windows, and succeeds only after several retries (in approximately 5 to 30 seconds).

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: PC desktop
  • Host [Excel, Word, PowerPoint, etc.]: Outlook
  • Office version number: Microsoft® Outlook® for Microsoft 365 MSO (Version 2410 Build 16.0.18129.20158) 64-bit
  • Operating System: Windows 11 Version 23H2 (OS Build 22631.4602)
  • Browser (if using Office on the web): n/a

Expected behavior

Retrieving the ChangeKey via GetItem EWS function should succeed immediately after calling saveAsync() for the newly created email.

Current behavior

Retrieving the ChangeKey immediately after calling saveAsync() fails. Given this log, it success only after the 5th retry after the accumulated interval of 1+2+4+8+16 = 31 seconds.

Steps to reproduce

  1. Add a new button and its handler to the MessageComposeCommandSurface.
  2. When the button is clicked, first call saveAsync() with the current mail item.
  3. Call the GetItem EWS function passing the item ID returned from the saveAsync method.

Link to live example(s)

https://gist.github.com/alex-swiftify/073fc87f42161a1199582f52c05c3c9c

Context

We need a stable way to programmatically send the new composed email when pressing our toolbar button.

Useful logs

https://take.ms/BJNwq

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jan 8, 2025
@exextoc exextoc added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: Outlook Issue related to Outlook add-ins and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jan 8, 2025
@exextoc exextoc self-assigned this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Outlook Issue related to Outlook add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback
Projects
None yet
Development

No branches or pull requests

2 participants