Created on
03-19-2023
10:38 PM
Edited on
12-14-2025
01:11 PM
By
Jean-Philippe_P
| Description | This article describes that SSL VPN/IPSec VPN is not able to connect with the error 'Audience is invalid!' with Okta as a SAML identity provider. |
| Scope | FortiGate, Okta as SAML identity provider. |
| Solution |
FortiGate had configured SAML login using the OKTA SAML identity provider, but failed to connect. Run the 'diagnose debug application samld -1 ' command, and it shows the error below:
diagnose debug application samld -1 __samld_sp_login_resp [871]: Audience is invalid!
The Audience URL, also known as Audience Restriction, specifies the intended recipient of the SAML Assertion. This field might be referred to as the 'Entity ID' by different vendors. While it can be any string, it is usually formatted as a URL, often including the Service Provider’s (SP’s) name. Frequently, the Audience URI matches the Assertion Consumer Service (ACS) URL, also known as the SSO URL. A common cause of the 'Audience is invalid' error is typos in the SP Entity ID, particularly with 'https://' and 'http://'.
Re-check that the URL in FortiGate is configured the same as the Okta settings.
On Okta's SAML configuration, it is possible to find Entity-ID settings under SAML Configuration -> General -> Audience URI (SP Entity ID). The Audience URI string is case-sensitive. For example, the following two URIs are for different audiences and will generate an 'Audience is invalid' error:
__samld_sp_login_resp [854]: Audience is invalid!
If SAML responds with code 7 along with 'Audience is invalid!' in the debug output, there is a configuration mismatch: the username claimed on FortiGate must be the same as on the SAML server. The Audience value must exactly match one of the service principal names on the Server.
config user saml edit "OKTA" set user-name <claim-name> <----- This must be the same as the username configured on SAML. next end Related articles:
|
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.