Gmail permissions update

Updated various Gmail related commands to handle this error:
```
ERROR: 403: permissionDenied - Insufficient Permission
```
This commit is contained in:
Ross Scroggs
2024-01-10 08:52:57 -08:00
parent 90f9931dca
commit f950c863f4
7 changed files with 93 additions and 49 deletions

View File

@@ -11,6 +11,23 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
### 6.67.11
Updated various Gmail related commands to handle this error:
```
ERROR: 403: permissionDenied - Insufficient Permission
```
when the following service account scopes are selected:
```
[ ] 23) Gmail API - Basic Settings (Filters,IMAP, Language, POP, Vacation) - read/write, Sharing Settings (Delegates, Forwarding, SendAs) - read
[ ] 24) Gmail API - Full Access (Labels, Messages)
[ ] 25) Gmail API - Full Access (Labels, Messages) except delete message
[*] 26) Gmail API - Full Access - read only
[ ] 27) Gmail API - Send Messages - including todrive
[ ] 28) Gmail API - Sharing Settings (Delegates, Forwarding, SendAs) - write
```
### 6.67.10
Fixed bug that caused a trap when optional argument `charset <Charset>` was used with `emlfile <FileName>` in `gam <UserTypeEntity> draft|import|insert message`.

View File

@@ -334,10 +334,10 @@ writes the credentials into the file oauth2.txt.
admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
GAMADV-XTD3 6.67.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.67.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.10.8 64-bit final
MacOS High Sierra 10.13.6 x86_64
Python 3.12.1 64-bit final
MacOS Sonoma 14.2.1 x86_64
Path: /Users/admin/bin/gamadv-xtd3
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain.com
@@ -1002,9 +1002,9 @@ writes the credentials into the file oauth2.txt.
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
C:\GAMADV-XTD3>gam version
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
GAMADV-XTD3 6.67.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.67.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
Python 3.12.1 64-bit final
Windows-10-10.0.17134 AMD64
Path: C:\GAMADV-XTD3
Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, customer_id: my_customer, domain.com

View File

