googleapis / google-api-python-client

🐍 The official Python client library for Google's discovery based APIs.
https://googleapis.github.io/google-api-python-client/docs/
Apache License 2.0
7.64k stars 2.39k forks source link

Update Group allowExternalMembers not updating #2344

Open adambarnett52 opened 6 months ago

adambarnett52 commented 6 months ago

Environment details

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!

parthea commented 5 months ago

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.