PowerShell: How to invite users to join a group. How to add users to a group.

TimmyFangs
TimmyFangs
Community Member

I am throwing together a powershell script in order to add users to a group. However when I use this command:
foreach ($name in $arraySendInvites) { # Grant permissions for users into IT Managers group op group user grant --group "IT Managers" --user $name }
I get this error:
`op : [ERROR] 2022/12/02 12:29:07 "dude.guy@nunya.biz" isn't a user in this account. Specify the user with their UUID, email address, or name.
At C:\Users\Me\Dev\1Password_Scripts\ITManagers.ps1:103 char:9

  • op group user grant --group "IT Managers" --user $name
  • ~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: ([ERROR] 2022/12...dress, or name.:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError`

I got this command directly from the CLI reference. I have no idea what I'm doing wrong here.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Windows 11
Browser:_ Not Provided

This discussion has been closed.