How to Check if an Outlook Email is 'Confidential', 'Encrypt Only', or 'Do Not Forward' in an Outlook Add-In using Office.js/Graph API or Other Methods?

Aacharan Jain 5 Reputation points
2024-10-15T07:56:06.86+00:00

I'm currently developing an Outlook add-in using React, and I need to check whether the currently opened email is marked as confidential or not. Specifically, I need to identify if the email has any encryption types such as:

  • "Encrypt Only"
  • "Highly Confidential"
  • "Confidential"
  • "Do Not Forward"

We have a use case where certain functionality in our add-in must be restricted based on whether the email is marked as "Confidential" or "Do Not Forward".

I've tried the following approaches, but I haven't been able to retrieve any attributes that help identify the email's encryption status.

Office.context.mailbox.item.sensitivity: This always returns undefined for all types of emails.

Office.context.mailbox.item.itemClass: This also returns the same value (IPM.Note) for every type of email, regardless of its encryption or sensitivity.

We have also attached a screenshot below that shows the list of attributes we are receiving from the Office API.

email_issue

Has anyone faced similar issues or successfully retrieved this information using the Office.js API or Graph API? Any guidance or suggestions on how to fetch the encryption status or sensitivity level of an email would be greatly appreciated!

Microsoft 365 and Office | Development | Other
Outlook | Windows | Classic Outlook for Windows | For business
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
{count} vote

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.