SAMLException: NameID element must be present as part of the Subject in the Response message, please enable it in the IDP configuration
Iam using spring-saml implementation. In the class WebSSOProfileConsumerImpl, I could find the following lines of code which checks for nameId in the assertion of the SAML response . NameID nameID; if (subject.getEncryptedID() != null) { Assert.notNull(context.getLocalDecrypter(), "Can't decrypt NameID, no decrypter is set in the context"); nameID = (NameID) context.getLocalDecrypter().decrypt(subject.getEncryptedID()); } else { nameID = subject.getNameID(); } Based on the code, its clear that the nameId should be part of the subject. But most of the IDP's including the one that I am using