有办法以编程方式加入群组吗?

Yes, that’s Plan B, but possibly with LDAP groups…