google-api-python-client icon indicating copy to clipboard operation
google-api-python-client copied to clipboard

Update Group allowExternalMembers not updating

Open adambarnett52 opened this issue 1 year ago • 1 comments

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

image

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

adambarnett52 avatar Feb 26 '24 11:02 adambarnett52

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.

parthea avatar Mar 28 '24 11:03 parthea