Add clean-up of "Unknown" role assignments
Open
Central-EngSys
needs-triage
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
A number of role assignments get left behind from our testing and we should add some clean-up so we don't hit the cap of number of role assignments and to avoid any security risks.
This is a snippet to clean them up using az cli for the TME sub but we can do the something similar in the PS modules to add to our sub clean-up scripts.
```
az login
$ids = az role assignment list --query "[?principalName==''].id" -o tsv --subscription "4d042dc6-fe17-4698-a23f-ec6a8d1e98f4" --scope "/subscriptions/4d042dc6-fe17-4698-a23f-ec6a8d1e98f4"
$ids | % { az role assignment delete --ids $_ --subscription "4d042dc6-fe17-4698-a23f-ec6a8d1e98f4" }
```
Contributor guide
Assessment
This issue has not been assessed yet.