Skip to content

Outlook add-in does not auto-add signatures and logs "SIGNATURE_HOSTS_AND_PLATFORMS does not include ..." #136

@GruberMarkus

Description

@GruberMarkus

Issue happens in the latest release

  • I confirm that the issue happens in the latest release of Set-OutlookSignatures

Previously solved issues and documentation

  • I have searched through issues, discussions and documentation, but have not found an answer to my issue

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

Issue

The Outlook add-in will not automatically add signatures to emails and appointments. In the log output you see

Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS:
Set-OutlookSignatures: APPOINTMENT_HOSTS_AND_PLATFORMS:

instead of (default values, your values may be different)

Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS: outlookandroid_on_android,outlookios_on_ios
Set-OutlookSignatures: APPOINTMENT_HOSTS_AND_PLATFORMS: newoutlookwindows_on_officeonline,outlook_on_mac,outlookwebapp_on_officeonline

.

In consequence, this leads to

Set-OutlookSignatures: SIGNATURE_HOSTS_AND_PLATFORMS does not include <your host and platform>

.

Reason

This happens when you use PowerShell 5.1 to run 'run_before_deployment.ps1'. PowerShell 5.1 has a bug in ConvertTo-Json, which does not correctly convert arrays to JSON when they are passed via the InputObject parameter instead of the pipeline.

Solutions and workaround

There are two solutions available, both being described below.

Whichever solution you choose: You need to increase the version number of the Outlook add-in and re-deploy it so that your Outlook clients can pick up the new code.
For details about this, read the chapters 'Configuration and deployment to the web server' and 'Deployment to mailboxes' of the Outlook add-in documentation.

Solution B will be part of the next version, which does not yet have a release date. This issue will stay open until a version containing the fix is available.

Solution A: Use PowerShell 7 to run 'run_before_deployment.ps1'

Run the 'run_before_deployment.ps1' script with the current release of PowerShell 7 instead of PowerShell 5.1.

The current release of PowerShell 7 correctly converts arrays to JSON, no matter if passed via the pipeline or the InputObject parameter.

Solution B: Modify the 'run_before_deployment.ps1' script

If you want to keep using PowerShell 5.1 to run the 'run_before_deployment.ps1' script, change the line

$ProductionValues[$_] = (ConvertTo-Json -InputObject $ProductionValues[$_] -Compress).ToLower() -replace '"', '\"'

to

$ProductionValues[$_] = ($ProductionValues[$_] | ConvertTo-Json -Compress).ToLower() -replace '"', '\"'

Partial workaround for end users

On Outlook editions supporting taskpanes (so not on Outlook for iOS and Outlook for Android when writing mails), you can open the taskpance, check 'Ignore host and platform' and click on 'Set selected signature'.

This partial workaround is not recommended as it does not work on mobile platforms, requires communication to end users and manual effort for each new mail written. It is only listed here for completeness.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdependenciesPull requests that update a dependency file

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions