Technical Tip: SAML authentication failed due to a 'no matching group' error, even though group membership is correctly configured
| Description | This article describes the error message 'no matching group' that occurs while using SAML authentication, even when the group name is an exact match on the IDP and SP configuration. |
| Scope | FortiGate.. |
| Solution | Common errors during group mismatch in SAML authentication occur if the IDP and SP do not have a matching group name. In a few cases, the error is thrown as 'no matching group' even if the group name is an exact match.
FortiGate uses the group values provided in the SAML assertion (from the Identity Provider) and compares them against the configured user groups. A mismatch occurs when there is no overlap between what the IdP sends and what FortiGate is configured to recognize.
The commands below can be used to take SAML debug:
diagnose debug reset diagnose debug enable
To disable debug:
diagnose debug reset
The following is a debug example:
</Attribute><Attribute Name="http://schemas.microsoft.c
FortiGate configuration:
config user saml set group-name "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups" <----- The same as was shown in the debug example.
In some cases, the Azure end may use 'group' as the group-name attribute, so the same value must be configured in the FortiGate SAML settings to ensure proper mapping.
Even if the group-name attribute is the same, the following error is received:
2025-07-28 19:40:05 [5905:root:12179]fsv_saml_auth_group:485 no matching group found.
In cases like this, the following debug output needs to be verified against FortiGate user group attribute configuration:
samld_send_common_reply [95]: Attr: 10, 89, 'http://schemas.microsoft.com/identity/claims/displayname' 'Test User (Tests)'
Verify the highlights above against the FortiGate config:
config user group edit "Azure_Test_Team" After modifying it to an exact match, SAML authentication is successful and group information is fetched correctly:
samld_send_common_reply [118]: Attr: 10, 37, 'username' 'Test' Note: Starting with FortiOS v7.2.10, v7.4.8, and v7.6.3, both the SAML assertion and the response must be signed, not just the SAML assertion. Refer to Troubleshooting Tip: SAML Authentication fails after firmware upgrade to v7.2.12, v7.4.9 or v7.6.4.
Related article: |
