title: SAML error for SSO with ADFS - MSIS0038: SAML Message has wrong signature
body: <p>Hi I am trying to use SSO to authenticate my client's users directly to my website. My client's IDP is Microsoft ADFS and I am using Passport-SAML (<a href="https://github.com/bergie/passport-saml" rel="nofollow noreferrer">https://github.com/bergie/passport-saml</a>) to configure the SSO process.</p>
  
  <p>After getting to a special URL I give my client (example: www.myClient.myCompany.com ), the user (unauthenticated) is as expected redirected to the client login page.
  After he enters his credential, he remains stuck in login page <strong>BUT</strong> the SSO work because the user is authenticated meaning that if he opens a new tab and go to www.myClient.myCompany.com, he will be redirected to my website.</p>
  
  <p>Here the error in ADFS Server Log:</p>
  
  <pre><code>The Federation Service encountered an error while processing the SAML authentication request. 
  
  Additional Data 
  Exception details: 
  Microsoft.IdentityModel.Protocols.XmlSignature.SignatureVerificationFailedException: MSIS0038: SAML Message has wrong signature. Issuer: 'www.myCompany.co'.
     at Microsoft.IdentityServer.Protocols.Saml.Contract.SamlContractUtility.CreateSamlMessage(MSISSamlBindingMessage message)
     at Microsoft.IdentityServer.Service.SamlProtocol.SamlProtocolService.Issue(IssueRequest issueRequest)
     at Microsoft.IdentityServer.Service.SamlProtocol.SamlProtocolService.ProcessRequest(Message requestMessage)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UfImt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UfImt.png" alt="MSIS0038 Error - Event ID 303"></a></p>
  
  <p>Thank for your time!</p>