azure-cli-extensions
azure-cli-extensions copied to clipboard
az devops security group membership list --relationship memberof returns invalid json
Hi,
Using the membership list --relationship memberof option, but I believe the 'members' option does the same, I come across the issue that powershell cannot convert the output from json.
Code: $MemberOf = (az devops security group membership list --id $GroupId --relationship memberof) | ConvertFrom-Json
In our case I see three groups returned, but the $MemberOf only holds one object, not three. Even if I force the output in Json format.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 52ec4f1d-e2b6-2397-ea6f-d8ceb8a3b315
- Version Independent ID: 58fbf7ef-2e9f-d56f-3e75-d37195202350
- Content: az devops security group membership
- Content Source: latest/docs-ref-autogen/ext/azure-devops/devops/security/group/membership.yml
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
devops
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.
Hi, can you share screenshots of your issue for a detailed explanation? you can try az devops security group membership list --id $GroupId --relationship memberof -o table to see how many groups is this group a member of. What we get is a single JSON object containing information for all the 3 groups, which I guess is what you are seeing. If there is something else you wanted to tell, please reply back with some screenshots of the issue. Thanks
Hi, see attached files. I have added the powershell statements I executed and replaced the most important GUIDs with text to avoid exposing too much details. JSONFormat.zip
Same problem here.
@smunj Has there been any work on correcting this issue?