Does Azure MongoDB support managed identity authentication?


Is it possible to connect to Azure MongoDB via an Azure VM using managed identity?

Example for Azure PostgreSQL for your reference.


Hello @Khanh_Quach ,

Welcome to The MongoDB Community Forums! :wave:

Unfortunately, this is not supported at the moment and we are aware of some requests for this feature. However unfortunately I cannot provide any timeline or comment regarding this request.


Actually, through Azures services, or any identity management services, yes.

You just set it up the same way you would any other services to do it.

I prefer building an LDAP server and pushing it through MongoDBs built in authentication mechanisms. and have the LDAP coincide with AAD.

MongoDB I just MongoDB, no need to care whether or not they have a built in integration when it’s still just MongoDB at its core and it’s hard to find something that doesn’t have ways around connecting to it.

There’s also CosmoDB which really, is just an overlay on MongoDB Choose between RU-based and vCore-based models - Azure Cosmos DB for MongoDB | Microsoft Learn and other NoSQL databases it can build a container of and connect that way, too.

You can also just build an Atlas DB and do this:

Then there’s this:
Just instead of AD have it go to AAD, principles work the same with Atlas.

1 Like

Hello @Khanh_Quach I just want to clarify something for yourself and other readers.

@Tarun_Gaur actually is correct, it’s not supported what you’re asking for, but he’s referring to organically built into MongoDB itself presently with Azure stand alone.

I just want to make clear, all the methods above are you constructing other means to integrate MongoDB into an SSO/AAD system to make everything communicate and talk to each other, essentially. Basically, traditional DevOps work.

In DevOps, you care a lot less what’s organic to any one specific piece of your environment, vs all the pieces that you have in play and in use. I just know of these workarounds because I used to work for Microsoft on the Azure platform, and built these forms of relations between systems for my job.

But he is correct on what he had stated, just to clear up any confusions.

1 Like