Method GetCredential NamespaceMongoDB.Driver AssemblyMongoDB.Driver.dll GetCredential() Gets the credential. public MongoCredential GetCredential() Returns MongoCredential The credential (or null if the URL has not authentication settings).