Azure / Azure/azure-cli

Add an existing AAD group to an Azure DevOps group - Missing scope parameter

Open
#18,270 2 comments 0 reactions 0 assignees View on GitHub
act-platform-engineering-squad DevOps Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

The example where an AAD group is added to a group is incorrect and should have the --scope parameter added

#### Add an existing AAD group to an Azure DevOps group
```bash
Get object ID of an existing AAD group
az ad group show -g '{Group Name}'
az devops security group create --origin-id '{Object ID}' --groups 'vssgp.someDescriptorForGroup'
```

to

```bash
Get object ID of an existing AAD group
$adGroup = az ad group show -g '{Group Name}' | ConvertFrom-Json
az devops security group create --origin-id $($adGroup.objectId) --groups 'vssgp.someDescriptorForGroup' --scope "organization"
```
---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 5d299d5c-fb22-d3e9-11b8-17a92ac580e8
* Version Independent ID: 0a87519a-507e-14b4-ca02-3bf4dd660443
* Content: [az devops security group](https://docs.microsoft.com/en-us/cli/azure/devops/security/group?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/devops/security/group.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/devops/security/group.yml)
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

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.