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

Office.context.mailbox.item.addFileAttachmentAsync() fails in Outlook Web on-prem (Exchange Server 2019 v15.2, build 1544.4) #4926

Open
GruberMarkus opened this issue Sep 25, 2024 · 5 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins

Comments

@GruberMarkus
Copy link

GruberMarkus commented Sep 25, 2024

Provide required information needed to triage your issue

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: Office on the web (on premises)
  • Host [Excel, Word, PowerPoint, etc.]: Outlook
  • Office version number: Outlok Web on Exchange Server 2019 (version 15.2, build 1544.4)
  • Operating System: Multiple (Windows 11 latest, Ubuntu 22.04, macOs Sonoma latest)
  • Browser (if using Office on the web): Edge (latest version), Firefox (latest version)

Expected behavior

Office.context.mailbox.item.addFileAttachmentAsync() should add an attachment.

Current behavior

When calling Office.context.mailbox.item.addFileAttachmentAsync(), the folloing error is returned: {"name":"Host Error","message":"The operation is not supported.","code":5000}

Steps to reproduce

  1. Create a taskpane add-in for Outlook
  2. Add a file using Office.context.mailbox.item.addFileAttachmentAsync(<public URL to image file>, "my file name.jpg", { isInline: false})
  3. Deploy add-in
  4. Run in Outlook Web on premises

Link to live example(s)

Not available

Provide additional details

The very same code works fine in Outlook Web running on Exchange Online, as well as in Classic Outlook on Windows. Other platforms have not been tested.

Please let me know how to avoid this error. addFileAttachementFromBase64Asynch() is not an option, as it is not support in Outlook Web on premises.

Edit: Replace Office.context.mailbox.item.addFileAttachmentFromBase64Async() with Office.context.mailbox.item.addFileAttachmentAsync() in sample code and error description.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Sep 25, 2024
@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 Sep 25, 2024
@exextoc exextoc self-assigned this Sep 25, 2024
@GruberMarkus GruberMarkus changed the title Office.context.mailbox.item.addFileAttachmentAsync() fails in Outlook Web on-prem (Exchange Server 2019 Office.context.mailbox.item.addFileAttachmentAsync() fails in Outlook Web on-prem (Exchange Server 2019 v15.2, build 1544.4) Sep 25, 2024
@Oleg-O
Copy link
Collaborator

Oleg-O commented Sep 25, 2024

This API was added in requirement set 1.8; but per the support table on this page, Outlook Web on-premises supports up to and including 1.6 only, so this is expected.

@GruberMarkus
Copy link
Author

GruberMarkus commented Sep 26, 2024

According to the documentation of the method at https://learn.microsoft.com/en-us/javascript/api/outlook/office.messagecompose?view=outlook-js-preview&preserve-view=true#outlook-office-messagecompose-addfileattachmentasync-member(1), the required API is 1.1.

From what I see in the API 1.8 release notes, addFileAttachmentFromBase64Async has been introduced with 1.8, but not addFileAttachmentAsync (without Base64).

I mixed up these two myself in the bug description. Sorry for that.

The problem is with Office.context.mailbox.item.addFileAttachmentAsync().

Could you please have another look at this topic?

Edit: I replaced Office.context.mailbox.item.addFileAttachmentFromBase64Async() with Office.context.mailbox.item.addFileAttachmentAsync() in sample code and error description of the opening comment.

@Swathy-Mothilal
Copy link

Hi @GruberMarkus, Could you please let me know if this was functioning as expected previously and since when are you experiencing the issue?

@Swathy-Mothilal Swathy-Mothilal added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Sep 27, 2024
@GruberMarkus
Copy link
Author

No, I can't. I am only using Office.context.mailbox.item.addFileAttachmentAsync() since a few days.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: author feedback Waiting for author (creator) of Issue to provide more info labels Sep 27, 2024
@Swathy-Mothilal
Copy link

@GruberMarkus Thanks for the confirmation. We are able to repro the bug, and have put it in our backlog. Unfortunately, we don't have any timelines to share.

Internal tracking id: 4944585

@Swathy-Mothilal Swathy-Mothilal removed the Needs: attention 👋 Waiting on Microsoft to provide feedback label Sep 27, 2024
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
Projects
None yet
Development

No branches or pull requests

4 participants