Welcome to Microsoft Q&A Platform!
Thanks for reaching out with your query.
As you mentioned, Azure Logic Apps do not support direct integration with Azure Cosmos DB accounts using the MongoDB API. However, you could try achieving CRUD operations using Azure Functions as an intermediary.
Here’s how you can achieve this:
- Create an Azure Function that connects to your Azure Cosmos DB for MongoDB account and performs the required CRUD operations (Create, Read, Update, Delete). Your Logic App can then call this function via an HTTP action.
[Connect Azure Functions to Azure Cosmos DB using Visual Studio Code]
- You can use Managed Identity (MI) for your Logic App to authenticate and securely interact with the Azure Function. To grant the necessary permissions, assign the Cosmos DB Built-in Data Contributor role to the Logic App's managed identity. This role allows the Logic App to perform both read and write operations on the Cosmos DB account.
By using this approach, you can successfully integrate your Logic App with Cosmos DB for MongoDB API through Azure Functions.