Updated gam <UserTypeEntity> print|show signature

to handle the following error that occurs when an alias is specified.
```
ERROR: 404: notFound - Requested entity was not found.
This commit is contained in:
Ross Scroggs
2025-08-23 08:22:52 -07:00
parent 28d76c5aee
commit 398a91b987
3 changed files with 14 additions and 3 deletions

View File

@@ -4549,11 +4549,12 @@ gam report usage customer [todrive <ToDriveAttribute>*]
chrome| chrome|
classroom| classroom|
contextawareaccess| contextawareaccess|
gplus|currents|google+|
datastudio| datastudio|
drive|doc|docs| drive|doc|docs|
gcp|cloud| gcp|cloud|
geminiinworkspaceapps|gemini|geminiforworkspace| geminiinworkspaceapps|gemini|geminiforworkspace|
gmail|
gplus|currents|google+|
groups|group| groups|group|
groupsenterprise|enterprisegroups| groupsenterprise|enterprisegroups|
jamboard| jamboard|

View File

@@ -1,3 +1,11 @@
7.19.01
Updated `gam <UserTypeEntity> print|show signature` to handle the following error
that occurs when an alias is specified.
```
ERROR: 404: notFound - Requested entity was not found.
```
7.19.00 7.19.00
Eliminated `drive_v3_beta` and `meet_v2_beta` from `gam.cfg` as the API betas are no longer used. Eliminated `drive_v3_beta` and `meet_v2_beta` from `gam.cfg` as the API betas are no longer used.

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
""" """
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>' __author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.19.00' __version__ = '7.19.01'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position #pylint: disable=wrong-import-position
@@ -74689,7 +74689,7 @@ def printShowSignature(users):
try: try:
if selection is None: if selection is None:
sendas = callGAPI(gmail.users().settings().sendAs(), 'get', sendas = callGAPI(gmail.users().settings().sendAs(), 'get',
throwReasons=GAPI.GMAIL_THROW_REASONS, throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND],
userId='me', sendAsEmail=user) userId='me', sendAsEmail=user)
else: else:
results = callGAPIitems(gmail.users().settings().sendAs(), 'list', 'sendAs', results = callGAPIitems(gmail.users().settings().sendAs(), 'list', 'sendAs',
@@ -74718,6 +74718,8 @@ def printShowSignature(users):
if field in sendas[item]: if field in sendas[item]:
row[f'smtpMsa{GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]}{field}'] = sendas[item][field] row[f'smtpMsa{GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]}{field}'] = sendas[item][field]
csvPF.WriteRowTitles(row) csvPF.WriteRowTitles(row)
except GAPI.notFound as e:
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
except GAPI.serviceNotAvailable: except GAPI.serviceNotAvailable:
userGmailServiceNotEnabledWarning(user, i, count) userGmailServiceNotEnabledWarning(user, i, count)
if csvPF: if csvPF: