add your mongodb uri: spring.data.mongodb.uri=mongodb://root:password@localhost:27017/product-service?authSource=admin The authentification passed when i added all those elements to the connection URI.