Skip to main content
kiri
Staff & Editor
Staff & Editor
June 29, 2023

Troubleshooting Tip: Fix SAML 'access denied' error caused by failure to create SP

  • June 29, 2023
  • 0 replies
  • 12137 views
Description

This article provides a solution to the SAML auth error 'Access denied' shown to the end user by the SP/firewall.
Depending on the firmware version, the displayed error might be slightly different.

 

error access.png

Scope FortiGate v6.x, v7.x.
Solution

Run the following debug on the firewall whilst the end user is authenticating:

 

diagnose debug disable

diagnose debug reset
diagnose debug console timestamp enable
diagnose debug app saml -1
diagnose debug app eap_proxy -1

diagnose debug enable

 

Depending on the setup, another command set might be helpful.

For example, if this is for SSL VPN, add diagnose debug app sslvpn -1 to the command set like:

 

diagnose debug disable

diagnose debug reset

diagnose debug console timestamp enable

diagnose debug app fnbamd -1

diagnose debug app sslvpn -1

diagnose debug enable

 

To disable debugs:

 

  diagnose debug disable  

 

If this message is seen in the SAML debug from FortiGate CLI:

 

2023-06-22 07:01:30 [15478:root:57][fsv_found_saml_server_name_from_auth_lst:123] Found SAML server [azure.ad.sso] in group [test1]
gen_sp_server [325]: Failed to create SP

 

Check the SAML configuration on the FortiGate. This is usually caused by incorrect 'config user saml' parameters like 'set single-sign-on-url'.

 

config user saml
    edit "azure.ad.sso"
        set entity-id "https://fgt.local:8443/remote/saml/metadata"
        set single-sign-on-url "https://fgt.local:8443/remote/loginlang=en"
        set single-logout-url "https://fgt.local:8443/remote/saml/logout"

 

'set single-sign-on-url' is incorrect in this example; it must be https://fgt.local:8443/remote/saml/login
Make sure the URLs are correct and the same on both sides, SP and IdP. They are usually copyable and pasteable on both SP and IdP.

Related articles:

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!