DevOps-Journey-Using-Azure-DevOps icon indicating copy to clipboard operation
DevOps-Journey-Using-Azure-DevOps copied to clipboard

unable to add current logged in user to group

Open ayoakpata opened this issue 2 years ago • 3 comments

running the script to auto create group and add currently logged in user only creates the group...trying to add user throws error

←[91margument --member-id: expected one argument←[0m

Examples from AI knowledge base: ←[94maz←[94m ad←[94m group←[94m member←[94m add←[94m --group←[0m MyGroupDisplayName←[94m --member-id←[0m xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx←[0m ←[90mAdd a member to a group. (autogenerated) ←[0m ←[96mhttps://docs.microsoft.com/en-US/cli/azure/ad/group/member#az_ad_group_member_add←[0m ←[90mRead more about the command in reference docs←[0m AZURE AD GROUP ID IS:

ayoakpata avatar Oct 09 '22 17:10 ayoakpata

Can you include full error output?

thomast1906 avatar Oct 18 '22 13:10 thomast1906

CURRENT_USER_OBJECTID=$(az ad signed-in-user show --query objectId -o tsv)

should be: CURRENT_USER_OBJECTID=$(az ad signed-in-user show --query id -o tsv)

in create-azure-ad-group.sh by the looks of it

orbsfoc avatar Dec 23 '22 09:12 orbsfoc

Same issue here. I agree with the above suggestion

A-Larsen avatar Dec 21 '23 22:12 A-Larsen

Thank you all - now fixed it in https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps/pull/37

Apologies for the delay.

thomast1906 avatar May 31 '24 08:05 thomast1906