0

I'm trying to pull down the full state of group membership via the directory API, and since the members.list(groupKey=group_email) call won't return delivery_settings in its response, I'm stuck walking the list of group members and doing a members.get(groupKey=group_email, memberKey=member_email) call for each member. I'm regularly seeing some of those get() calls fail with a 404 "Resource Not Found: email" error.

The error reproduces in the API explorer, and is reliably reproducible (if I see an error for a particular group/member combo running my script, the API explorer will show the same error). I can't find anything that the bad group/members have in common that's unique to just those members.

As a workaround, I've found that grabbing the id field from the members.list() response, and turning my get() call into members.get(groupKey=group_address, memberKey=id) will work. Does anyone have any idea why an email memberKey would fail, but the id wouldnt?

rascalking
  • 3,443
  • 1
  • 18
  • 16
  • It looks like this might be related to https://stackoverflow.com/questions/18492861/directory-api-delete-member-api-operation-fails-for-non-google-accounts, in that using the id as a workaround works. Not encouraging to see that was acknowledged as a bug in 2013 and apparently hasn't been fixed yet. – rascalking Apr 07 '21 at 19:20
  • I tried executing a request on [Method:members:get](https://developers.google.com/admin-sdk/directory/reference/rest/v1/members/get) using both email and id as memberKey and both are working just fine. The error only occurs when the member is not present in the group or the group is not existing. Could you include your code above so I could try debugging it on my terminal? – Nikko J. Apr 07 '21 at 21:53
  • Right...most of the time, the `get()` call with email as the `memberKey` works fine. It's only for specific memberships that it throws that error, but for the cases where it throws in my code, it will reliably repro on the API explorer. Which is why I'm fairly sure it's not my code, it's an issue on Google's end. – rascalking Apr 08 '21 at 15:31
  • You may file an [Issue Tracker](https://issuetracker.google.com/issues/new) for this bug. – Nikko J. Apr 08 '21 at 16:31
  • Done. Looks like someone already filed it (https://issuetracker.google.com/issues/175198974) but it got closed out when the filer didn't respond. – rascalking Apr 08 '21 at 18:23

1 Answers1

0

After getting in touch with Google support, it turns out this is a known issue, but no current eta for a fix. We're expected to work around it by using the membership id instead of the email address as the memberKey.

rascalking
  • 3,443
  • 1
  • 18
  • 16