You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user decrypts a PostGuard-encrypted email for the first time (no cached JWT), the decrypted content is shown in the taskpane sidebar rather than replacing the email body in the reading pane. On subsequent opens the OnMessageRead launch event auto-decrypts with the cached JWT and replaces the body inline via event.completed({ emailBody }), which is the ideal experience.
Why this happens
The event.completed({ emailBody }) API (Mailbox 1.15) that replaces the displayed email body is only available inside launch event handlers. There is no equivalent API for taskpanes in read mode — body.setAsync() only works in compose mode.
The taskpane is needed because PostGuard requires interactive Yivi QR-code authentication when there is no cached JWT, which cannot run inside a launch event (no UI).
Approaches explored
displayMessageForm(itemId): After auth, reopen the message in a new inspector window so the launch event fires with the now-cached JWT. Problem: the pinned taskpane follows into the new window, giving a poor experience.
body.setAsync() from taskpane: Not available in read mode.
EWS / Graph API to permanently replace message: Would modify the stored message, which defeats the purpose of encryption at rest. Also has permission/availability issues in launch events.
Current behavior
First open (no cached JWT): taskpane shows decrypt button → Yivi QR auth → decrypted content displayed in the taskpane sidebar
Subsequent opens (cached JWT): launch event auto-decrypts → body replaced inline in the reading pane via event.completed({ emailBody })
Desired behavior
Both first-time and subsequent decryptions should replace the email body inline in the reading pane.
Possible future solutions
Microsoft may add a read-mode body replacement API for taskpanes (e.g. display.body.setAsync())
A shared runtime between taskpane and launch event might allow re-triggering the launch event programmatically after caching the JWT
If displayMessageForm could open without carrying over the pinned taskpane, that approach would work
Reference
Microsoft encrypt/decrypt sample — uses event.completed({ emailBody }) exclusively (no taskpane at all, no interactive auth needed)
event.completed({ emailBody }) docs: requires Mailbox requirement set 1.15
Problem
When a user decrypts a PostGuard-encrypted email for the first time (no cached JWT), the decrypted content is shown in the taskpane sidebar rather than replacing the email body in the reading pane. On subsequent opens the
OnMessageReadlaunch event auto-decrypts with the cached JWT and replaces the body inline viaevent.completed({ emailBody }), which is the ideal experience.Why this happens
The
event.completed({ emailBody })API (Mailbox 1.15) that replaces the displayed email body is only available inside launch event handlers. There is no equivalent API for taskpanes in read mode —body.setAsync()only works in compose mode.The taskpane is needed because PostGuard requires interactive Yivi QR-code authentication when there is no cached JWT, which cannot run inside a launch event (no UI).
Approaches explored
displayMessageForm(itemId): After auth, reopen the message in a new inspector window so the launch event fires with the now-cached JWT. Problem: the pinned taskpane follows into the new window, giving a poor experience.body.setAsync()from taskpane: Not available in read mode.Current behavior
event.completed({ emailBody })Desired behavior
Both first-time and subsequent decryptions should replace the email body inline in the reading pane.
Possible future solutions
display.body.setAsync())displayMessageFormcould open without carrying over the pinned taskpane, that approach would workReference
event.completed({ emailBody })exclusively (no taskpane at all, no interactive auth needed)event.completed({ emailBody })docs: requires Mailbox requirement set 1.15