Description
This article describes how to configure administrator login to FortiGate using the SAML standard for authentication and authorization.
SAML has been introduced as a new administrator authentication method in FortiOS v6.2. A FortiGate can act as an Identity Provider (IdP) for other FortiGates, or as a Service Provider (SP), using another IdP.
This article provides an example for basic integration with Microsoft Entra ID (formerly known as Azure Active Directory (AD)) acting as the IdP.
Scope
FortiGate.
Solution
Below is a list of terms used in FortiGate GUI, their equivalents in Azure, and the required SAML attributes:
|
FortiGate GUI |
Azure |
|
IdP entity ID |
Entra ID Identifier |
|
IdP single sign-on URL |
Login URL |
|
IdP single logout URL |
Logout URL |
|
SP entity ID |
Identifier (Entity ID) |
|
SP ACS (login) URL |
Reply URL (Assertion Consumer Service URL) |
|
SP SLS (logout) URL |
Logout URL |
|
SP portal URL |
Sign on URL |
The only mandatory attribute required to be sent in the SAML response is 'username', which is interpreted as the administrator’s username/account name.
Step-by-step guide:

CLI view for versions from FortiOS 6.2.x to 6.4.x:
config system saml
set status enable
set role service-provider
set default-login-page normal
set default-profile "super_admin" <----- Admin profile.
set binding-protocol redirect
set entity-id "http://10.5.146.110/metadata/"
set idp-entity-id "http://10.5.147.22/saml-idp/admin/metadata/"
set idp-single-sign-on-url "https://10.5.147.22/saml-idp/admin/login/"
set idp-single-logout-url "https://10.5.147.22/saml-idp/admin/logout/"
set idp-cert "REMOTE_Cert_1"
set server-address "10.5.146.110" <----- FortiGate interface IP.
end
CLI view for version FortiOS 7.0.x and above :
config user saml
edit "azuretest"
set cert "Fortinet_Factory"
set entity-id "http://10.5.146.110/remote/saml/metadata/"
set single-sign-on-url "https://10.5.146.110/remote/saml/?acs"
set single-logout-url "https://10.5.146.110/remote/saml/?sls"
set idp-entity-id "https://10.5.146.110:10443/remote/saml/metadata"
set idp-single-sign-on-url "https://10.5.146.110:10443/remote/saml/login"
set idp-single-logout-url "https://10.5.146.110:10443/remote/saml/logout"
set idp-cert "REMOTE_Cert_1"
set user-name "username"
set group-name "group"
set digest-method sha1
next
end
Optional SP AuthnRequest/Assertion signing:
If IdP requires signed messages, enable signing via CLI:
config system saml
set sign-authn enable
set sign-assertion enable
end
Note:
Only enable this when enforced by the IdP.


Configure the auth-ike-saml-port in the FortiGate as shown below:
config system global
set auth-ike-saml-port 9443
end
Note: The default TCP port for IKE SAML is 1001.





10. Fix: Configure the remote authentication timeout value as needed:
config system global
set remoteauthtimeout 120
end
An invalid HTTP request error occurs when a misconfiguration or typo error occurs in the login or logout URL. Double-check the step-7 configuration and make sure the URLs match exactly on both sides. A sample configuration from the CLI looks like the following config user saml.
config user saml
edit "ssl-azure-saml"
set entity-id "https://<test-domain>:65443/remote/saml/metadata"
set single-sign-on-url "https://<test-domain>:65443/remote/saml/login"
set single-logout-url "https://<test-domain>:65443/remote/logout"
Related documents:
SAML overview and configuration (in the context of authentication between FortiGates in Security Fabric) version 6.2: Cookbook SAML.
SAML overview and configuration (in the context of authentication between FortiGates in Security Fabric) version 6.2.3: Configuring the Security Fabric with SAML.
SAML overview and configuration (in the context of authentication between FortiGates in Security Fabric) version 6.4.2: Configuring the Security Fabric with SAML.
SAML overview and configuration (in the context of authentication between FortiGates in Security Fabric) version 7.0.2: Configuring single-sign-on in the Security Fabric.
SAML overview and configuration (in the context of authentication between FortiGates in Security Fabric) version 7.2.2: Configuring single-sign-on in the Security Fabric.
SAML overview and configuration (in the context of authentication between FortiGates in Security Fabric) version 7.4.1: Configuring single-sign-on in the Security Fabric.
Microsoft documentation for setting up SAML non-gallery application: Quickstart: View enterprise applications.
SAML chrome panel
SAML Message Decoder
SAML-tracer
SAML Message Decoder
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 2026 Fortinet, Inc. All Rights Reserved.