Skip to content

Failed to start api: Cosmos DB RBAC Forbidden (managed identity) #34

@Menghua1

Description

@Menghua1

Describe the issue:
Running the VS Code task Start API fails. The API tries to connect to Azure Cosmos DB using Managed Identity, but Cosmos rejects the request with RBAC/Forbidden (403). The error indicates the principal does not have permission to perform Microsoft.DocumentDB/databaseAccounts/readMetadata as follows:
Image

Repro Steps:

  1. Run azd init -t todo-nodejs-mongo.
  2. Run azd up.
  3. Run task: start api.

Environment:

  • Template: todo-nodejs-mongo.
  • Azd version: azd version 1.24.0-beta.1-daily.6038122 (commit 69ab5ebc77e88cd93240670a208b04488d7c3c3c).
  • OS: Windows and Linux.
  • Branch: Main.

Expected behavior:
The start api task can run successfully.

@rajeshkamal5050 for notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions