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
687 stars 94 forks source link

Identify the encryption status of an Outlook email programmatically using the Office API or alternative methods #5013

Closed AacharanJain closed 1 week ago

AacharanJain commented 2 weeks ago

Hello,

We are developing an Outlook add-in using React and need to determine if the currently opened email is encrypted. We want to identify the following encryption types:

Our use case requires certain functionalities in our add-in to be restricted based on whether the email is marked as "Confidential" or "Do Not Forward." Adding a screenshot to show where the encryption type can be viewed when sending an email via Outlook:

image

We have attempted to use both the Office.js API and Graph API to retrieve any attributes that would help us identify the email's encryption status. However, we haven't been able to find a way to access this information.

We attempted the following approach, but it doesn’t meet our requirements:

Office.context.mailbox.item.sensitivity: This property associates the sensitivity level of an email, such as Normal, Personal, Private, or Confidential. A screenshot is attached for reference, showing where these options appear in Outlook:

image

Could anyone provide guidance or suggestions on how to fetch the encryption status ("Encrypt Only", "Confidential", "Highly Confidential", "Do Not Forward") of an email using the Office.js API or Graph API? Any insights would be greatly appreciated!

Thank you in advance for your help!

DivyaPatidar commented 2 weeks ago

@AacharanJain At present, the feature to retrieve the email's encryption status is not available as part of Office.js API set. This is will considered as a new feature request. We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process.

For checking availability of such API on MS API Graph, please explore options available at Microsoft Graph Dev Center | APIs and app development