Hi Tanveer,
MongoDB can be configured to support multiple authenticationMechanisms. Note that LDAP support is only included in MongoDB Enterprise for Linux editions.
For example you could use the following on MongoDB 3.0+ to allow SCRAM-SHA-1 and LDAP Proxy Authority Authentication:
mongod --auth --setParameter saslauthPath="" --setParameter authenticationMechanisms=PLAIN,SCRAM-SHA-1 --auth
Also note that it is possible to set the authentication parameters using a configuration file:
security:
authorization: enabled
setParameter:
authenticationMechanisms: SCRAM-SHA-1,MONGODB-X509,PLAIN
Please confirm that you allow both mechanisms so that LDAP and MongoDB credentials can be used.
Regards,
John Murphy