azure-cli-extensions icon indicating copy to clipboard operation
azure-cli-extensions copied to clipboard

az devops security group membership list --relationship memberof returns invalid json

Open richardzaat opened this issue 4 years ago • 6 comments

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.

richardzaat avatar May 20 '20 07:05 richardzaat

devops

yonzhan avatar May 20 '20 09:05 yonzhan

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.

ghost avatar May 26 '20 18:05 ghost

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

smunj avatar May 27 '20 14:05 smunj

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

richardzaat avatar May 28 '20 10:05 richardzaat

Same problem here.

GaTechThomas avatar Sep 09 '20 02:09 GaTechThomas

@smunj Has there been any work on correcting this issue?

JJKW1984 avatar Aug 10 '22 13:08 JJKW1984