google-api-python-client
google-api-python-client copied to clipboard
Update Group allowExternalMembers not updating
Environment details
- OS type and version: Rocky 9
- Python version: Python 3.9.18
- pip version: pip 22.0.4
google-api-python-clientversion: 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!
Please can you try to re-create the issue with the Try It section on this page and check whether the issue still exists? This helps to confirm if this is a client library issue or a API issue. If this is an issue with the API itself, we'll redirect you to the API support channel so you can get better quality answers. For the Admin API please see https://developers.google.com/admin-sdk/support.