Share via

Invalid SAML Response error

LYassine 21 Reputation points
2022-03-09T10:32:49.017+00:00

Hi,

I have tried everything I have found on the internet to solve this issue but I still have this error when the federated IDP I'm working on redirects back to Azure. Could you help please ? I only need more details about the issue but I can't find it in the logs on AzureAD:

Request Id: ce463b12-9e07-4eb0-8923-4d83bd703400
Correlation Id: 3ad6e58e-c430-4ffd-a77b-dc293489d186
Timestamp: 2022-03-09T16:57:38Z
Message: AADSTS500089: SAML 2.0 assertion validation failed: SAML token is invalid.

Thank you

Microsoft Security | Microsoft Entra | Microsoft Entra ID

Answer accepted by question author

  1. Siva-kumar-selvaraj 15,741 Reputation points Volunteer Moderator
    2022-03-13T19:41:46.807+00:00

    @LYassine , Thanks for reaching out and apologies for the delay in response.

    By tracking the details from the backend for your tenant based on the correlation ID and the timeframe of the error you have provided, I see some exception related to date and time of issued token as you could see below, an issued token was just valid for 2 minutes from issinst:2022-03-09T16:57:34Z to naf:2022-03-09T16:59:34Z which I feel very short duration so wondering any specific reason why your IDP sent token with shorter duration ? Ideally SAML token validity is 1 hour with Azure AD scenario.

    ValidateSamlToken failed. Assertion: {"iss":"https://localhost:6500","issinst":"2022-03-09T16:57:34Z","naf":"2022-03-09T16:59:34Z","aud":["urn:federation:MicrosoftOnline"]}

    Additionally, I would request you to ensure if identity provider is sending proper values in the following fields in the token IssueInstant , NotBefore , NotOnOrAfter , saml:Audience as urn:federation:MicrosoftOnline and, make sure identity provider is using the right key algorithm for signing token like RSA. Here's sample-token.xml for reference which you can use to compare non-working token. For detailed information about compatibility, see Azure AD federation compatibility list and Azure AD identity provider compatibility docs when using custom IDP for SSO.

    Hope this helps.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.