I developed an Outlook Add-In that represents an html page with some JavaScript.
When I try to open the Add-in reading/writing an encrypted mail on our company's tenant, an error message appears.
"You cannot perform this action. Permission to this message is restricted"
The same Add-In works on my test tenant with encrypted mails.
I assume it's because of different Outlook versions (version 2002 on my business tenant vs version 2008 on my test tenant) or some special settings in the tenant.
This post Can't access email with digital signature in outlook addin? Microsoft explained that SMIME signed emails are supported but encrypted are not. But the post is almost 3 years old and as I said, it works with my test tenant.
For Outlook Win32, add-ins on encrypted mails are only supported on builds >= 13229.10000, see here for reference:https://learn.microsoft.com/en-us/office/dev/add-ins/reference/objectmodel/preview-requirement-set/outlook-requirement-set-preview#add-in-activation-on-items-protected-by-information-rights-management-irm
Related
I have a SendEmail method developed with System.Net.Mail that works fine. Calling it from my VSTO Outlook Addin, I get an error: A call to SSPI failed. The inner error contains "Function not supported".
I tried to send the same email from a regular c# environment (that worked), and from my Outlook VSTO add-in that did not.
Is there a reason why the smtp email cannot be sent from the Addin?
Solution (thanks to Eugene), I added
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
to the SendEmail method and now the Emails are sent.
Given the nature of the exception, it seems like you're more likely to have an email server problem than anything else.
Also it makes sense to check what TLS version is used in the code. SSPI stands for Security Support Provider Interface, so it makes sense try to find the difference between two .net applications. TLS is a starting point, see How to enable TLS 1.2 for more information.
You may consider your Outlook VSTO add-in as a regular .net application. There are minor differences like availability of configurations files and etc. If you need to put something into a config file you need to create a config for the host application which is Outlook in your case. Keep that in mind when developing VSTO add-ins.
I am working on an Outlook addin to make sure confidential information is not leaked using mail.
Using the on-send feature using ItemSend, we were able to get the email fields and block the sendmail, if required
https://github.com/OfficeDev/Outlook-Add-in-On-Send/tree/master/outlook-add-in-on-send
But there is an use case
User composes the mail and saves it to draft (without clicking on Send)
In outlook on web, composing a mail saves to draft automatically.
How can the add-in get a callback when draft is synced to Outlook server ?
How can the add-in get a callback when draft is synced to Outlook server ?
There is no such callback available for web add-ins. You may post a feature request or suggest a feature on the Tech Community site where community members get to share ideas on ways MS can make Microsoft Graph and Office Platform better by sharing feature requests and ideas.
Nothing like that for the JS-based addins.
For the COM addins, OOM exposes MailItem.Write event - your event handler can cancel the operation.
I'm developing a outlook addin, which access metadata of an email. But i have the problem, that the addin is not shown in the outlook web app, when i select an email with an digital signature. When I select the same email in the outlook rich client then iget the error, that the operation cannot be performed, because the permissions for the message are restricted.
I set up the permission in the addin manifest to "ReadWriteMailbox".
Can someone help me, how i can access an email with digital signature in the outlook addin?
Outlook Add-ins overview listed Mailbox items available to add-ins. The following is the quote from the document:
Outlook does not activate add-ins if the current message item, in a compose or read form, is one of the following:
Protected by Information Rights Management (IRM), in S/MIME format or encrypted in other ways for protection. A digitally signed message is an example since digital signing relies on one of these mechanisms.
To answer on your question ... you cannot access e-mail with digital signature from Outlook Office.js add-in.
EDIT:
Per Microsoft team comment, digitally sign messages are available to add-ons. I have verified with signed SMIME message, add-ons are active and functionality is fine. Waiting for documentation update.
In Outlook 2016 (Outlook 2016 MSO 16.0.4266.1001 64 bit) , when S/Mime user accepts a calendar invitation sent by a non s-mime user, following error is displayed.
"Microsoft Outlook cannot sign or encrypt this message because there are no certificates which can be used to send from the email address . Either get a new digital ID to use with this account, or use the accounts button to send the message using an account that you have certificates for."
This error is not seen with Outlook 2013.
These 3 security properties are checked on opening the event (which are unchecked in Outlook 2013)
Encrypt message contents and attachments.
Add digital signature to outgoing messages.
Request S/Mime receipt for this message.
What mapi properties are used to check/uncheck these security properties?
Recently I tried the outlook web app add-in in visual studio 2015. It's cool one It purely based on the Java script commands. My ultimate motivation i need add one button in add-in if user click that button I need the save the mail my database and send that mail to the recipient.
I am able to fetch the data and saving to my database is successful but unable to trigger send option in add-in. There is any java script command available. Actually I have achieved the same scenario in outlook windows application.
You should be able to send the email using the new Outlook REST APIs specifically we have an api for sending emails. In addition, to close the compose form, you can use the Office.context.mailbox.item.close() To close the mail or calendar item in compose.
You should try to send the email from server side logic using EWS (exchange web services) see this post or you can authenticate with Azure Active Directory and invoke the outlook REST API