Is MONGO_OIDC available on Azure CosmosDB for MongoDB RU version

Monica Suh 40 Reputation points
2025-10-27T18:01:00.3333333+00:00

Hello!

My team is using Azure Cosmos DB for MongoDB RU and we want to connect from our apps to our database using Microsoft Entra ID (i.e. via OIDC using a ManagedIdentityCredential). We came across an article (here) that describes how to use the MongoClient and the MONGO_OIDC authentication mechanism to authenticate to our database.

The issue is that this article seems to be specifically for CosmosDB for MongoDB vCore and I cannot find any documentation stating whether this would apply to CosmosDB MongoDB RU as well. I was assuming that Mongo driver compatibility would be the same between RU and vCore, but am now unsure because all the documentation on using MONGO_OIDC seems to be very vCore specific (i.e. the how-to > security section of MongoDB RU only contains articles about how to authenticate using key-based auth). So I was wondering

  • Is the MONGO_OIDC authentication mechanism compatible with CosmosDB MongoDB RU as well? Can you point me in the direction of any official documentation outlining this?
  • If not, are there any plans to make it compatible with MongoDB RU as well? What would be the timeline on that?

Thank you!

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
{count} votes

Answer accepted by question author
  1. Mahesh Kurva 9,725 Reputation points Microsoft External Staff Moderator
    2025-10-29T14:44:40.7466667+00:00

    Hi Bohdan Martyniuk,

    Thank you for sharing your implementation details. I wanted to clarify the current state of authentication for Azure Cosmos DB for MongoDB (RU‑based) accounts:

    1.Officially Supported Authentication

    For RU‑based MongoDB API accounts, the officially supported authentication method is key‑based(using the account key). Microsoft does not currently support MONGO_OIDC or Azure AD/Managed Identity authentication for RU‑based accounts.

    2.About the PLAIN Mechanism You Tried

    The authMechanism: 'PLAIN' approach with an Azure AD token may appear to work because the token is being treated as a password by the database. However, this is not officially supported by Microsoft, and it may not provide the same guarantees as key-based authentication. Future updates could break this behavior.

    3.Recommended Approach

    To ensure stability, compliance, and supportability, we recommend switching to key‑based authentication for your RU‑mode MongoDB accounts.

    4.Future Support for Managed Identity / OIDC

    As of now, there is no publicly available roadmap or timeline indicating that RU-based accounts will support Managed Identity / OIDC authentication.

    For more information, please refer the documents:

    https://free.blessedness.top/en-us/azure/cosmos-db/mongodb/vcore/entra-authentication

    https://free.blessedness.top/en-us/azure/cosmos-db/mongodb/connect-account

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Answer accepted by question author
  1. Amira Bedhiafi 39,566 Reputation points Volunteer Moderator
    2025-10-27T19:28:06.69+00:00

    Hello Monica !

    Thank you for posting on Microsoft Learn Q&A.

    MONGO_OIDC is supported for Azure Cosmos DB for MongoDB vCore, not for the RU-based MongoDB API.

    What’s supported today ?

    • vCore: has first-party Entra ID integration over OIDC, which is exactly what the MONGO_OIDC mechanism in the MongoDB drivers uses and works with managed identities/service principals.
    • RU (MongoDB API): direct Entra/OIDC auth isn’t supported and connections use key-based credentials.

    Docs you can point to :

    https://free.blessedness.top/en-us/azure/cosmos-db/mongodb/vcore/entra-authentication

    https://free.blessedness.top/en-us/answers/questions/5510005/how-to-connect-to-cosmos-db-for-mongo-using-manage

    https://free.blessedness.top/en-us/answers/questions/5510005/how-to-connect-to-cosmos-db-for-mongo-using-manage


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.