Issue adding members to @googlegroups.com with Google Apps Scripts

497 views Asked by At

I am having an issue creating an automation script with Google Apps script.

My function is:

function addToGroup(email, group) {
    // Create a user with membership access
    var user = {
        email: email,
        role: 'MEMBER'
    };
    AdminDirectory.Members.insert(user, group)
}

This works perfectly with GSuite groups, however I get an issue saying 'Domain not found' when I try to use this with a @googlegroups.com group address.

Is there a different method for adding to these types of groups?

Any information is welcome.

Thanks

0

There are 0 answers