az ad group member add is not idempotent
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62
**Describe the bug**
I'm running this command from an Azure DevOps pipeline as part of our infrastructure deployment and without additional care these commands fail for subsequent runs.
**To Reproduce**
az ad group member add -g $rg --member-identity $id
az ad group member add -g $rg --member-identity $id
> One or more added object references already exist for the following modified properties: 'members'.
**Expected behavior**
No error.
**Environment summary**
```
azure-cli 2.19.1
core 2.19.1
telemetry 1.0.6
Extensions:
datafactory 0.2.0
azure-devops 0.18.0
resource-graph 1.1.0
application-insights 0.1.5
image-copy-extension 0.0.7
```
**Additional context**
I've run the same command on ubuntu, macOs and Windows. Here's my workaround: https://twitter.com/MRiezebosch/status/1359533376777179137
Contributor guide
Assessment
This issue has not been assessed yet.