Azure / Azure/azure-dev

Pre-flight roleAssignments/write warning fires even for subscription Owners

Open
#7,569 0 comments 0 reactions 0 assignees View on GitHub
area/core-cli enhancement
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

## Problem

When running `azd up` or `azd provision`, the pre-flight validation warns:

```
(!) Warning: the current principal does not have permission to create role assignments (Microsoft.Authorization/roleAssignments/write) on subscription
```

This warning fires even when the user is a subscription Owner. The deployment succeeds despite the warning.

## Reproduction

1. Be a subscription Owner
2. Run `azd up` on a template that includes role assignments (e.g. `Microsoft.Authorization/roleAssignments`)
3. Warning appears, but deployment succeeds

## Expected behavior

The pre-flight check should verify actual role assignments, not just check for the permission in the template. At minimum, if the user has Owner role, the warning should not appear.

## Environment

- azd 1.23.10
- Azure subscription with Owner role
- Template includes Cognitive Services User role assignment via Bicep

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.