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

GetAttachmentsAsync does not return the list of attachments in Outlook Online #4406

Open
barisbikmaz opened this issue Apr 26, 2024 · 3 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info

Comments

@barisbikmaz
Copy link

Provide required information needed to triage your issue

When using the method getAttachmentsAsync in Outlook Online, the list of the attached files are not listed. You always get an empty array. On Outlook for Windows the returned list is correct.

Your Environment

  • Platform: Office on the web
  • Host: Outlook
  • Operating System: Windows
  • Browser: Edge

Expected behavior

Office.context.mailbox.item.getAttachmentsAsync should return the list of attached files, also the inline ones.

Current behavior

Outlook Online
An empty array is returned.
image

Same call in Outlook for Windows
image

Steps to reproduce

  1. Open Outlook Online
  2. Create a new mail
  3. Attach a file to the mail
  4. Open Script Lab
  5. call Office.context.mailbox.item.getAttachmentsAsync(console.log) in DevTools or ScriptLab

Context

I am working on a signature app which uses inline images.
When switching a signature, which has new images, I want to delete existing inline image attachments.
But currently I can't see which attachments are attached to the mail.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Apr 26, 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 Apr 30, 2024
@exextoc exextoc self-assigned this Apr 30, 2024
@neprasad-microsoft
Copy link

Hi @barisbikmaz
Can you tell us how you are attaching the file? If you are using an API please paste the API call here so that we can reproduce on our side.

@neprasad-microsoft neprasad-microsoft 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 May 1, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label May 5, 2024
@barisbikmaz
Copy link
Author

@neprasad-microsoft Was on vacation, could therefore not reply.

I open Outlook Online and run following code to add an inline attachment:

Office.context.mailbox.item.addFileAttachmentFromBase64Async('some-base64-image','myimage.png',{ isInline: true })

To be sure that the image is attached, I insert a signature referencing this image.

Office.context.mailbox.item.body.setSignatureAsync('Greetings<br/><img src="cid:myimage.png" />', { coercionType: 'html' });

This works. But when I run

Office.context.mailbox.item.getAttachmentsAsync(console.log)

it does not return the inline attachment.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Status: no recent activity Issue or PR is stale (no recent activity) Needs: author feedback Waiting for author (creator) of Issue to provide more info labels May 13, 2024
@mmanjaree-msft
Copy link

Thanks for reporting this issue. We have put this in our backlog but unfortunately we do not have any timelines to share at this point.
Internal tracking id: 276714

@exextoc exextoc 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 May 14, 2024
@exextoc exextoc reopened this May 14, 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 Needs: author feedback Waiting for author (creator) of Issue to provide more info
Projects
None yet
Development

No branches or pull requests

4 participants