Table of Contents

Prerequisites

Add FortiGate SSL VPN in Entra ID

Configure Basic SAML Settings in Entra ID

SAML Claim Mapping (Azure → FortiGate)

FortiGate is strict about SAML attribute names. The attributes defined in Azure must match exactly the attributes that FortiGate expects under:

set user-name
set group-name

Required Claims in Entra ID

Under Single Sign-On → User Attributes & Claims:

Add this claim (FortiGate requires the literal name)

Edit the existing “groups” claim so that it sends Group Object IDs (not display names).

This ensures that the SAML token contains:

username = user@domain
group    = <Azure AD Group Object ID>

Why this matters

FortiGate matches SAML attributes using the `user-name` and `group-name` fields in the IdP configuration:

set user-name "username"
set group-name "group"

If the Azure claim sends the wrong attribute or the Object ID doesn't match exactly, FortiGate will not associate the session with the group, and the VPN connection will be denied.

https://learn.microsoft.com/en-us/entra/identity/saas-apps/fortigate-ssl-vpn-tutorial

Create Test User and Security Group in Entra ID

Upload Certificate to FortiGate

Configure FortiGate SAML Settings (CLI)

config user saml
  edit azure
    set cert "<FortiGate VPN Server Certificate Name>"
    set entity-id "https://vpn.my.org:10443/remote/saml/metadata"
    set single-sign-on-url "https://vpn.my.org:10443/remote/saml/login"
    set single-logout-url "https://vpn.my.org:10443/remote/saml/logout"

    set idp-entity-id <Azure AD Identifier>
    set idp-single-sign-on-url <Azure Login URL>
    set idp-single-logout-url <Azure Logout URL>
    set idp-cert <Azure SAML Base64 Certificate Name>

    set user-name username
    set group-name group
  next
end

Configure FortiGate User Group

config user group
  edit AAD-FortiVPN
    set member azure
    config match
      edit 1
        set server-name azure
        set group-name 343744cd---GROUP-ID---67bb7e68
      next
    end
  next
end

Configure SSL VPN Portals and Firewall Policy

Optional: Multiple SSL VPN Realms

FortiClient Setup (Optional)

Testing and Validation

diagnose debug application sslvpn -1
diagnose debug application samld -1
diagnose debug console timestamp enable
diagnose debug enable

To stop debugging:

diagnose debug reset
diagnose debug disable

FortiClient connection stages:

For example, if it fails at 40%, SAML assertion is not validated.

Troubleshooting Notes

References