I've found a solution, I guess writing everything down helped to point me in the right direction. If anyone ever has the same problem, here's what I had to adjust.
- Disable the captive portal detection in your VPN profile XML if you don't need it (Preferences Part 1 in the Profile Editor):
<DisableCaptivePortalDetection UserControllable="true">true</DisableCaptivePortalDetection>
- The AutomaticVPNPolicy in the XML shouldn't prompt the user at any point (Preferences Part 2 in the Profile Editor):
<AutomaticVPNPolicy>true
<TrustedDNSDomains>corp.customer.com</TrustedDNSDomains>
<TrustedNetworkPolicy>Disconnect</TrustedNetworkPolicy>
<UntrustedNetworkPolicy>DoNothing</UntrustedNetworkPolicy>
<AlwaysOn>false
</AlwaysOn>
</AutomaticVPNPolicy>
- Be sure to disable all AnyConnect notifications on Windows and in the AnyConnect Client itself, we deploy a .ps1 script to change the settings.
# Define the path and property
$registryPath = "HKCU:\Software\Cisco\Cisco Secure Client"
$propertyName = "EnableStatusPopups"
$propertyValue = 0
$propertyType = "DWORD"
# Check if the path exists
if (-not (Test-Path $registryPath)) {
# Create the path
New-Item -Path $registryPath -Force
}
# Create or update the property
New-ItemProperty -Path $registryPath -Name $propertyName -Value $propertyValue -PropertyType $propertyType -Force
# Define the path and property
$registryPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Cisco.SecureClient"
$propertyName = "Enabled"
$propertyValue = 0
$propertyType = "DWORD"
# Check if the path exists
if (-not (Test-Path $registryPath)) {
# Create the path
New-Item -Path $registryPath -Force
}
# Create or update the property
New-ItemProperty -Path $registryPath -Name $propertyName -Value $propertyValue -PropertyType $propertyType -Force
Frustrating to deal with this for a paid enterprise software, but I guess we all have to. I couldn't find a solution in any forum, hopefully this will help someone else.