Created on
03-19-2023
10:38 PM
Edited on
04-01-2025
06:24 AM
By
Jean-Philippe_P
Description | This article describes that SSL 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 SSL VPN SAML login using 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 Okta settings.
On Okta 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 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 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: |