Open
Description
Environment details
- OS type and version: Rocky 9
- Python version: Python 3.9.18
- pip version: pip 22.0.4
google-api-python-client
version: 2.118.0
Steps to reproduce
Run the below code and check the group settings after
Code example
creds = service_account.Credentials.from_service_account_file(
g_key, scopes=['https://www.googleapis.com/auth/admin.directory.group', 'https://www.googleapis.com/auth/apps.groups.settings']
)
creds = creds.with_subject(admin_user + "@domain.com")
service = build('admin', 'directory_v1', credentials=creds)
body=json.dumps({'allowExternalMembers': "False"})
service.groups().update(groupKey=group['email'],body=body).execute()
Stack trace
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!