SAML Authentication issue

Rajeev Gera 0 Reputation points

Hello Concerned Team,

We're trying to implement SAML authentication with azure for our on-premise application hosted through IIS. We are facing the following error as attached resulting in failure of our SAML implementation, hence we need support in its implimentation as we're stuck from our end. Please support.

User's image

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,235 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Navya 5,720 Reputation points Microsoft Vendor

    Hi @Rajeev Gera

    Thank you for posting this in Microsoft Q&A.

    I understand that you're encountering an error with the SAML message encoding when trying to implement SAML authentication with Azure for your on-premises application hosted through IIS. Specifically, you're seeing the error message "AADSTS750055: SAML message was not properly DEFLATE-encoded."

    Could you please confirm, what type of HTTP call being used by your application to send SAMLRequest (aka AuthNRequest) to Azure AD, either HTTP-Redirect or HTTP-POST?

    You can identity this by looking at SAMLRequest from HTTP call which done by your application, if you see HTTP 302 call and SAMLRequest sent in query string then your app using HTTP-Redirect which is most commonly used scenario. Instead, you see HTTP POST call and SAMLRequest sent in body then your application using HTTP POST.

    This error typically occurs when the SAML message is not properly compressed using the DEFLATE algorithm.

    This is my AuthRequest for test app:

    <samlp:AuthnRequest xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ID="F84D888AA3B44C1B844375A4E8210D9E" Version="2.0" IssueInstant="2021-10-07T08:10:24.669Z" IsPassive="false" AssertionConsumerServiceURL="

    HTTP-Redirect- binding:

    AuthenRequest need to be Deflate + Base64 Encode. and then URLEncode.

    To deflate and base64 encode, we can use this tool, And to URL Encode, use this tool,

    1.Deflate + Base64 Encode value:


    2.URL Encoded above value:


    Final result would be added in SAMLRequest HTTP query string as shown below:

    **HTTP-POST- binding:**AuthnRequest need to be Base64 Encode directly and sent in HTTP POST call.


    For your reference:

    Similar issue discussed here:

    Hope this helps. Do let us know if you any further queries.



    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    0 comments No comments