Summary
This article helps you troubleshoot error code AADSTS7500514 that's returned if a PingFederate federated account tries to authenticate by using Microsoft Entra ID (formerly Azure Active Directory).
Symptoms
When a federated account tries to authenticate by using Microsoft Entra ID from a Microsoft Authentication Library (MSAL)-based or Active Directory Authentication Library (ADAL)-based application, the sign-in fails. The following error message is displayed:
{
error: "invalid_request",
error_description: "AADSTS7500514: A supported type of SAML response was not found. The supported response types are 'Response' (in XML namespace 'urn:oasis:names:tc:SAML:2.0:protocol') or 'Assertion' (in XML namespace 'urn:oasis:names:tc:SAML:2.0:assertion').
....
error_uri: "https://login.microsoftonline.com/error?code=7500514"
}
The error typically occurs in the following environment:
- A federated account that uses PingFederate as the identity provider.
- The identity provider is configured to issue a SAML 1.1 token by using the WS-Trust protocol.
- The application uses one of the following APIs for authentication:
- MSAL
AcquireTokenByUserNamePasswordmethod. - ADAL
AcquireToken(string resource, string clientId, UserCredential userCredential) method. - Any PowerShell module that uses these MSAL or ADAL methods.
- MSAL
Cause
Because ADAL is now deprecated, this article focuses on the MSAL.
This issue occurs if the SAML response from PingFederate doesn't contain the SAML version or uses a format that MSAL can't recognize. Typically, this situation is caused by a misconfiguration on the PingFederate side for Microsoft Entra ID.
Root cause analysis: SAML token version detection
When MASL authenticates a federated account, it determines whether the account is a managed account or a federated account.
For managed accounts, MSAL uses the Resource Owner Password Credentials grant flow. For federated accounts, it uses the SAML Assertion Grant flow.
The SAML Assertion Grant flow has two steps:
- The client application authenticates to the federated identity provider to obtain a SAML token.
- The client uses the obtained SAML token to get an OAuth 2.0 JWT token from Microsoft Entra ID.
The authentication error typically occurs in step 1, in which the client application has to parse the SAML response from the identity provider to determine the version of the SAML token. MSAL looks for the following attributes in the identity provider's SAML response:
saml:AssertionTokenType
The following is an example AD FS SAML response from the /UserNameMixed endpoint:
saml:Assertion: major version = 1, minor version = 1TokenType:urn:oasis:names:tc:SAML:1.0:assertion
Example of a PingFederate SAML response (SAML Assertion Grant flow step 1):
When you compare these responses, you find that PingFederate returns a different TokenType value (http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1) for the same SAML 1.1 token. However, MSAL doesn't support any TokenType value other than urn:oasis:names:tc:SAML:1.0:assertion.
If the identity provider returns a different or unexpected value in the SAML response, MSAL might incorrectly interpret the token as SAML 2.0. In this case, it uses the corresponding grant_type value during step 2 of the SAML Assertion Grant flow.
Example of the request sent from MSAL application by using PingFederate (SAML Assertion Grant flow step 2):
Example of the request that's sent from the MSAL application by using AD FS:
In this step, the value of the grant_type parameter must align with the actual version of the SAML token. One of the following values is used by the MSAL application:
- urn:ietf:params:oauth:grant-type:saml2-bearer - for SAML 2.0 tokens
- urn:ietf:params:oauth:grant-type:saml1_1-bearer - for SAML 1.1 tokens
In the PingFederate example, MSAL uses the saml2-bearer as the grant_type based on its misinterpretation of the SAML version. This causes a version mismatch between the grant_type parameter and the SAML token that's included in the assertion that causes the authentication error.
Solution
To resolve this issue, make sure that PingFederate is configured to align with Microsoft Entra ID requirements. For step-by-step instructions, review the following articles:
-
Creating a connection to Microsoft Entra ID.
During Microsoft Entra ID connection setup, pay special attention to the settings in the following steps:
- Configure the connection protocols.
- On the Connection Template tab, select Do not use a template for this connection, and then select Next.
- On the Connection Type tab, select Browser SSO Profiles.
- In the Protocol list, select WS-Federation.
- In the WS-Federation Token Type list, select SAML 1.1.
- If you want to support active federation, select the WS-Trust STS checkbox.
-
When you configure WS-Trust STS, make sure that you select SAML 1.1 for Office 365 as the Default Token Type.
Third-party information disclaimer
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors (upstream author metadata: bachoang). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
