AZ-204 · Question #40
Drag and Drop Question You are developing a .NET Core model-view controller (MVC) application hosted on Azure for a health care system that allows providers access to their information. You develop…
The correct answer is [Authorize(Roles = "ProviderAdmin, SysAdmin")]; [Authorize(Policy = "ProviderEditor", Roles = "SysAdmin")]. The Partner controller requires access for both ProviderAdmin AND SysAdmin roles, so [Authorize(Roles = "ProviderAdmin, SysAdmin")] is correct at the controller level - a comma-separated list in a single Authorize attribute means OR (either role is sufficient). For the Manage…
Question
Exhibit
Answer Area
Drag items
Correct arrangement
- [Authorize(Roles = "ProviderAdmin, SysAdmin")]
- [Authorize(Policy = "ProviderEditor", Roles = "SysAdmin")]
Explanation
The Partner controller requires access for both ProviderAdmin AND SysAdmin roles, so [Authorize(Roles = "ProviderAdmin, SysAdmin")] is correct at the controller level - a comma-separated list in a single Authorize attribute means OR (either role is sufficient). For the Manage action, the requirement is that a user must BOTH hold an editor claim of 'partner' (ProviderEditor policy) AND be in the SysAdmin role, so [Authorize(Policy = "ProviderEditor", Roles = "SysAdmin")] combines both conditions in a single attribute where both must be satisfied simultaneously.
Topics
Community Discussion
No community discussion yet for this question.
