diff --git a/lib/passport-saml/saml.js b/lib/passport-saml/saml.js index 7873023a..9e5c4e5e 100644 --- a/lib/passport-saml/saml.js +++ b/lib/passport-saml/saml.js @@ -1249,7 +1249,10 @@ SAML.prototype.generateServiceProviderMetadata = function( decryptionCert, signi }; } - metadata.EntityDescriptor.SPSSODescriptor.NameIDFormat = this.options.identifierFormat; + if (this.options.identifierFormat) { + metadata.EntityDescriptor.SPSSODescriptor.NameIDFormat = this.options.identifierFormat; + } + metadata.EntityDescriptor.SPSSODescriptor.AssertionConsumerService = { '@index': '1', '@isDefault': 'true',