The C# driver cannot be used to create externally authenticated users, such as Kerberos users because the driver restricts the use of '$' in database names. An exception is needed to allow references to '$external' within the driver.
When trying to get a reference to '$external' using the following code:
var client = new MongoClient(); var server = client.GetServer(); var db = server.GetDatabase("$external");
The following exception is thrown:
Database name '$external' is not valid. The character 0x0024 '$' is not allowed in database names.Parameter name: name
A possible patch would be inside MongoDB.Driver.MongoServer.IsDatabaseNameValid(string databaseName, out string message).