Which role lets AKS1's managed identity access Azure Cosmos DB?
You have an Azure subscription named Sub1 that contains a resource group named RG1. RG1 contains an Azure Cosmos DB database named DB1 and an Azure Kubernetes Service (AKS) cluster named AKS1. AKS1 uses a managed identity. You need to ensure that AKS1 can access DB1. The solution must meet the following requirements: • Ensure that AKS1 uses the managed identity to access DB1. • Follow the principle of least privilege. Which role should you assign to the managed identity of AKS1?
Community Votes
72% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
It tests whether you can separate Cosmos DB control-plane roles (Azure RBAC, assignable from the account's IAM blade) from data-plane roles, with the trap being the option named 'Azure Cosmos DB Data Reader Role' that merely sounds more least-privilege.
AKS1 must reach Cosmos DB DB1 through its managed identity while staying least-privilege, so this SC-300 item tests which Azure RBAC role to grant. The verdict is the Cosmos DB Account Reader Role assigned on the DB1 account (B), not a subscription Owner or resource-group Reader role.
Choosing C, the Azure Cosmos DB Data Reader Role, because a 'data reader' sounds like the tightest possible permission; in reality it is a Cosmos DB data-plane role granted through Cosmos DB's own RBAC at account/database/container scope, not through an Azure IAM role assignment at the RG1 scope.
Community Discussion (13 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option B assigns the Azure Cosmos DB Account Reader Role directly on DB1, the Cosmos DB account itself, which is exactly the boundary AKS1 needs to cross. This is an Azure RBAC control-plane role, so it can be granted to AKS1's managed identity from the Cosmos DB account's Access control (IAM) blade — the standard way to let a managed identity authenticate to the account, as Doinitza confirmed with a lab. Scoping the assignment to DB1 rather than Sub1 or RG1 satisfies the least-privilege requirement stated in the question. That combination of correct role type plus correct scope is what makes B the only fully compliant option.Why the Other Options Are Wrong
Option A (Owner on Sub1) is enormously over-privileged and would let AKS1 manage every resource in the subscription, directly violating least privilege. Option D (Reader on RG1) is management-plane read access across all of RG1 and does not give the workload the Cosmos DB account-level access it requires. Option C names a role that does exist as a Cosmos DB data-plane role, but that role is assigned with Cosmos DB's native role-assignment mechanism scoped to an account, database or container — not by an Azure IAM role assignment at the RG1 scope that the option specifies. Even if the role name were acceptable, the scope in C makes it unassignable the way the option describes.Community Comment Notes
Doinitza's lab walkthrough is the clearest evidence for B: creating a Cosmos DB account and assigning the Cosmos DB Account Reader Role to a managed identity from the account's IAM blade works. klayytech and blanco00555 describe the same step, and penatuna argued that options A and D "give too much privileges" while pointing out C is not an Azure RBAC role you can grant that way. Alcpt framed the real distinction: "RBAC in Azure Cosmos DB applies to either a data plane operations" or a management-plane operation, meaning the Account Reader Role is the management-plane grant a managed identity can actually receive via IAM. anonymousarpanch noted that both roles exist but that data-plane roles serve microservices and APIs, not this Azure RBAC assignment.Official Reference
Exam Strategy
When an option set mixes subscription, resource-group and resource scopes, eliminate on scope first: A (subscription) and D (resource group) cannot satisfy a least-privilege requirement aimed at one Cosmos DB account, so only B and C remain and the role-type distinction decides it.
Frequently Asked Questions
Why is the Azure Cosmos DB Data Reader Role option wrong?
It is a Cosmos DB data-plane role granted through Cosmos DB's own RBAC on an account, database or container, not an Azure IAM role assignment at the RG1 scope the option names.
Why not just assign Owner on Sub1 or Reader on RG1?
Both scopes are far broader than the AKS1 workload needs, violating least privilege, and neither targets the DB1 Cosmos DB account access AKS1 actually requires.
Related Analysis
Practice All SC-300 Questions
Access 80 questions with complete answers and detailed explanations.
View Full SC-300 Practice Test →