Description | This article describes how to set up client-to-site IPsec VPN configuration with SAML authentication through the Azure portal. |
Scope | FortiGate v7.2.0 and later |
Solution |
Inside Enterprise Applications on the Azure portal, follow the steps below:
Note: Do not be misled by the name of the application, 'FortiGate SSL VPN' - it is applicable for IPsec remote access VPN as well.
Do not forget to add the VPN port to the pattern. For example: http://vpnnamehere.com:10443/remote/saml/metadata/
Do the same to the reply URL, Sign-on URL, and logout URL. For these three fields, it is not necessary to change https to HTTP and add a / at the end of the URL.
The Attribute and Claim configuration need to be like the ones in the following image:
Come back to the single sign-on configuration.
It is possible to rename this certificate in the CLI to make it easier to identify it through the following command:
config vpn certificate remote
Use the remote server, the single sign-on server that was created before, and choose the option any for the groups.
Add the following commands inside the phase1-interface configuration:
config vpn ipsec phase1-interface edit "IPSEC_SAML_HOME" set eap enable
If IPsec is configured on the loopback interface, then the IKE SAML server must also be enabled on the loopback. If the user is internal to the FortiGate and IPsec is configured on the external interface, the command should be enabled on both the internal and external interfaces.
Configure the user group either in the Phase 1 VPN settings (authusrgrp) or in the firewall policy, but not both.
diagnose debug reset diagnose debug console timestamp enable diagnose vpn ike log filter rem-addr4 x.x.x.x <----- x.x.x.x is client public IP. diagnose debug app authd 255 diagnose debug application samld -1 diagnose debug app fnbamd -1 diagnose debug application eap_proxy -1 diagnose debug application ike -1 diagnose debug enable
To stop debugging: diagnose debug disable
Note: FortiClient's free version on macOS does not support IKEv2. This will require an EMS license for v7.2.3 and above.
For more information, see Technical Tip: FortiClient Mac does not support IKE v2 in IPsec.
FortiClient v7.2.4 or later supports SAML with Dial-up IPsec VPN only with IKEv2.
Dial-up IPsec with SAML using an external browser for authentication is supported starting from FortiOS v7.6.1, FortiClient versions v7.2.5 and v7.4.1 for Mac and Windows, and FortiClient v7.4.3 for Linux.
Remote Gateway in the FortiClient VPN configuration must be FQDN or IP address only and should not include port or '/remote/saml/login'.
Related documents: IPsec VPN SAML-based authentication Troubleshooting Tip: Authentication Keepalive causing IPSEC VPN with SAML Authentication to fail Technical Tip: How to use multiple groups with EAP for IKEv2 (SAML/RADIUS/local) |
Very useful and well explained!!! Thanks!
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.