2

In a Google Apps for Education domain, I can approve a "pending" user in a group by setting their role to "member", also and I can remove a user with the role of "member" with the code below:

member = AdminDirectory.Members.remove(groupKey, memberKey);

But the same code does not work for a user with a role of "PENDING".

Is there a way to reject/remove an invite/pending user via Google Apps Directory Script?

1 Answers1

1

It seems that this use-case was left out of the Directory API (therefore this is not really an Apps Script issue).

You should report this issue here: https://code.google.com/a/google.com/p/apps-api-issues/wiki/IssuesTab?tm=3

Henrique G. Abreu
  • 17,406
  • 3
  • 56
  • 65
  • Thanks I will. I found that the hackish workaround was to add as member, then remove, but I'd rather something supported in the API – user3283913 Sep 09 '14 at 14:19
  • Yes, I've thought of that solution, but didn't had the courage to suggest it, given how "hackish" it is. You're giving authorization to a user you clearly want to just deny. What if your script fails in between calls? – Henrique G. Abreu Sep 09 '14 at 17:33