This issue is not only happening while creating a MongoClient but performing any operations in CosmosDB for MongoDB.