OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
671 stars 96 forks source link

Missing Importance and Sensitivity as well as Options (Delivery/Read receipts) etc from the Office.MessageCompose interface #2111

Closed gitcnd closed 3 years ago

gitcnd commented 3 years ago

None of the properties or methods listed here:- https://docs.microsoft.com/en-us/javascript/api/outlook/office.messagecompose?view=outlook-js-preview give access to the user-chosen properties:-

Settings: Importance and Sensitivity Voting and Tracking Options: Delivery-receipts and read receipts Security: Encryption, digital signing, and labels Delivery options: reply-to email address, send-delay and expires-after info and Categories

Screen Shot 2021-09-11 at 10 52 50 am

Developers need to know the options their users have selected in order to accurately process their messages for them in our MessageComposeCommandSurface buttons and taskpane add-ins.

Expected behavior

All properties of the email being composed should be available to our Add-ins

Current behavior

Only a restricted subset exists.

Steps to reproduce

  1. install script lab (suggest)
  2. compose an email, turn on delivery and read receipts, set the importance and sensitivity
  3. note that there's no way to query and of the step-2 settings from the add-in

Context

I'm trying to assist users when composing their emails - but without knowing the complete details of their email, my add-in is unable to complete their task for them accurately (their selections get lost)

gitcnd commented 3 years ago

Would it make sense (and will it store those properties) for my add-in to save their email as a draft, and would I then be able to use Microsoft Graph to query those properties ? e.g. https://docs.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.item.importance?view=exchange-ews-api

exextoc commented 3 years ago

@gitcnd Thanks for reporting this.

With the existing Graph API, we can infer the importance and receipt status. Kindly refer:https://docs.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0

And, currently, Outlook message sensitivity property (Normal, Personal, Private, Confidential, etc.) is not exposed via the Graph API queries.

If you need this property and wish to file a feature request, please use the below link: https://aka.ms/M365dev-suggestions

Until the feature is available, we can use "SingleValueExtendedProperties" to get the sensitivity of the message.

Kindly check https://docs.microsoft.com/en-us/graph/api/singlevaluelegacyextendedproperty-get?view=graph-rest-1.0&tabs=http and this link has the values of sensitivity associated https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcmsg/4c5f91f9-e25c-47bd-901f-71e0610d6346

Example: GET https://graph.microsoft.com/v1.0/me/messages/{id}?$expand=singleValueExtendedProperties($filter=id eq 'Integer 0x0036') will give the sensitivity of the message under "SingleValueExtendedProperties".