0
votes

When we try to create/open a new mail in outlook from our C#/VB.Net WinForm App via COM on a WINDOWS TERMINAL SERVER we get an outlook security popup saying "A program is trying to access ..."

However, on a PC there is no such popup as long as updated anti-virus software is running. So the problem only occurs when running the app in a terminal server session.

I configured a GPO in the domain to trust the dlls, which are interacting with outlook via COM:

User Configuration\Administrative Templates\Microsoft Outlook 2016\Security\Security Form Settings\Programmatic Security\Trusted Add-ins

There I added the hashes for each dll created according to the description in the document "Group policy overview" (link on the bottom of that site) (see section "Manage trusted add-ins for Outlook 2007" in that word document)

I also set the AdminSecurityMode=3 in the registry so outlook security is taking the GPOs to validate security.

On the Terminal Server session, I successfully verified that the group policies are loaded/applied (with cmd tool "rsop.msc") and the registry entry is there.

Nevertheless, the outlook security dialog still pops up for terminal service users.

We have WinServer 2019 and Outlook 2019.

1

1 Answers

0
votes

I'd recommend suppressing such security warnings programmatically, or just avoiding them by using a low-level API which doesn't trigger them:

  1. Use third-party components for suppressing Outlook security warnings. See Security Manager for Microsoft Outlook for more information.

  2. Use a low-level API instead of OOM - Extended MAPI which doesn't trigger such security prompts. Or any other third-party wrappers around that API, for example, Redemption.

  3. Develop a COM add-in that has access to the trusted Application object.

  4. Use group policy objects for setting up machines. To resolve this, please try to configure the corresponding registry entries:

HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Security

(12 is for Outlook 2007. Change it to 14 for Outlook 2010, 15 for Outlook 2013, 16 for Outlook 2016.)

For each user, create DWORDs here with the value "2" and names as follows:

PromptSimpleMAPISend
PromptSimpleMAPINameResolve
PromptSimpleMAPIOpenMessage