@@ -4,10 +4,10 @@
Print the current version of Gam with details
```
gam version
GAMADV-XTD3 6.67.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.67.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
MacOS Monterey 12.7 x86_64
Python 3.12.1 64-bit final
MacOS Sonoma 14.2.1 x86_64
Path: /Users/Admin/bin/gamadv-xtd3
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain.com
Time: 2023-06-02T21:10:00-07:00
@@ -16,10 +16,10 @@ Time: 2023-06-02T21:10:00-07:00
Print the current version of Gam with details and time offset information
```
gam version timeoffset
GAMADV-XTD3 6.67.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.67.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
MacOS Monterey 12.7 x86_64
Python 3.12.1 64-bit final
MacOS Sonoma 14.2.1 x86_64
Path: /Users/Admin/bin/gamadv-xtd3
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain.com
Your system time differs from www.googleapis.com by less than 1 second
@@ -28,17 +28,17 @@ Your system time differs from www.googleapis.com by less than 1 second
Print the current version of Gam with extended details and SSL information
```
gam version extended
GAMADV-XTD3 6.67.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
GAMADV-XTD3 6.67.11 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
MacOS Monterey 12.7 x86_64
Python 3.12.1 64-bit final
MacOS Sonoma 14.2.1 x86_64
Path: /Users/Admin/bin/gamadv-xtd3
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain.com
Time: 2023-06-02T21:10:00-07:00
Your system time differs from admin.googleapis.com by less than 1 second
OpenSSL 3.1.1 30 May 2023
cryptography 41.0.1
filelock 3.12.0
filelock 3.12.1
google-api-python-client 2.88.0
google-auth-httplib2 0.1.0
google-auth-oauthlib 1.0.0
@@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64
Path: /Users/Admin/bin/gamadv-xtd3
Version Check:
Current: 5.35.08
Latest: 6.67.10
Latest: 6.67.11
echo $?
1
```
@@ -73,7 +73,7 @@ echo $?
Print the current version number without details
```
gam version simple
6.67.10
6.67.11
```
In Linux/MacOS you can do:
```
@@ -83,10 +83,10 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 6.67.10 - https://github.com/taers232c/GAMADV-XTD3
GAM 6.67.11 - https://github.com/taers232c/GAMADV-XTD3
Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.0 64-bit final
MacOS Monterey 12.7 x86_64
Python 3.12.1 64-bit final
MacOS Sonoma 14.2.1 x86_64
Path: /Users/Admin/bin/gamadv-xtd3
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain.com
Time: 2023-06-02T21:10:00-07:00

View File

@@ -2,6 +2,23 @@
Merged GAM-Team version
6.67.11
Updated various Gmail related commands to handle this error:
```
ERROR: 403: permissionDenied - Insufficient Permission
```
when the following service account scopes are selected:
```
[ ] 23) Gmail API - Basic Settings (Filters,IMAP, Language, POP, Vacation) - read/write, Sharing Settings (Delegates, Forwarding, SendAs) - read
[ ] 24) Gmail API - Full Access (Labels, Messages)
[ ] 25) Gmail API - Full Access (Labels, Messages) except delete message
[*] 26) Gmail API - Full Access - read only
[ ] 27) Gmail API - Send Messages - including todrive
[ ] 28) Gmail API - Sharing Settings (Delegates, Forwarding, SendAs) - write
```
6.67.10
Fixed bug that caused a trap when optional argument `charset <Charset>` was used with `emlfile <FileName>` in `gam <UserTypeEntity> draft|import|insert message`.

View File

@@ -7137,11 +7137,11 @@ def send_email(msgSubject, msgBody, msgTo, i=0, count=0, clientAccess=False, msg
try:
result = callGAPI(gmail.users().messages(), 'send',
throwReasons=[GAPI.SERVICE_NOT_AVAILABLE, GAPI.AUTH_ERROR, GAPI.DOMAIN_POLICY,
GAPI.INVALID_ARGUMENT, GAPI.FORBIDDEN],
GAPI.INVALID, GAPI.INVALID_ARGUMENT, GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED],
userId=userId, body={'raw': base64.urlsafe_b64encode(message.as_bytes()).decode()}, fields='id')
entityActionPerformedMessage([Ent.RECIPIENT, msgTo, Ent.MESSAGE, msgSubject], f"{result['id']}", i, count)
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy,
GAPI.invalidArgument, GAPI.forbidden) as e:
GAPI.invalid, GAPI.invalidArgument, GAPI.forbidden, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.RECIPIENT, msgTo, Ent.MESSAGE, msgSubject], str(e), i, count)
else:
message['To'] = (msgTo if msgTo else mailBoxAddr).lower()
@@ -64928,11 +64928,13 @@ def createLabels(users, labelEntity):
if not buildPath:
try:
callGAPI(gmail.users().labels(), 'create',
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.DUPLICATE],
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.DUPLICATE, GAPI.PERMISSION_DENIED],
userId='me', body=body, fields='')
entityActionPerformed([Ent.USER, user, Ent.LABEL, label], l, lcount)
except GAPI.duplicate:
entityActionFailedWarning([Ent.USER, user, Ent.LABEL, label], Msg.DUPLICATE, l, lcount)
except GAPI.permissionDenied as e:
entityActionFailedWarning([Ent.USER, user, Ent.LABEL, label], str(e), l, lcount)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
else:
@@ -65213,10 +65215,10 @@ def deleteLabelIds(users, labelEntity):
l += 1
try:
callGAPI(gmail.users().labels(), 'delete',
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.INVALID],
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.INVALID, GAPI.PERMISSION_DENIED],
userId='me', id=labelId)
entityActionPerformed([Ent.USER, user, Ent.LABEL_ID, labelId], l, lcount)
except (GAPI.notFound, GAPI.invalid) as e:
except (GAPI.notFound, GAPI.invalid, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.USER, user, Ent.LABEL_ID, labelId], str(e), l, lcount)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -66080,11 +66082,11 @@ def forwardMessagesThreads(users, entityType):
try:
result = callGAPI(gmail.users().messages(), 'send',
throwReasons=[GAPI.SERVICE_NOT_AVAILABLE, GAPI.AUTH_ERROR, GAPI.DOMAIN_POLICY,
GAPI.INVALID, GAPI.INVALID_ARGUMENT, GAPI.FORBIDDEN],
GAPI.INVALID, GAPI.INVALID_ARGUMENT, GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED],
userId='me', body={'raw': base64.urlsafe_b64encode(message.as_bytes()).decode(encoding)}, fields='id')
entityActionPerformedMessage([Ent.RECIPIENT, msgTo], f"{result['id']}", k, kcount)
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy,
GAPI.invalid, GAPI.invalidArgument, GAPI.forbidden, UnicodeEncodeError) as e:
GAPI.invalid, GAPI.invalidArgument, GAPI.forbidden, GAPI.permissionDenied, UnicodeEncodeError) as e:
entityActionFailedWarning([Ent.RECIPIENT, msgTo], str(e), k, kcount)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -66398,17 +66400,17 @@ def _draftImportInsertMessage(users, operation):
else:
body['labelIds'] = ['INBOX']
result = callGAPI(gmail.users().messages(), function,
throwReasons=GAPI.GMAIL_THROW_REASONS,
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.PERMISSION_DENIED],
userId='me', body=body, fields='id', **kwargs)
else:
result = callGAPI(gmail.users().drafts(), function,
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.INVALID_ARGUMENT],
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.INVALID_ARGUMENT, GAPI.PERMISSION_DENIED],
userId='me', body={'message': body}, fields='id')
entityActionPerformed([Ent.USER, user, Ent.MESSAGE, result['id']], i, count)
except (GAPI.invalidArgument, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
except GAPI.invalidArgument as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
# gam <UserTypeEntity> draft message
# <MessageContent> (replace <Tag> <UserReplacement>)*
@@ -67574,7 +67576,7 @@ def createFilter(users):
if not buildPath:
try:
result = callGAPI(gmail.users().labels(), 'create',
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.DUPLICATE],
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.DUPLICATE, GAPI.PERMISSION_DENIED],
userId='me', body=lbody, fields='id')
entityActionPerformed([Ent.USER, user, Ent.LABEL, addLabelName], l, lcount)
addLabelId = result['id']
@@ -67595,11 +67597,12 @@ def createFilter(users):
if field in addLabelData:
body['action'][field][addLabelData[field]] = addLabelId
result = callGAPI(gmail.users().settings().filters(), 'create',
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.INVALID, GAPI.INVALID_ARGUMENT, GAPI.FAILED_PRECONDITION],
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.INVALID, GAPI.INVALID_ARGUMENT,
GAPI.FAILED_PRECONDITION, GAPI.PERMISSION_DENIED],
userId='me', body=body, fields='id')
if result:
entityActionPerformed([Ent.USER, user, Ent.FILTER, result['id']], i, count)
except (GAPI.invalid, GAPI.invalidArgument, GAPI.failedPrecondition) as e:
except (GAPI.invalid, GAPI.invalidArgument, GAPI.failedPrecondition, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.USER, user, Ent.FILTER, ''], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -67620,10 +67623,10 @@ def deleteFilters(users):
j += 1
try:
callGAPI(gmail.users().settings().filters(), 'delete',
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND],
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.PERMISSION_DENIED],
userId='me', id=filterId)
entityActionPerformed([Ent.USER, user, Ent.FILTER, filterId], j, jcount)
except GAPI.notFound as e:
except (GAPI.notFound, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.USER, user, Ent.FILTER, filterId], str(e), j, jcount)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -68339,9 +68342,11 @@ def _setImap(user, body, i, count):
if gmail:
try:
result = callGAPI(gmail.users().settings(), 'updateImap',
throwReasons=GAPI.GMAIL_THROW_REASONS,
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.PERMISSION_DENIED],
userId='me', body=body)
_showImap(user, i, count, result)
except GAPI.permissionDenied as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -68409,9 +68414,11 @@ def _setPop(user, body, i, count):
if gmail:
try:
result = callGAPI(gmail.users().settings(), 'updatePop',
throwReasons=GAPI.GMAIL_THROW_REASONS,
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.PERMISSION_DENIED],
userId='me', body=body)
_showPop(user, i, count, result)
except GAPI.permissionDenied as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -68469,9 +68476,11 @@ def setLanguage(users):
continue
try:
result = callGAPI(gmail.users().settings(), 'updateLanguage',
throwReasons=GAPI.GMAIL_THROW_REASONS,
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.PERMISSION_DENIED],
userId='me', body={'displayLanguage': language})
entityActionPerformed([Ent.USER, user, Ent.LANGUAGE, result['displayLanguage']], i, count)
except GAPI.permissionDenied as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -68874,7 +68883,7 @@ def createSmime(users):
throwReasons=GAPI.GMAIL_SMIME_THROW_REASONS,
userId='me', sendAsEmail=sendAsEmail, id=smimeId)
entityActionPerformedMessage([Ent.USER, user, Ent.SENDAS_ADDRESS, sendAsEmail, Ent.SMIME_ID, smimeId], Msg.DEFAULT_SMIME, i, count)
except (GAPI.forbidden, GAPI.invalidArgument) as e:
except (GAPI.forbidden, GAPI.invalidArgument, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -68946,7 +68955,7 @@ def updateSmime(users):
entityActionPerformedMessage([Ent.USER, user, Ent.SENDAS_ADDRESS, sendAsEmail, Ent.SMIME_ID, smimeId], Msg.DEFAULT_SMIME, i, count)
except GAPI.notFound as e:
entityActionFailedWarning([Ent.USER, user, Ent.SMIME_ID, smimeId], str(e), i, count)
except (GAPI.forbidden, GAPI.invalidArgument) as e:
except (GAPI.forbidden, GAPI.invalidArgument, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -68984,7 +68993,7 @@ def deleteSmime(users):
entityActionPerformed([Ent.USER, user, Ent.SENDAS_ADDRESS, sendAsEmail, Ent.SMIME_ID, smimeId], i, count)
except GAPI.notFound as e:
entityActionFailedWarning([Ent.USER, user, Ent.SMIME_ID, smimeId], str(e), i, count)
except (GAPI.forbidden, GAPI.invalidArgument) as e:
except (GAPI.forbidden, GAPI.invalidArgument, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)
@@ -69232,10 +69241,11 @@ def setVacation(users):
oldBody.pop('responseBodyHtml', None)
oldBody.update(body)
result = callGAPI(gmail.users().settings(), 'updateVacation',
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.INVALID_ARGUMENT, GAPI.FAILED_PRECONDITION],
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.INVALID_ARGUMENT,
GAPI.FAILED_PRECONDITION, GAPI.PERMISSION_DENIED],
userId='me', body=oldBody)
printEntity([Ent.USER, user, Ent.VACATION_ENABLED, result['enableAutoReply']], i, count)
except (GAPI.invalidArgument, GAPI.failedPrecondition) as e:
except (GAPI.invalidArgument, GAPI.failedPrecondition, GAPI.permissionDenied) as e:
entityActionFailedWarning([Ent.USER, user, Ent.VACATION_ENABLED, enable], str(e), i, count)
except (GAPI.serviceNotAvailable, GAPI.badRequest):
entityServiceNotApplicableWarning(Ent.USER, user, i, count)

View File

@@ -579,19 +579,19 @@ _SVCACCT_SCOPES = [
'api': FORMS,
'subscopes': [],
'scope': DRIVE_SCOPE},
{'name': 'Gmail API - Full Access',
{'name': 'Gmail API - Full Access (Labels, Messages)',
'api': GMAIL,
'subscopes': [],
'scope': 'https://mail.google.com/'},
{'name': 'Gmail API - Full Access except immediate delete',
{'name': 'Gmail API - Full Access (Labels, Messages) except delete message',
'api': GMAIL,
'subscopes': [],
'scope': 'https://www.googleapis.com/auth/gmail.modify'},
{'name': 'Gmail API - Basic Settings',
{'name': 'Gmail API - Basic Settings (Filters,IMAP, Language, POP, Vacation) - read/write, Sharing Settings (Delegates, Forwarding, SendAs) - read',
'api': GMAIL,
'subscopes': [],
'scope': 'https://www.googleapis.com/auth/gmail.settings.basic'},
{'name': 'Gmail API - Settings Sharing (Aliases, Delegates, Forwarding)',
{'name': 'Gmail API - Sharing Settings (Delegates, Forwarding, SendAs) - write',
'api': GMAIL,
'subscopes': [],
'scope': 'https://www.googleapis.com/auth/gmail.settings.sharing'},

View File

@@ -247,7 +247,7 @@ DRIVE3_MODIFY_LABEL_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, NO
LABEL_MUTATION_ILLEGAL_SELECTION, LABEL_MUTATION_UNKNOWN_FIELD]
GMAIL_THROW_REASONS = [SERVICE_NOT_AVAILABLE, BAD_REQUEST]
GMAIL_LIST_THROW_REASONS = [FAILED_PRECONDITION, PERMISSION_DENIED, INVALID, INVALID_ARGUMENT]
GMAIL_SMIME_THROW_REASONS = [SERVICE_NOT_AVAILABLE, BAD_REQUEST, INVALID_ARGUMENT, FORBIDDEN, NOT_FOUND]
GMAIL_SMIME_THROW_REASONS = [SERVICE_NOT_AVAILABLE, BAD_REQUEST, INVALID_ARGUMENT, FORBIDDEN, NOT_FOUND, PERMISSION_DENIED]
GROUP_GET_RETRY_REASONS = [INVALID, SYSTEM_ERROR, SERVICE_NOT_AVAILABLE]
GROUP_CREATE_THROW_REASONS = [DUPLICATE, DOMAIN_NOT_FOUND, DOMAIN_CANNOT_USE_APIS, FORBIDDEN, INVALID, INVALID_INPUT]
GROUP_GET_THROW_REASONS = [GROUP_NOT_FOUND, DOMAIN_NOT_FOUND, DOMAIN_CANNOT_USE_APIS, FORBIDDEN, BAD_REQUEST, INVALID, SYSTEM_ERROR]