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.