Skip to content

[Admin API] Insert email with + sign into a google group fails #1982

Open
@kushagra-arta

Description

@kushagra-arta

https://developers.google.com/resources/api-libraries/documentation/admin/directory_v1/python/latest/admin_directory_v1.members.html#insert

Environment details

  • OS type and version: Ubuntu 20.04.5 LTS
  • Python version: 3.8.13
  • pip version: 22.0.4
  • google-api-python-client version: 2.27.0

Steps to reproduce

  1. Try to insert any email with a + sign into a group -> 404 Error
  2. Exactly same code with an email without the + sign works -> 200.

Code example

...
service = build('admin', 'directory_v1', credentials=creds)
new_member = {'email': '<any email with + e.g. [email protected]'>, 'role': 'MEMBER'}
service.members().insert(groupKey=<group_id>, body=new_member).execute()

Stack trace

<HttpError 404 when requesting https://admin.googleapis.com/admin/directory/v1/groups/<group_id>/members?alt=json returned "Resource Not Found: [email protected]". Details: "[{'message': 'Resource Not Found: [email protected]', 'domain': 'global', 'reason': 'notFound'}]">

The same email when inserted via UI works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions