Hi Glen,
Yes, user1 should be able to add or remove members from Azure AD groups using PowerShell without needing additional permissions beyond being the owner of those groups. The syntax you provided seems mostly correct, but there are slight adjustments needed depending on whether you are using Azure CLI (az
) or Azure PowerShell (Az
module).
For Azure CLI (az
), the command to list group owners is:
az ad group owner list --group MyGroupDisplayName
Please check this for more https://learn.microsoft.com/en-us/cli/azure/ad/group/owner?view=azure-cli-latest
Then, to add a member to the group, the command would be:
az ad group member add --group <group_name_or_object_id> --member-id <user_object_id>
Please check this for more info https://learn.microsoft.com/en-us/cli/azure/ad/group/member?view=azure-cli-latest
For Azure PowerShell (Az
module), the command to add a member to the group is:
Add-AzADGroupMember -ObjectId <group_object_id> -MemberObjectId <user_object_id>
Kindly accept answer ,if it helps , Thanks!