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

Outlook, setSignatureAsync method adds a new signature but does not replace the existing one #5483

Closed
DmitryKostochko opened this issue Mar 13, 2025 · 4 comments
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info Similar-Issue Status: no recent activity Issue or PR is stale (no recent activity)

Comments

@DmitryKostochko
Copy link

Provide required information needed to triage your issue

In an Outlook add-in for Compose mode, we use the setSignatureAsync method to add a new signature, or replace the existing one. In practice, it adds a new signature to an email draft without removing the existing one, if the draft already contains a signature created with the same method but in another Outlook platform, e.g. Outlook Online.

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: PC desktop, Mac, Office on the web
  • Host: Outlook
  • Office version number:
  • Operating System: Windows & MacOS
  • Browser (if using Office on the web): Google Chrome

Expected behavior

According to documentation, the setSignatureAsync method shall replace an existing signature.
https://learn.microsoft.com/en-us/javascript/api/outlook/office.body?view=outlook-js-preview#outlook-office-body-setsignatureasync-member(1)

Current behavior

The setSignatureAsync method adds signatures, but not replaces the existing one.

Steps to reproduce

  1. Open Outlook Online, create a new email, open the add-in pane and execute the following code:
    Office.context.mailbox.item.body.setSignatureAsync("<div>My signature " + (new Date().toString()) + "</div>", { coercionType: Office.CoercionType.Html }, () => { });

  2. Make sure the draft with the signature is saved, and then close the draft.

  3. Start classic Outlook, open that draft email, open the add-in pane and execute the code above. As you can see, now you have 2 signatures. Save draft, close it.

  4. Start the new Outlook, execute the code above for the same draft. Now you have 3 signatures, please see my screenshot below.

Provide additional details

  1. The steps above are taken on Windows, but you can do the same on Mac using Outlook Online and Outlook for Mac.

Useful logs

  • [ X ] Screenshots

Image

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Mar 13, 2025
Copy link

@exextoc exextoc added Area: Outlook Issue related to Outlook add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Mar 13, 2025
@exextoc exextoc self-assigned this Mar 13, 2025
@arpitsangwanmsft
Copy link

Hey @DmitryKostochko!
Native signatures are also appended and not replaced across clients (web/mac/classic), so this behavior is not governed/controlled by the setSignatureAsync office.js API. Irrespective of whether the setSignatureAsync api is used or not, same behavior can be observed.

This forum is limited to office-js related issues. For Outlook specific queries and support please post your questions here- https://support.microsoft.com/home/contact.

Meanwhile for identifying if signature has been appended across clients please explore RoamingSettings if it suits your use case.

Thanks

@arpitsangwanmsft arpitsangwanmsft 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 Mar 18, 2025
Copy link
Contributor

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label Mar 23, 2025
Copy link
Contributor

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

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 Similar-Issue Status: no recent activity Issue or PR is stale (no recent activity)
Projects
None yet
Development

No branches or pull requests

3 participants