com.mongodb.MongoCommandException: Command failed with error 18

Hi @Babu_Krishnamoorthy

Further information detailing the authentication error will be available in the mongod server logs.

There are a few settings that can improve LDAP/AD authentication.
Use https://support.mongodb.com and search for LDAP best practices or recommendations. Number 1 on my list would be to to enable LDAP connection pooling.

Opening a support case with MongoDB would also be a good idea.