mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-10 17:21:36 +00:00
Compare commits
32 Commits
20250731.0
...
v7.18.04
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0082a5a0b9 | ||
|
|
9971cdbfb3 | ||
|
|
837bb9f84f | ||
|
|
805b196532 | ||
|
|
a23238f97f | ||
|
|
e88e2f0d7f | ||
|
|
13ed3fe80c | ||
|
|
37bfcc1251 | ||
|
|
cb7e70ce31 | ||
|
|
25006765de | ||
|
|
594164944e | ||
|
|
56ed6e8a81 | ||
|
|
159184be73 | ||
|
|
51f4f3c401 | ||
|
|
320d5425c1 | ||
|
|
6d9839a328 | ||
|
|
1002f71d32 | ||
|
|
101a01cef0 | ||
|
|
45230860f6 | ||
|
|
ef1018f286 | ||
|
|
63c0c58bf6 | ||
|
|
aa443ae6cb | ||
|
|
dbec314359 | ||
|
|
8270f0a82a | ||
|
|
2a4cd66227 | ||
|
|
a87ff9effc | ||
|
|
df793c2bbb | ||
|
|
3bc32da275 | ||
|
|
ce7e506c29 | ||
|
|
a9d8ac27d3 | ||
|
|
58912ae7ac | ||
|
|
f882439cbd |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -126,7 +126,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
cache.tar.xz
|
||||
key: gam-${{ matrix.jid }}-20250701
|
||||
key: gam-${{ matrix.jid }}-20250805
|
||||
|
||||
- name: Untar Cache archive
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||
|
||||
@@ -539,6 +539,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
Must match this Python Regular Expression: [a-zA-Z0-9 '"!-]{4,30}
|
||||
<PropertyKey> ::= <String>
|
||||
<PropertyValue> ::= <String>
|
||||
<PubSubTopicName> ::= <String>
|
||||
<QueryAlert> ::= <String>
|
||||
See: https://developers.google.com/admin-sdk/alertcenter/guides/query-filters
|
||||
<QueryBrowser> ::= <String>
|
||||
@@ -1511,15 +1512,22 @@ gam show privileges
|
||||
<RoleItem> ::= id:<String>|uid:<string>|<String>
|
||||
|
||||
gam create adminrole <String> [description <String>]
|
||||
privileges all|all_ou|<PrivilegesList>|(select <FileSelector>|<CSVFileSelector>)
|
||||
privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>)|<JSONData>
|
||||
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*]
|
||||
gam update adminrole <RoleItem> [name <String>] [description <String>]
|
||||
[privileges all|all_ou|<PrivilegesList>|(select <FileSelector>|<CSVFileSelector>)]
|
||||
[privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>)|<JSONData>]
|
||||
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*]
|
||||
gam delete adminrole <RoleItem>
|
||||
gam info adminrole <RoleItem> [privileges]
|
||||
[formatjson]
|
||||
gam print adminroles|roles [todrive <ToDriveAttribute>*]
|
||||
[role <RoleItem>] [privileges] [oneitemperrow]
|
||||
[nosystemroles]
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show adminroles|roles
|
||||
[role <RoleItem>] [privileges]
|
||||
[nosystemroles]
|
||||
[formatjson]
|
||||
|
||||
gam create|add admin <EmailAddress>|<UniqueID> <RoleItem> customer|(org_unit <OrgUnitItem>)
|
||||
[condition securitygroup|nonsecuritygroup]
|
||||
@@ -1533,6 +1541,10 @@ gam show admins
|
||||
|
||||
# Alert Center
|
||||
|
||||
gam show alertsettings
|
||||
gam update alertsettings <PubsubTopicName>
|
||||
gam clear alertsettings
|
||||
|
||||
gam delete alert <AlertID>
|
||||
gam undelete alert <AlertID>
|
||||
gam info alert <AlertID> [formatjson]
|
||||
@@ -3436,6 +3448,13 @@ gam print guardian|guardians [todrive <ToDriveAttribute>*] [accepted|invitations
|
||||
[showstudentemails]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
# Business Profile Accounts
|
||||
|
||||
gam show businessprofileaccounts
|
||||
[type locationgroup|organization|personal|usergroup]
|
||||
gam print businessprofileaccounts [todrive <ToDriveAttribute>*]
|
||||
[type locationgroup|organization|personal|usergroup]
|
||||
|
||||
# Classroom User Profiles
|
||||
|
||||
gam <UserTypeEntity> print classroomprofile [todrive <ToDriveAttribute>*]
|
||||
|
||||
@@ -1,3 +1,48 @@
|
||||
7.18.04
|
||||
|
||||
Added commands to display/manage Alert Center Pub/Sub notifications.
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Alert-Center#configuring-settings
|
||||
|
||||
7.18.03
|
||||
|
||||
Updated `gam oauth create` to give a warning if the number of selected scopes will
|
||||
probably cause Google to generate a "Something went wrong" error.
|
||||
|
||||
7.18.02
|
||||
|
||||
Upgraded to OpenSSL 3.5.2.
|
||||
|
||||
7.18.01
|
||||
|
||||
Added option `nosystemroles` to `gam print|show adminroles` that causes GAM
|
||||
to only display non-system roles.
|
||||
|
||||
Added option `formatjson` to `gam info|print|show adminroles`; this will be most useful
|
||||
when the `privileges` option is used.
|
||||
|
||||
Updated `gam create|update adminrole` to allow specification of privileges with
|
||||
JSON data: `privileges <JSONData>`. These two updates make it easier to copy admin roles.
|
||||
|
||||
Updated `gam create|update adminrole` to allow output of the created/updated
|
||||
role data in CSV format; by default, GAM displays `<RoleName>(<RoleID>) created|updated`.
|
||||
```
|
||||
csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*
|
||||
```
|
||||
|
||||
7.18.00
|
||||
|
||||
Added commands to display Business Profile Accounts.
|
||||
These are special purpose commands and will not generally be used.
|
||||
```
|
||||
gam show businessprofileaccounts
|
||||
gam print businessprofileaccounts [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
|
||||
7.17.03
|
||||
|
||||
Fixed bug in `gam <UserItem> print|show chatspaces asadmin fields <ChatSpaceFieldNameList>` that caused a trap
|
||||
when `displayname` was not in `<ChatSpaceFieldNameList>`.
|
||||
|
||||
7.17.02
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show webmastersites` to handle the following error
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.17.02'
|
||||
__version__ = '7.18.04'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -5579,7 +5579,12 @@ def buildGAPIObject(api, credentials=None):
|
||||
try:
|
||||
API_Scopes = set(list(service._rootDesc['auth']['oauth2']['scopes']))
|
||||
except KeyError:
|
||||
API_Scopes = set(API.VAULT_SCOPES) if api == API.VAULT else set()
|
||||
if api == API.VAULT:
|
||||
API_Scopes = set(API.VAULT_SCOPES)
|
||||
elif api == API.BUSINESSACCOUNTMANAGEMENT:
|
||||
API_Scopes = {API.BUSINESSACCOUNTMANAGEMENT_SCOPE}
|
||||
else:
|
||||
API_Scopes = set()
|
||||
GM.Globals[GM.CURRENT_CLIENT_API] = api
|
||||
GM.Globals[GM.CURRENT_CLIENT_API_SCOPES] = API_Scopes.intersection(GM.Globals[GM.CREDENTIALS_SCOPES])
|
||||
if api not in API.SCOPELESS_APIS and not GM.Globals[GM.CURRENT_CLIENT_API_SCOPES]:
|
||||
@@ -10667,9 +10672,6 @@ Select all default scopes by entering an 's'; yields [*] for default scopes, [ ]
|
||||
Unselect all scopes by entering a 'u'; yields [ ] for all scopes
|
||||
Exit without changes/authorization by entering an 'e'
|
||||
Continue to authorization by entering a 'c'
|
||||
'''
|
||||
if clientAccess:
|
||||
oauth2_menu += ''' Note, if all scopes are selected, Google will probably generate an authorization error
|
||||
'''
|
||||
menu = oauth2_menu % tuple(range(numScopes))
|
||||
selectedScopes = ['*'] * numScopes
|
||||
@@ -10771,7 +10773,25 @@ Continue to authorization by entering a 'c'
|
||||
break
|
||||
sys.stdout.write(f'{ERROR_PREFIX}Invalid input "{choice}"\n')
|
||||
if selection == 'c':
|
||||
break
|
||||
if clientAccess:
|
||||
numSelectedScopes = 0
|
||||
i = 0
|
||||
for a_scope in scopesList:
|
||||
if selectedScopes[i] == '*':
|
||||
if a_scope['scope']:
|
||||
numSelectedScopes += 1
|
||||
elif selectedScopes[i] != ' ':
|
||||
numSelectedScopes += 1
|
||||
i += 1
|
||||
if numSelectedScopes <= API.NUM_CLIENT_SCOPES_ERROR_LIMIT:
|
||||
break
|
||||
# If number of scopes is > 48 we'll probably get an error
|
||||
writeStdout(Msg.NUM_SELECTED_CLIENT_SCOPES.format(numSelectedScopes, API.NUM_CLIENT_SCOPES_ERROR_LIMIT))
|
||||
choice = readStdin('\nPlease enter c to continue to authorization or any other key to amend selection: ')
|
||||
if choice and choice.lower() == 'c':
|
||||
break
|
||||
else:
|
||||
break
|
||||
return selectedScopes
|
||||
|
||||
def _localhost_to_ip():
|
||||
@@ -16616,10 +16636,14 @@ def getRoleId():
|
||||
invalidChoiceExit(role, GM.Globals[GM.MAP_ROLE_NAME_TO_ID], True)
|
||||
return (role, roleId)
|
||||
|
||||
PRINT_ADMIN_ROLES_FIELDS = ['roleId', 'roleName', 'roleDescription', 'isSuperAdminRole', 'isSystemRole']
|
||||
|
||||
# gam create adminrole <String> [description <String>]
|
||||
# privileges all|all_ou|<PrivilegesList>|(select <FileSelector>|<CSVFileSelector>)
|
||||
# privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>)|<JSONData>
|
||||
# [csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*]
|
||||
# gam update adminrole <RoleItem> [name <String>] [description <String>]
|
||||
# [privileges all|all_ou|<PrivilegesList>|(select <FileSelector>|<CSVFileSelector>)]
|
||||
# [privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>)|<JSONData>]
|
||||
# [csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*]
|
||||
def doCreateUpdateAdminRoles():
|
||||
def expandChildPrivileges(privilege):
|
||||
for childPrivilege in privilege.get('childPrivileges', []):
|
||||
@@ -16636,6 +16660,9 @@ def doCreateUpdateAdminRoles():
|
||||
allPrivileges = {}
|
||||
ouPrivileges = {}
|
||||
childPrivileges = {}
|
||||
csvPF = None
|
||||
FJQC = FormatJSONQuoteChar(None)
|
||||
addCSVData = {}
|
||||
for privilege in _listPrivileges(cd):
|
||||
allPrivileges[privilege['privilegeName']] = privilege['serviceId']
|
||||
if privilege['isOuScopable']:
|
||||
@@ -16649,6 +16676,8 @@ def doCreateUpdateAdminRoles():
|
||||
body['rolePrivileges'] = [{'privilegeName': p, 'serviceId': v} for p, v in allPrivileges.items()]
|
||||
elif privs == 'ALL_OU':
|
||||
body['rolePrivileges'] = [{'privilegeName': p, 'serviceId': v} for p, v in ouPrivileges.items()]
|
||||
elif privs == 'JSON':
|
||||
body['rolePrivileges'] = getJSON(['roleId', 'roleName', 'isAdminRole', 'isSystemRole']).get('rolePrivileges', [])
|
||||
else:
|
||||
if privs == 'SELECT':
|
||||
privsList = [p.upper() for p in getEntityList(Cmd.OB_PRIVILEGE_LIST)]
|
||||
@@ -16670,25 +16699,59 @@ def doCreateUpdateAdminRoles():
|
||||
else:
|
||||
invalidChoiceExit(p, list(allPrivileges.keys())+list(ouPrivileges.keys())+list(childPrivileges.keys()), True)
|
||||
elif myarg == 'description':
|
||||
body['roleDescription'] = getString(Cmd.OB_STRING)
|
||||
body['roleDescription'] = getString(Cmd.OB_STRING, minLen=0)
|
||||
elif myarg == 'name':
|
||||
body['roleName'] = getString(Cmd.OB_STRING)
|
||||
elif myarg == 'csv':
|
||||
csvPF = CSVPrintFile(PRINT_ADMIN_ROLES_FIELDS)
|
||||
FJQC.SetCsvPF(csvPF)
|
||||
elif csvPF and myarg == 'todrive':
|
||||
csvPF.GetTodriveParameters()
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
else:
|
||||
unknownArgumentExit()
|
||||
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
||||
if not updateCmd and not body.get('rolePrivileges'):
|
||||
missingArgumentExit('privileges')
|
||||
if csvPF:
|
||||
if addCSVData:
|
||||
csvPF.AddTitles(sorted(addCSVData.keys()))
|
||||
if not FJQC.formatJSON:
|
||||
csvPF.AddTitles('rolePrivileges')
|
||||
else:
|
||||
csvPF.AddJSONTitles(sorted(addCSVData.keys()))
|
||||
csvPF.MoveJSONTitlesToEnd(['JSON'])
|
||||
fieldsList = ','.join(PRINT_ADMIN_ROLES_FIELDS+['rolePrivileges'])
|
||||
else:
|
||||
fieldsList = 'roleId,roleName'
|
||||
try:
|
||||
if not updateCmd:
|
||||
result = callGAPI(cd.roles(), 'insert',
|
||||
throwReasons=[GAPI.BAD_REQUEST, GAPI.CUSTOMER_NOT_FOUND,
|
||||
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED]+[GAPI.DUPLICATE],
|
||||
customer=GC.Values[GC.CUSTOMER_ID], body=body, fields='roleId,roleName')
|
||||
customer=GC.Values[GC.CUSTOMER_ID], body=body, fields=fieldsList)
|
||||
else:
|
||||
result = callGAPI(cd.roles(), 'patch',
|
||||
throwReasons=[GAPI.BAD_REQUEST, GAPI.CUSTOMER_NOT_FOUND,
|
||||
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED]+[GAPI.NOT_FOUND, GAPI.FAILED_PRECONDITION, GAPI.CONFLICT],
|
||||
customer=GC.Values[GC.CUSTOMER_ID], roleId=roleId, body=body, fields='roleId,roleName')
|
||||
entityActionPerformed([Ent.ADMIN_ROLE, f"{result['roleName']}({result['roleId']})"])
|
||||
customer=GC.Values[GC.CUSTOMER_ID], roleId=roleId, body=body, fields=fieldsList)
|
||||
if not csvPF:
|
||||
entityActionPerformed([Ent.ADMIN_ROLE, f"{result['roleName']}({result['roleId']})"])
|
||||
else:
|
||||
if not FJQC.formatJSON:
|
||||
if addCSVData:
|
||||
result.update(addCSVData)
|
||||
csvPF.WriteRowNoFilter(result)
|
||||
else:
|
||||
row = {}
|
||||
for field in PRINT_ADMIN_ROLES_FIELDS:
|
||||
if field in result:
|
||||
row[field] = result[field]
|
||||
if addCSVData:
|
||||
row.update(addCSVData)
|
||||
row['JSON'] = json.dumps(cleanJSON(result), ensure_ascii=False, sort_keys=True)
|
||||
csvPF.WriteRowNoFilter(row)
|
||||
except GAPI.duplicate as e:
|
||||
entityActionFailedWarning([Ent.ADMIN_ROLE, f"{body['roleName']}"], str(e))
|
||||
except (GAPI.notFound, GAPI.failedPrecondition, GAPI.conflict) as e:
|
||||
@@ -16697,6 +16760,8 @@ def doCreateUpdateAdminRoles():
|
||||
accessErrorExit(cd)
|
||||
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
||||
ClientAPIAccessDeniedExit(str(e))
|
||||
if csvPF:
|
||||
csvPF.writeCSVfile('Admin Roles')
|
||||
|
||||
# gam delete adminrole <RoleItem>
|
||||
def doDeleteAdminRole():
|
||||
@@ -16716,9 +16781,10 @@ def doDeleteAdminRole():
|
||||
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
||||
ClientAPIAccessDeniedExit(str(e))
|
||||
|
||||
PRINT_ADMIN_ROLES_FIELDS = ['roleId', 'roleName', 'roleDescription', 'isSuperAdminRole', 'isSystemRole']
|
||||
|
||||
def _showAdminRole(role, i=0, count=0):
|
||||
def _showAdminRole(role, FJQC, i=0, count=0):
|
||||
if FJQC.formatJSON:
|
||||
printLine(json.dumps(cleanJSON(role), ensure_ascii=False, sort_keys=True))
|
||||
return
|
||||
printEntity([Ent.ADMIN_ROLE, role['roleName']], i, count)
|
||||
Ind.Increment()
|
||||
for field in PRINT_ADMIN_ROLES_FIELDS:
|
||||
@@ -16739,15 +16805,21 @@ def _showAdminRole(role, i=0, count=0):
|
||||
Ind.Decrement()
|
||||
|
||||
# gam info adminrole <RoleItem> [privileges]
|
||||
# [formatjson]
|
||||
# gam print adminroles|roles [todrive <ToDriveAttribute>*]
|
||||
# [role <RoleItem>] [privileges] [oneitemperrow]
|
||||
# [nosystemroles]
|
||||
# [formatjson [quotechar <Character>]]
|
||||
# gam show adminroles|roles
|
||||
# [role <RoleItem>] [privileges]
|
||||
# [nosystemroles]
|
||||
# [formatjson]
|
||||
def doInfoPrintShowAdminRoles():
|
||||
cd = buildGAPIObject(API.DIRECTORY)
|
||||
fieldsList = PRINT_ADMIN_ROLES_FIELDS[:]
|
||||
csvPF = CSVPrintFile(fieldsList, PRINT_ADMIN_ROLES_FIELDS) if Act.csvFormat() else None
|
||||
oneItemPerRow = False
|
||||
FJQC = FormatJSONQuoteChar(csvPF)
|
||||
noSystemRoles = oneItemPerRow = False
|
||||
if Act.Get() != Act.INFO:
|
||||
roleId = None
|
||||
else:
|
||||
@@ -16762,13 +16834,17 @@ def doInfoPrintShowAdminRoles():
|
||||
fieldsList.append('rolePrivileges')
|
||||
elif myarg == 'oneitemperrow':
|
||||
oneItemPerRow = True
|
||||
elif myarg == 'nosystemroles':
|
||||
noSystemRoles = True
|
||||
else:
|
||||
unknownArgumentExit()
|
||||
if csvPF and 'rolePrivileges' in fieldsList:
|
||||
if not oneItemPerRow:
|
||||
csvPF.AddTitles(['rolePrivileges'])
|
||||
else:
|
||||
csvPF.AddTitles(['privilegeName', 'serviceId'])
|
||||
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
||||
if csvPF:
|
||||
if 'rolePrivileges' in fieldsList:
|
||||
if not oneItemPerRow:
|
||||
if not FJQC.formatJSON:
|
||||
csvPF.AddTitles(['rolePrivileges'])
|
||||
else:
|
||||
csvPF.AddTitles(['privilegeName', 'serviceId'])
|
||||
try:
|
||||
if roleId is None:
|
||||
fields = getItemFieldsFromFieldsList('items', fieldsList)
|
||||
@@ -16778,6 +16854,8 @@ def doInfoPrintShowAdminRoles():
|
||||
throwReasons=[GAPI.BAD_REQUEST, GAPI.CUSTOMER_NOT_FOUND,
|
||||
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED],
|
||||
customer=GC.Values[GC.CUSTOMER_ID], fields=fields)
|
||||
if noSystemRoles:
|
||||
roles = [role for role in roles if not role.get('isSystemRole', False)]
|
||||
else:
|
||||
fields = getFieldsFromFieldsList(fieldsList)
|
||||
roles = [callGAPI(cd.roles(), 'get',
|
||||
@@ -16796,23 +16874,38 @@ def doInfoPrintShowAdminRoles():
|
||||
role.setdefault('isSystemRole', False)
|
||||
if not csvPF:
|
||||
count = len(roles)
|
||||
performActionNumItems(count, Ent.ADMIN_ROLE)
|
||||
if not FJQC.formatJSON:
|
||||
performActionNumItems(count, Ent.ADMIN_ROLE)
|
||||
Ind.Increment()
|
||||
i = 0
|
||||
for role in roles:
|
||||
i += 1
|
||||
_showAdminRole(role, i, count)
|
||||
_showAdminRole(role, FJQC, i, count)
|
||||
Ind.Decrement()
|
||||
else:
|
||||
for role in roles:
|
||||
if not oneItemPerRow or 'rolePrivileges' not in role:
|
||||
csvPF.WriteRowTitles(flattenJSON(role))
|
||||
row = flattenJSON(role)
|
||||
if not FJQC.formatJSON:
|
||||
csvPF.WriteRowTitles(row)
|
||||
elif csvPF.CheckRowTitles(row):
|
||||
row = {}
|
||||
for field in PRINT_ADMIN_ROLES_FIELDS:
|
||||
if field in role:
|
||||
row[field] = role[field]
|
||||
row['JSON'] = json.dumps(cleanJSON(role), ensure_ascii=False, sort_keys=True)
|
||||
csvPF.WriteRowNoFilter(row)
|
||||
else:
|
||||
privileges = role.pop('rolePrivileges')
|
||||
baserow = flattenJSON(role)
|
||||
for privilege in privileges:
|
||||
row = flattenJSON(privilege, flattened=baserow.copy())
|
||||
csvPF.WriteRowTitles(row)
|
||||
if not FJQC.formatJSON:
|
||||
csvPF.WriteRowTitles(row)
|
||||
elif csvPF.CheckRowTitles(row):
|
||||
row = baserow.copy()
|
||||
row['JSON'] = json.dumps(cleanJSON(privilege), ensure_ascii=False, sort_keys=True)
|
||||
csvPF.WriteRowNoFilter(row)
|
||||
if csvPF:
|
||||
csvPF.writeCSVfile('Admin Roles')
|
||||
|
||||
@@ -26940,7 +27033,7 @@ def printShowChatSpaces(users):
|
||||
substituteQueryTimes(queries, queryTimes)
|
||||
pfilter = kwargsCS['query'] = queries[0]
|
||||
kwargsCS['useAdminAccess'] = True
|
||||
sortName = 'displayName'
|
||||
sortName = 'displayName' if 'displayName' in fieldsList else 'name'
|
||||
else:
|
||||
sortName = 'name'
|
||||
for user in users:
|
||||
@@ -26988,6 +27081,8 @@ def _getChatMemberEmail(cd, member):
|
||||
if member['member']['type'] == 'HUMAN':
|
||||
_, memberUid = member['member']['name'].split('/')
|
||||
member['member']['email'], _ = convertUIDtoEmailAddressWithType(f'uid:{memberUid}', cd, None, emailTypes=['user'])
|
||||
if member['member']['email'].find('@') == -1:
|
||||
member['member']['email'] = 'id:'+member['member']['email']
|
||||
elif 'groupMember' in member:
|
||||
_, memberUid = member['groupMember']['name'].split('/')
|
||||
member['groupMember']['email'], _ = convertUIDtoEmailAddressWithType(f'uid:{memberUid}', cd, None, emailTypes=['group'])
|
||||
@@ -37705,6 +37800,54 @@ def doDeleteOrUndeleteAlert():
|
||||
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.permissionDenied):
|
||||
userAlertsServiceNotEnabledWarning(user)
|
||||
|
||||
def _showAlertSettings(settings):
|
||||
notifications = settings.get('notifications', [])
|
||||
count = len(notifications)
|
||||
entityPerformAction([Ent.ALERT_SETTINGS, None])
|
||||
i = 0
|
||||
for notification in notifications:
|
||||
i += 1
|
||||
printEntity([Ent.NOTIFICATION, None], i, count)
|
||||
Ind.Increment()
|
||||
showJSON(None, notification)
|
||||
Ind.Decrement()
|
||||
|
||||
# gam show alertsettings
|
||||
def doShowAlertSettings():
|
||||
checkForExtraneousArguments()
|
||||
user, ac = buildGAPIServiceObject(API.ALERTCENTER, _getAdminEmail())
|
||||
if not ac:
|
||||
return
|
||||
try:
|
||||
settings = callGAPI(ac.v1beta1(), 'getSettings',
|
||||
throwReasons=GAPI.ALERT_THROW_REASONS)
|
||||
_showAlertSettings(settings)
|
||||
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.permissionDenied):
|
||||
userAlertsServiceNotEnabledWarning(user)
|
||||
|
||||
# gam update alertsettings <PubsubTopicName>
|
||||
def doUpdateAlertSettings(clear=False):
|
||||
if not clear:
|
||||
body = {'notifications':
|
||||
[{'cloudPubsubTopic': {'topicName': getString(Cmd.OB_PUBSUB_TOPIC_NAME)}}]}
|
||||
else:
|
||||
body = {'notifications': []}
|
||||
checkForExtraneousArguments()
|
||||
user, ac = buildGAPIServiceObject(API.ALERTCENTER, _getAdminEmail())
|
||||
if not ac:
|
||||
return
|
||||
try:
|
||||
settings = callGAPI(ac.v1beta1(), 'updateSettings',
|
||||
throwReasons=GAPI.ALERT_THROW_REASONS,
|
||||
body=body)
|
||||
_showAlertSettings(settings)
|
||||
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.permissionDenied):
|
||||
userAlertsServiceNotEnabledWarning(user)
|
||||
|
||||
# gam clear alertsettings
|
||||
def doClearAlertSettings():
|
||||
doUpdateAlertSettings(clear=True)
|
||||
|
||||
ALERT_TIME_OBJECTS = {'createTime', 'startTime', 'endTime'}
|
||||
|
||||
def _showAlert(alert, FJQC, i=0, count=0):
|
||||
@@ -47069,6 +47212,51 @@ def doUpdateSiteVerification():
|
||||
_showSiteVerificationInfo(verify_result)
|
||||
printKeyValueList([Msg.YOU_CAN_ADD_DOMAIN_TO_ACCOUNT.format(a_domain, GC.Values[GC.DOMAIN])])
|
||||
|
||||
PROFILE_ACCOUNT_TYPE_MAP = {
|
||||
'locationgroup': 'LOCATION_GROUP',
|
||||
'organization': 'ORGANIZATION',
|
||||
'personal': 'PERSONAL',
|
||||
'usergroup': 'USER_GROUP',
|
||||
}
|
||||
|
||||
# gam show businessprofileaccounts
|
||||
# [type locationgroup|organization|personal|usergroup]
|
||||
# gam print businessprofileaccounts [todrive <ToDriveAttribute>*]
|
||||
# [type locationgroup|organization|personal|usergroup]
|
||||
def doPrintShowBusinessProfileAccounts():
|
||||
bp = buildGAPIObject(API.BUSINESSACCOUNTMANAGEMENT)
|
||||
csvPF = CSVPrintFile(['name', 'accountName']) if Act.csvFormat() else None
|
||||
kwargs = {}
|
||||
while Cmd.ArgumentsRemaining():
|
||||
myarg = getArgument()
|
||||
if csvPF and myarg == 'todrive':
|
||||
csvPF.GetTodriveParameters()
|
||||
elif myarg == 'type':
|
||||
kwargs['filter'] = f'type={getChoice(PROFILE_ACCOUNT_TYPE_MAP, mapChoice=True)}'
|
||||
else:
|
||||
unknownArgumentExit()
|
||||
try:
|
||||
accounts = callGAPIpages(bp.accounts(), 'list', 'accounts',
|
||||
throwReasons=[GAPI.PERMISSION_DENIED],
|
||||
**kwargs)
|
||||
except GAPI.permissionDenied as e:
|
||||
accessErrorExitNonDirectory(API.BUSINESSACCOUNTMANAGEMENT, str(e))
|
||||
if not csvPF:
|
||||
count = len(accounts)
|
||||
i = 0
|
||||
for account in sorted(accounts, key=lambda k: k['name']):
|
||||
i += 1
|
||||
printKeyValueListWithCount(['Account', account['name']], i, count)
|
||||
Ind.Increment()
|
||||
showJSON(None, account)
|
||||
Ind.Decrement()
|
||||
else:
|
||||
for account in accounts:
|
||||
row = flattenJSON(account, flattened={'name': account['name'], 'accountName': account['accountName']})
|
||||
csvPF.WriteRowTitles(row)
|
||||
if csvPF:
|
||||
csvPF.writeCSVfile('Business Profile Accounts')
|
||||
|
||||
# gam info verify|verification
|
||||
def doInfoSiteVerification():
|
||||
verif = buildGAPIObject(API.SITEVERIFICATION)
|
||||
@@ -77047,7 +77235,8 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
),
|
||||
'clear':
|
||||
(Act.CLEAR,
|
||||
{Cmd.ARG_CONTACT: doClearDomainContacts,
|
||||
{Cmd.ARG_ALERTSETTINGS: doClearAlertSettings,
|
||||
Cmd.ARG_CONTACT: doClearDomainContacts,
|
||||
}
|
||||
),
|
||||
'close':
|
||||
@@ -77237,6 +77426,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_BROWSER: doPrintShowBrowsers,
|
||||
Cmd.ARG_BROWSERTOKEN: doPrintShowBrowserTokens,
|
||||
Cmd.ARG_BUILDING: doPrintShowBuildings,
|
||||
Cmd.ARG_BUSINESSPROFILEACCOUNT: doPrintShowBusinessProfileAccounts,
|
||||
Cmd.ARG_CAALEVEL: doPrintShowCAALevels,
|
||||
Cmd.ARG_CHANNELCUSTOMER: doPrintShowChannelCustomers,
|
||||
Cmd.ARG_CHANNELCUSTOMERENTITLEMENT: doPrintShowChannelCustomerEntitlements,
|
||||
@@ -77367,9 +77557,11 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_ADMIN: doPrintShowAdmins,
|
||||
Cmd.ARG_ALERT: doPrintShowAlerts,
|
||||
Cmd.ARG_ALERTFEEDBACK: doPrintShowAlertFeedback,
|
||||
Cmd.ARG_ALERTSETTINGS: doShowAlertSettings,
|
||||
Cmd.ARG_BROWSER: doPrintShowBrowsers,
|
||||
Cmd.ARG_BROWSERTOKEN: doPrintShowBrowserTokens,
|
||||
Cmd.ARG_BUILDING: doPrintShowBuildings,
|
||||
Cmd.ARG_BUSINESSPROFILEACCOUNT: doPrintShowBusinessProfileAccounts,
|
||||
Cmd.ARG_CAALEVEL: doPrintShowCAALevels,
|
||||
Cmd.ARG_CHANNELCUSTOMER: doPrintShowChannelCustomers,
|
||||
Cmd.ARG_CHANNELCUSTOMERENTITLEMENT: doPrintShowChannelCustomerEntitlements,
|
||||
@@ -77458,6 +77650,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
||||
'update':
|
||||
(Act.UPDATE,
|
||||
{Cmd.ARG_ADMINROLE: doCreateUpdateAdminRoles,
|
||||
Cmd.ARG_ALERTSETTINGS: doUpdateAlertSettings,
|
||||
Cmd.ARG_ALIAS: doCreateUpdateAliases,
|
||||
Cmd.ARG_BROWSER: doUpdateBrowsers,
|
||||
Cmd.ARG_BUILDING: doUpdateBuilding,
|
||||
@@ -77556,6 +77749,7 @@ MAIN_COMMANDS_OBJ_ALIASES = {
|
||||
Cmd.ARG_BUCKET: Cmd.ARG_STORAGEBUCKET,
|
||||
Cmd.ARG_BUCKETS: Cmd.ARG_STORAGEBUCKET,
|
||||
Cmd.ARG_BUILDINGS: Cmd.ARG_BUILDING,
|
||||
Cmd.ARG_BUSINESSPROFILEACCOUNTS: Cmd.ARG_BUSINESSPROFILEACCOUNT,
|
||||
Cmd.ARG_CAALEVELS: Cmd.ARG_CAALEVEL,
|
||||
Cmd.ARG_CHATMEMBERS: Cmd.ARG_CHATMEMBER,
|
||||
Cmd.ARG_CHANNELCUSTOMERS: Cmd.ARG_CHANNELCUSTOMER,
|
||||
|
||||
@@ -24,6 +24,7 @@ ACCESSCONTEXTMANAGER = 'accesscontextmanager'
|
||||
ALERTCENTER = 'alertcenter'
|
||||
ANALYTICS_ADMIN = 'analyticsadmin'
|
||||
CALENDAR = 'calendar'
|
||||
BUSINESSACCOUNTMANAGEMENT = 'mybusinessaccountmanagement'
|
||||
CBCM = 'cbcm'
|
||||
CHAT = 'chat'
|
||||
CHAT_CUSTOM_EMOJIS = 'chatcustomemojis'
|
||||
@@ -101,6 +102,7 @@ TASKS = 'tasks'
|
||||
VAULT = 'vault'
|
||||
YOUTUBE = 'youtube'
|
||||
#
|
||||
BUSINESSACCOUNTMANAGEMENT_SCOPE = 'https://www.googleapis.com/auth/business.manage'
|
||||
CHROMEVERSIONHISTORY_URL = 'https://versionhistory.googleapis.com/v1/chrome/platforms'
|
||||
DRIVE_SCOPE = 'https://www.googleapis.com/auth/drive'
|
||||
GMAIL_SEND_SCOPE = 'https://www.googleapis.com/auth/gmail.send'
|
||||
@@ -117,6 +119,7 @@ USERINFO_PROFILE_SCOPE = 'https://www.googleapis.com/auth/userinfo.profile' # pr
|
||||
VAULT_SCOPES = ['https://www.googleapis.com/auth/ediscovery', 'https://www.googleapis.com/auth/ediscovery.readonly']
|
||||
REQUIRED_SCOPES = [USERINFO_EMAIL_SCOPE, USERINFO_PROFILE_SCOPE]
|
||||
REQUIRED_SCOPES_SET = set(REQUIRED_SCOPES)
|
||||
NUM_CLIENT_SCOPES_ERROR_LIMIT = 48
|
||||
#
|
||||
JWT_APIS = {
|
||||
ACCESSCONTEXTMANAGER: [CLOUD_PLATFORM_SCOPE],
|
||||
@@ -174,6 +177,7 @@ PROJECT_APIS = [
|
||||
'alertcenter.googleapis.com',
|
||||
'analyticsadmin.googleapis.com',
|
||||
# 'audit.googleapis.com',
|
||||
'mybusinessaccountmanagement.googleapis.com',
|
||||
'calendar-json.googleapis.com',
|
||||
'chat.googleapis.com',
|
||||
'chromemanagement.googleapis.com',
|
||||
@@ -213,6 +217,7 @@ _INFO = {
|
||||
ACCESSCONTEXTMANAGER: {'name': 'Access Context Manager API', 'version': 'v1', 'v2discovery': True},
|
||||
ALERTCENTER: {'name': 'AlertCenter API', 'version': 'v1beta1', 'v2discovery': True},
|
||||
ANALYTICS_ADMIN: {'name': 'Analytics Admin API', 'version': 'v1beta', 'v2discovery': True},
|
||||
BUSINESSACCOUNTMANAGEMENT: {'name': 'Business Account Management API', 'version': 'v1', 'v2discovery': True},
|
||||
CALENDAR: {'name': 'Calendar API', 'version': 'v3', 'v2discovery': True, 'mappedAPI': 'calendar-json'},
|
||||
CBCM: {'name': 'Chrome Browser Cloud Management API', 'version': 'v1.1beta1', 'v2discovery': True, 'localjson': True},
|
||||
CHAT: {'name': 'Chat API', 'version': 'v1', 'v2discovery': True},
|
||||
@@ -293,6 +298,11 @@ _INFO = {
|
||||
READONLY = ['readonly',]
|
||||
|
||||
_CLIENT_SCOPES = [
|
||||
{'name': 'Business Account Management API',
|
||||
'api': BUSINESSACCOUNTMANAGEMENT,
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': BUSINESSACCOUNTMANAGEMENT_SCOPE},
|
||||
{'name': 'Calendar API',
|
||||
'api': CALENDAR,
|
||||
'subscopes': READONLY,
|
||||
|
||||
@@ -411,6 +411,7 @@ class GamCLArgs():
|
||||
ARG_ALERTFEEDBACK = 'alertfeedback'
|
||||
ARG_ALERTFEEDBACKS = 'alertfeedbacks'
|
||||
ARG_ALERTSFEEDBACK = 'alertsfeedback'
|
||||
ARG_ALERTSETTINGS = 'alertsettings'
|
||||
ARG_ALIAS = 'alias'
|
||||
ARG_ALIASES = 'aliases'
|
||||
ARG_ALIASDOMAIN = 'aliasdomain'
|
||||
@@ -441,6 +442,8 @@ class GamCLArgs():
|
||||
ARG_BUCKETS = 'buckets'
|
||||
ARG_BUILDING = 'building'
|
||||
ARG_BUILDINGS = 'buildings'
|
||||
ARG_BUSINESSPROFILEACCOUNT = 'businessprofileaccount'
|
||||
ARG_BUSINESSPROFILEACCOUNTS = 'businessprofileaccounts'
|
||||
ARG_CAALEVEL = 'caalevel'
|
||||
ARG_CAALEVELS = 'caalevels'
|
||||
ARG_CALATTENDEES = 'calattendees'
|
||||
@@ -1011,6 +1014,7 @@ class GamCLArgs():
|
||||
OB_PROJECT_ID_ENTITY = 'ProjectIDEntity'
|
||||
OB_PROPERTY_KEY = 'PropertyKey'
|
||||
OB_PROPERTY_VALUE = 'PropertyValue'
|
||||
OB_PUBSUB_TOPIC_NAME = 'PubSubTopicName'
|
||||
OB_QUERY = 'Query'
|
||||
OB_QUERY_ITEM = 'QueryItem'
|
||||
OB_QUERY_LIST = 'QueryList'
|
||||
|
||||
@@ -54,6 +54,7 @@ class GamEntity():
|
||||
ALERT_ID = 'alri'
|
||||
ALERT_FEEDBACK = 'alfb'
|
||||
ALERT_FEEDBACK_ID = 'alfi'
|
||||
ALERT_SETTINGS = 'alrs'
|
||||
ALIAS = 'alia'
|
||||
ALIAS_EMAIL = 'alie'
|
||||
ALIAS_TARGET = 'alit'
|
||||
@@ -75,6 +76,7 @@ class GamEntity():
|
||||
BACKUP_VERIFICATION_CODES = 'buvc'
|
||||
BUILDING = 'bldg'
|
||||
BUILDING_ID = 'bldi'
|
||||
BUSINESS_PROFILE_ACCOUNT = 'bpac'
|
||||
CAA_LEVEL = 'calv'
|
||||
CALENDAR = 'cale'
|
||||
CALENDAR_ACL = 'cacl'
|
||||
@@ -284,10 +286,11 @@ class GamEntity():
|
||||
MIMETYPE = 'mime'
|
||||
MOBILE_DEVICE = 'mobi'
|
||||
NAME = 'name'
|
||||
NONEDITABLE_ALIAS = 'neal'
|
||||
NOTE = 'note'
|
||||
NOTE_ACL = 'nota'
|
||||
NOTES_ACLS = 'naac'
|
||||
NONEDITABLE_ALIAS = 'neal'
|
||||
NOTIFICATION = 'noti'
|
||||
OAUTH2_TXT_FILE = 'oaut'
|
||||
OAUTH2SERVICE_JSON_FILE = 'oau2'
|
||||
ORGANIZATIONAL_UNIT = 'orgu'
|
||||
@@ -413,6 +416,7 @@ class GamEntity():
|
||||
ALERT_ID: ['Alert IDs', 'Alert ID'],
|
||||
ALERT_FEEDBACK: ['Alert Feedbacks', 'Alert Feedback'],
|
||||
ALERT_FEEDBACK_ID: ['Alert Feedback IDs', 'Alert Feedback ID'],
|
||||
ALERT_SETTINGS: ['Alert Settings', 'Alert Settings'],
|
||||
ALIAS: ['Aliases', 'Alias'],
|
||||
ALIAS_EMAIL: ['Alias Emails', 'Alias Email'],
|
||||
ALIAS_TARGET: ['Alias Targets', 'Alias Target'],
|
||||
@@ -434,6 +438,7 @@ class GamEntity():
|
||||
BACKUP_VERIFICATION_CODES: ['Backup Verification Codes', 'Backup Verification Codes'],
|
||||
BUILDING: ['Buildings', 'Building'],
|
||||
BUILDING_ID: ['Building IDs', 'Building ID'],
|
||||
BUSINESS_PROFILE_ACCOUNT: ['Business Profile Accounts', 'Business Profile Account'],
|
||||
CAA_LEVEL: ['CAA Levels', 'CAA Level'],
|
||||
CALENDAR: ['Calendars', 'Calendar'],
|
||||
CALENDAR_ACL: ['Calendar ACLs', 'Calendar ACL'],
|
||||
@@ -643,10 +648,11 @@ class GamEntity():
|
||||
MIMETYPE: ['MIME Types', 'MIME Type'],
|
||||
MOBILE_DEVICE: ['Mobile Devices', 'Mobile Device'],
|
||||
NAME: ['Names', 'Name'],
|
||||
NONEDITABLE_ALIAS: ['Non-Editable Aliases', 'Non-Editable Alias'],
|
||||
NOTE: ['Notes', 'Note'],
|
||||
NOTE_ACL: ['Note ACLs', 'Note ACL'],
|
||||
NOTES_ACLS: ["'Note's ACLs", "Note's ACLs"],
|
||||
NONEDITABLE_ALIAS: ['Non-Editable Aliases', 'Non-Editable Alias'],
|
||||
NOTIFICATION: ['Notifications', 'Notification'],
|
||||
OAUTH2_TXT_FILE: ['Client OAuth2 File', 'Client OAuth2 File'],
|
||||
OAUTH2SERVICE_JSON_FILE: ['Service Account OAuth2 File', 'Service Account OAuth2 File'],
|
||||
ORGANIZATIONAL_UNIT: ['Organizational Units', 'Organizational Unit'],
|
||||
|
||||
@@ -433,6 +433,7 @@ NO_SVCACCT_ACCESS_ALLOWED = 'No Service Account Access allowed'
|
||||
NO_TRANSFER_LACK_OF_DISK_SPACE = 'Transfer not performed due to lack of target drive space.'
|
||||
NO_USAGE_PARAMETERS_DATA_AVAILABLE = 'No usage parameters data available.'
|
||||
NO_USER_COUNTS_DATA_AVAILABLE = 'No User counts data available.'
|
||||
NUM_SELECTED_CLIENT_SCOPES = '\n{0} scopes are selected, if more than {1} scopes are selected, Google will probably generate a "Something went wrong" error\n'
|
||||
OAUTH2_GO_TO_LINK_MESSAGE = """
|
||||
Go to the following link in a browser on this computer or on another computer:
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
- [Display administrators](#display-administrators)
|
||||
- [Copy privileges from one role to a new role](#copy-privileges-from-one-role-to-a-new-role)
|
||||
- [Copy roles from one administrator to another](#copy-roles-from-one-administrator-to-another)
|
||||
- [Copy non-system admin roles from a source workspace to a target workspace](#copy-non-system-admin-roles-from-a-source-workspace-to-a-target-workspace)
|
||||
|
||||
## API documentation
|
||||
* [About Administrator roles](https://support.google.com/a/answer/33325?ref_topic=4514341)
|
||||
@@ -21,13 +22,16 @@
|
||||
<DomainName> ::= <String>(.<String>)+
|
||||
<EmailAddress> ::= <String>@<DomainName>
|
||||
<GroupItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
<JSONData> ::= (json [charset <Charset>] <String>) | (json file <FileName> [charset <Charset>]) |
|
||||
<OrgUnitID> ::= id:<String>
|
||||
<OrgUnitPath> ::= /|(/<String)+
|
||||
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
|
||||
<Privilege> ::= <String>
|
||||
<PrivilegeList> ::= "<Privilege>(,<Privilege)*"
|
||||
<RoleAssignmentID> ::= <String>
|
||||
<RoleItem> ::= id:<String>|uid:<String>|<String>
|
||||
<RoleID> ::= <String>
|
||||
<RoleName> ::= <String>
|
||||
<RoleItem> ::= id:<RoleID>|<RoleName>
|
||||
<UniqueID> ::= id:<String>
|
||||
<UserItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
```
|
||||
@@ -1383,9 +1387,11 @@ Show 111 Privileges
|
||||
## Manage administrative roles
|
||||
```
|
||||
gam create adminrole <String> [description <String>]
|
||||
privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>>)
|
||||
privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>>)|<JSONData>
|
||||
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*]
|
||||
gam update adminrole <RoleItem> [name <String>] [description <String>]
|
||||
[privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>>)]
|
||||
[privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>>)|<JSONData>]
|
||||
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*]
|
||||
gam delete adminrole <RoleItem>
|
||||
```
|
||||
* `privileges all` - All defined privileges
|
||||
@@ -1393,24 +1399,61 @@ gam delete adminrole <RoleItem>
|
||||
* `privileges <PrivilegeList>` - A specific list of privileges
|
||||
* `privileges select <FileSelector>|<CSVFileSelector>>` - A collection of privileges from a flat or CSV file
|
||||
|
||||
By default, when an admin role is created|update, GAM displays `<RoleName>(<RoleID>) created|updated`.
|
||||
* `csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]` - Output the admin roledetails in CSV format.
|
||||
|
||||
When `csv` is uused, Add additional columns of data from the command line to the output.
|
||||
* `addcsvdata <FieldName> <String>`
|
||||
|
||||
## Display administrative roles
|
||||
```
|
||||
gam info adminrole <RoleItem> [privileges]
|
||||
[formatjson]
|
||||
```
|
||||
* `privileges` - Display privileges associated with role
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam show adminroles|roles
|
||||
[role <RoleItem>] [privileges]
|
||||
[nosystemroles]
|
||||
[formatjson]
|
||||
```
|
||||
* `privileges` - Display privileges associated with each role
|
||||
|
||||
By default, all roles are displayed:
|
||||
* `role <RoleItem>` - Display a specific role.
|
||||
* `nosystemroles` - Display onnly non-system roles.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam print adminroles|roles [todrive <ToDriveAttribute>*]
|
||||
[role <RoleItem>] [privileges] [oneitemperrow]
|
||||
gam show adminroles|roles
|
||||
[role <RoleItem>] [privileges]
|
||||
[nosystemroles]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, all roles are displayed, use `role <RoleItem>` to display a specific role.
|
||||
|
||||
* `privileges` - Display privileges associated with each role
|
||||
|
||||
By default, with `print`, all privileges for a role are shown on one row as a repeating item.
|
||||
By default, all privileges for a role are shown on one row as a repeating item.
|
||||
When `oneitemperrow` is specified, each privilege is output on a separate row/line with the other role fields.
|
||||
|
||||
By default, all roles are displayed:
|
||||
* `role <RoleItem>` - Display a specific role.
|
||||
* `nosystemroles` - Display onnly non-system roles.
|
||||
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
|
||||
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
## Create an administrator
|
||||
Add an administrator role to an administrator.
|
||||
```
|
||||
@@ -1469,3 +1512,15 @@ gam config csv_input_row_filter "scopeType:regex:CUSTOMER" redirect stdout ./Upd
|
||||
gam config csv_input_row_filter "scopeType:regex:ORG_UNIT" redirect stdout ./UpdateNewAdminOrgUnitRoles.txt multiprocess redirect stderr stdout csv CurrentAdminRoles.csv gam create admin newadmin@domain.com "id:~~roleId~~" org_unit "id:~~orgUnitId~~"
|
||||
```
|
||||
|
||||
## Copy non-system admin roles from a source workspace to a target workspace
|
||||
This requires GAM version 7.18.01 or higher.
|
||||
|
||||
In the source workspace to the following:
|
||||
```
|
||||
gam redirect csv ./SourceNonSystemRoles.csv print adminroles privileges nosystemroles formatjson quotechar "'"
|
||||
```
|
||||
|
||||
In the target workspacce do the following:
|
||||
```
|
||||
gam redirect csv ./TargetNonSystemRoles.csv multiprocess quotechar "'" redirect stderr - multiprocess csv SourceNonSystemRoles.csv quotechar "'" gam create adminrole "~roleName" description "~roleDescription" privileges json "~JSON" csv addcsvdata oldRoleId "~roleId" formatjson
|
||||
```
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
- [Display alerts](#display-alerts)
|
||||
- [Manage alert feedback](#manage-alert-feedback)
|
||||
- [Display alert feedback](#display-alert-feedback)
|
||||
- [Configuring settings](#configuring-settings)
|
||||
|
||||
## API documentation
|
||||
* [Alert Center API](https://developers.google.com/admin-sdk/alertcenter/reference/rest/)
|
||||
@@ -18,6 +19,7 @@
|
||||
## Definitions
|
||||
```
|
||||
<AlertID> ::= <String>
|
||||
<PubSubTopicName> ::= <String>
|
||||
<QueryAlert> ::= <String> See: https://developers.google.com/admin-sdk/alertcenter/guides/query-filters
|
||||
```
|
||||
## Introduction
|
||||
@@ -95,3 +97,15 @@ the quote character itself, the column delimiter (comma by default) and new-line
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
## Configuring settings
|
||||
|
||||
Alert Center can be configured to send notifications to a Google Cloud Pub/Sub topic, but it first requires configuration.
|
||||
* See https://developers.google.com/workspace/admin/alertcenter/guides/notifications for information.
|
||||
|
||||
Gam can be used to display or modify the settings:
|
||||
```
|
||||
gam show alertsettings
|
||||
gam update alertsettings <PubSubTopicName>
|
||||
gam clear alertsettings
|
||||
```
|
||||
@@ -436,6 +436,7 @@
|
||||
Must match this Python Regular Expression: [a-zA-Z0-9 '"!-]{4,30}
|
||||
<PropertyKey> ::= <String>
|
||||
<PropertyValue> ::= <String>
|
||||
<PubSubTopicName> ::= <String>
|
||||
<QueryAlert> ::= <String>
|
||||
See: https://developers.google.com/admin-sdk/alertcenter/guides/query-filters
|
||||
<QueryBrowser> ::= <String>
|
||||
|
||||
36
wiki/Business-Account-Management.md
Normal file
36
wiki/Business-Account-Management.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Users - Business Account Management
|
||||
- [API documentation](#api-documentation)
|
||||
- [Introduction](#introduction)
|
||||
- [Definitions](#definitions)
|
||||
- [Display Business Profile Accounts](#display-business-profile-accounts)
|
||||
|
||||
## API documentation
|
||||
* [Business Account Management](https://developers.google.com/my-business/reference/accountmanagement/rest)
|
||||
|
||||
|
||||
## Introduction
|
||||
These features were added in version 7.18.00.
|
||||
|
||||
To use these commands you add the 'Business Account Management API' to your project and update client authorization.
|
||||
```
|
||||
gam update project
|
||||
gam oauth create
|
||||
...
|
||||
[*] 0) Business Account Management API
|
||||
|
||||
```
|
||||
## Definitions
|
||||
* [`<UserTypeEntity>`](Collections-of-Users)
|
||||
|
||||
## Display Business Profile Accounts
|
||||
```
|
||||
gam <UserItem> show businessprofileaccounts
|
||||
[type locationgroup|organization|personal|usergroup]
|
||||
```
|
||||
Gam displays the information as an indented list of keys and values.
|
||||
|
||||
```
|
||||
gam <UserItem> print businessprofileaccounts [todrive <ToDriveAttribute>*]
|
||||
[type locationgroup|organization|personal|usergroup]
|
||||
```
|
||||
Gam displays the information as columns of fields.
|
||||
@@ -1,4 +1,4 @@
|
||||
# Chat Bot
|
||||
# Chat Bot Setup and Use
|
||||
- [Introduction](#introduction)
|
||||
- [Set up a Chat Bot](#set-up-a-chat-bot)
|
||||
- [API documentation](#api-documentation)
|
||||
@@ -12,6 +12,7 @@
|
||||
* [Google Classroom API](https://developers.google.com/classroom/reference/rest)
|
||||
* [Google Classroom API - Courses Students](https://developers.google.com/classroom/reference/rest/v1/courses.students)
|
||||
* [Google Classroom API - Courses Teachers](https://developers.google.com/classroom/reference/rest/v1/courses.teachers)
|
||||
* [Classroom Membership Limits](https://support.google.com/edu/classroom/answer/7300976)
|
||||
|
||||
## Definitions
|
||||
```
|
||||
|
||||
@@ -10,6 +10,54 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
||||
|
||||
See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation
|
||||
|
||||
### 7.18.03
|
||||
|
||||
Updated `gam oauth create` to give a warning if the number of selected scopes will
|
||||
probably cause Google to generate a "Something went wrong" error.
|
||||
|
||||
### 7.18.02
|
||||
|
||||
Upgraded to OpenSSL 3.5.2.
|
||||
|
||||
### 7.18.01
|
||||
|
||||
Added option `nosystemroles` to `gam print|show adminroles` that causes GAM
|
||||
to only display non-system roles.
|
||||
|
||||
Added option `formatjson` to `gam info|print|show adminroles`; this will be most useful
|
||||
when the `privileges` option is used.
|
||||
|
||||
Updated `gam create|update adminrole` to allow specification of privileges with
|
||||
JSON data: `privileges <JSONData>`. These two updates make it easier to copy admin roles.
|
||||
|
||||
Updated `gam create|update adminrole` to allow output of the created/updated
|
||||
role data in CSV format; by default, GAM displays `<RoleName>(<RoleID>) created|updated`.
|
||||
```
|
||||
csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*
|
||||
```
|
||||
|
||||
### 7.18.00
|
||||
|
||||
Added commands to display Business Profile Accounts.
|
||||
These are special purpose commands and will not generally be used.
|
||||
```
|
||||
gam show businessprofileaccounts
|
||||
gam print businessprofileaccounts [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
|
||||
### 7.17.03
|
||||
|
||||
Fixed bug in `gam <UserItem> print|show chatspaces asadmin fields <ChatSpaceFieldNameList>` that caused a trap
|
||||
when `displayname` was not in `<ChatSpaceFieldNameList>`.
|
||||
|
||||
### 7.17.02
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show webmastersites` to handle the following error
|
||||
that occurs if you haven't updated your project to include the Google Search Console API.
|
||||
```
|
||||
ERROR: 403: permissionDenied - Google Search Console API has not been used in project 111055363999 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/searchconsole.googleapis.com/overview?project=111055363999 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
|
||||
```
|
||||
|
||||
### 7.17.01
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> show webmastersites` that caused a trap.
|
||||
|
||||
@@ -252,10 +252,10 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin$ gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAM 7.17.01 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.18.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
MacOS Sequoia 15.6 x86_64
|
||||
Path: /Users/admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
@@ -990,7 +990,7 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\>del C:\GAMConfig\oauth2.txt
|
||||
C:\>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAM 7.17.01 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM 7.18.03 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
||||
@@ -464,7 +464,7 @@ gam <UserItem> delete chatmember asadmin <ChatSpace>
|
||||
|
||||
Delete members from a chat space by specifying chatmember names, asadmin
|
||||
```
|
||||
gam <UserItem> remove chatmember members asadmin <ChatMemberList>
|
||||
gam <UserItem> remove chatmember asadmin members <ChatMemberList>
|
||||
```
|
||||
|
||||
### Update a members role in a user's chat space
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
- [Move with ownership change](#move-with-ownership-change)
|
||||
- [Complex moves](#complex-moves)
|
||||
- [Move content of a Shared Drive to another Shared Drive](#move-content-of-a-shared-drive-to-another-shared-drive)
|
||||
- [Move content of a Shared Drive to a My Drive](#move-content-of-a-shared-drive-to-a-my-drive)
|
||||
|
||||
## API documentation
|
||||
* [Drive API - Files](https://developers.google.com/drive/api/v3/reference/files)
|
||||
@@ -673,8 +674,10 @@ gam user user@domain.com move drivefile teamdriveid 0AC_1AB teamdriveparentid 0A
|
||||
```
|
||||
|
||||
If you want the source Shared Drive with ID 0AC_1AB to be contained in a top level folder of the target Shared Drive with ID 0AE_9ZX, omit the `mergewithparent` argument.
|
||||
The folder on the target Shared Drive will have the same name as the name of the source Shared Drive; use the `newfilename <DriveFileName>` to use a different name.
|
||||
```
|
||||
gam user user@domain.com move drivefile teamdriveid 0AC_1AB teamdriveparentid 0AE_9ZX
|
||||
gam user user@domain.com move drivefile teamdriveid 0AC_1AB teamdriveparentid 0AE_9ZX newfilename "Copy of source Shared Drive"
|
||||
```
|
||||
|
||||
### Inter-workspace moves
|
||||
@@ -692,3 +695,21 @@ User: user@domaina.com, Move 1 Drive File/Folder
|
||||
User: user@domaina.com, Drive Folder: Shared Drive A(<SharedDriveAID>), Retained
|
||||
```
|
||||
To get this to work, you must check `Allow people outside of Domain A to access files` on Shared Drive A in domaina.com
|
||||
|
||||
## Move content of a Shared Drive to a My Drive
|
||||
Suppose you have a Shared Drive with ID 0AC_1AB with multiple files and folders, and want to move all of its content to the root of a My Drive.
|
||||
|
||||
The following command will change the parents of the top level files and folders from 0AC_1AB to the root of the My Drive; the sub files and folders will move along with their top level folder.
|
||||
|
||||
* No permissions are processed.
|
||||
```
|
||||
gam user user@domain.com move drivefile teamdriveid 0AC_1AB parentid root mergewithparent
|
||||
```
|
||||
|
||||
If you want the contents of Shared Drive with ID 0AC_1AB to be contained in a top level folder of the My Drive, omit the `mergewithparent` argument.
|
||||
The folder on the My Drive will have the same name as the name of the Shared Drive; use the `newfilename <DriveFileName>` to use a different name.
|
||||
```
|
||||
gam user user@domain.com move drivefile teamdriveid 0AC_1AB parentid root
|
||||
gam user user@domain.com move drivefile teamdriveid 0AC_1AB parentid root newfilename "Copy of Shared Drive"
|
||||
```
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
- [Delete all ACLs except owner from a user's My Drive](#delete-all-acls-except-owner-from-a-users-my-drive)
|
||||
- [Change shares to User1 to shares to User2](#change-shares-to-user1-to-shares-to-user2)
|
||||
- [Map All ACLs from an old domain to a new domain](#map-all-acls-from-an-old-domain-to-a-new-domain)
|
||||
- [Remove all ACLs for a specific user or group email address](#remove-all-ACLs-for-a-specific-user-or-group-email-address)
|
||||
- [Remove anyone-anyoneWithLink ACLs](#remove-anyone-anyonewithlink-acls)
|
||||
|
||||
## API documentation
|
||||
* [Drive API - Permissions](https://developers.google.com/drive/api/v3/reference/permissions)
|
||||
@@ -385,3 +387,83 @@ gam config csv_input_row_filter "permission.type:regex:user|group" redirect stdo
|
||||
gam config csv_input_row_filter "permission.type:regex:domain" redirect stdout ./AddNewDomainACLsDomainShares.txt multiprocess redirect stderr stdout csv ./allUsersFiles.csv gam user "~Owner" create drivefileacl "~id" "~permission.type" "~permission.domain" role "~permission.role" allowfilediscovery "~permission.allowFileDiscovery" mappermissionsdomain olddomain.com newdomain.com
|
||||
```
|
||||
|
||||
## Remove all ACLs for a specific user or group email address
|
||||
|
||||
### My Drives
|
||||
|
||||
Get My Drive ACLs sharing to that email address:
|
||||
* Replace `<Type>` with user or group
|
||||
* Replace `email@domain.com` with actual email address
|
||||
```
|
||||
gam config auto_batch_min 1 num_threads 20 redirect csv ./MyDriveShares.csv multiprocess redirect stderr - multiprocess all users print filelist fields id,name,mimetype,basicpermissions query "'email@domain.com' in readers or 'email@domain.com' in writers" pm notrole owner type <Type> emailaddress email@domain.com em pmfilter oneitemperrow
|
||||
```
|
||||
|
||||
Delete those My Drive ACLs.
|
||||
```
|
||||
gam config num_threads 20 redirect stdout ./DeleteMyDriveShares.txt multiprocess redirect stderr stdout csv MyDriveShares.csv gam user "~Owner" delete drivefleacl "~id" "id:~~permission.id~~"
|
||||
```
|
||||
|
||||
Add My Drive ACLs with a different email address and the same role.
|
||||
```
|
||||
gam config num_threads 20 redirect stdout ./AddMyDriveShares.txt multiprocess redirect stderr stdout csv MyDriveShares.csv gam user "~Owner" add drivefleacl "~id" "~permission.type" newemail@domain.rom role "~permission.role"
|
||||
```
|
||||
|
||||
### Shared Drives
|
||||
Get an organizer for each Shared Drive
|
||||
```
|
||||
gam redirect csv ./SharedDriveOrganizers.csv print shareddriveorganizers
|
||||
```
|
||||
|
||||
Get Shared Drive ACLs explicitly sharing to that email address:
|
||||
* Replace `<Type>` with user or group
|
||||
* Replace `email@domain.com` with actual email address
|
||||
```
|
||||
gam config num_threads 20 csv_input_row_filter "organizers:regex:^.+$" redirect csv ./SharedDriveShares.csv multiprocess redirect stderr - multiprocess csv SharedDriveOrganizers.csv gam user "~organizers" print filelist select shareddriveid "~id" fields id,name,mimetype,basicpermissions,driveid showdrivename query "'email@domain.com' in readers or 'email@domain.com' in writers" pm type <Type> emailaddress email@domain.com inherited false em pmfilter oneitemperrow
|
||||
```
|
||||
|
||||
Delete those Shared Drive ACLs.
|
||||
```
|
||||
gam config num_threads 20 redirect stdout ./DeleteSharedDriveShares.txt multiprocess redirect stderr stdout csv SharedDriveShares.csv gam user "~Owner" delete drivefleacl "~id" "id:~~permission.id~~"
|
||||
```
|
||||
|
||||
Add Shared Drive ACLs with a different email address and the same role.
|
||||
```
|
||||
gam config num_threads 20 redirect stdout ./ReplaceSharedDriveShares.txt multiprocess redirect stderr stdout csv SharedDriveShares.csv gam user "~Owner" add drivefleacl "~id" "~permission.type" newemail@domain.rom role "~permission.role"
|
||||
```
|
||||
|
||||
## Remove anyone-anyoneWithLink ACLs
|
||||
|
||||
Here are the queries that will be used in these commands:
|
||||
* anyone - query "visibility='anyoneCanFind'"
|
||||
* anyoneWithLink - query "visibility='anyoneWithLink'"
|
||||
* both - query "(visibility='anyoneCanFind' or visibility='anyoneWithLink')"
|
||||
|
||||
### My Drives
|
||||
|
||||
Get My Drive anyone/anyoneWithLink ACLs
|
||||
```
|
||||
gam config auto_batch_min 1 num_threads 20 redirect csv ./MyDriveShares.csv multiprocess redirect stderr - multiprocess all users print filelist fields id,name,mimetype,basicpermissions <Query> pm type anyone em pmfilter oneitemperrow
|
||||
```
|
||||
|
||||
Delete those My Drive ACLs.
|
||||
```
|
||||
gam config num_threads 20 redirect stdout ./DeleteMyDriveShares.txt multiprocess redirect stderr stdout csv MyDriveShares.csv gam user "~Owner" delete drivefleacl "~id" "id:~~permission.id~~"
|
||||
```
|
||||
|
||||
### Shared Drives
|
||||
Get an organizer for each Shared Drive
|
||||
```
|
||||
gam redirect csv ./SharedDriveOrganizers.csv print shareddriveorganizers
|
||||
```
|
||||
|
||||
Get Shared Drive anyone/anyoneWithLink ACLs
|
||||
```
|
||||
gam config num_threads 20 csv_input_row_filter "organizers:regex:^.+$" redirect csv ./SharedDriveShares.csv multiprocess redirect stderr - multiprocess csv SharedDriveOrganizers.csv gam user "~organizers" print filelist select shareddriveid "~id" fields id,name,mimetype,basicpermissions,driveid showdrivename <Query> pm type anyone inherited false em pmfilter oneitemperrow
|
||||
```
|
||||
|
||||
Delete those Shared Drive ACLs.
|
||||
```
|
||||
gam config num_threads 20 redirect stdout ./DeleteSharedDriveShares.txt multiprocess redirect stderr stdout csv SharedDriveShares.csv gam user "~Owner" delete drivefleacl "~id" "id:~~permission.id~~"
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
- [Introduction](#introduction)
|
||||
- [Definitions](#definitions)
|
||||
- [Display Web Resources](#display-web-resources)
|
||||
- [Display Web Sites](#display-web-sites)
|
||||
- [Display Web Master Sites](#display-web-master-sites)
|
||||
|
||||
## API documentation
|
||||
* [Web Resources](https://developers.google.com/site-verification/v1/webResource/list)
|
||||
@@ -36,13 +36,13 @@ gam <UserItem> print webresources [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
Gam displays the information as columns of fields.
|
||||
|
||||
## Display Web Sites
|
||||
## Display Web Master Sites
|
||||
```
|
||||
gam <UserItem> show websites
|
||||
gam <UserItem> show webmastersites
|
||||
```
|
||||
Gam displays the information as an indented list of keys and values.
|
||||
|
||||
```
|
||||
gam <UserItem> print websites [todrive <ToDriveAttribute>*]
|
||||
gam <UserItem> print webmastersites [todrive <ToDriveAttribute>*]
|
||||
```
|
||||
Gam displays the information as columns of fields.
|
||||
|
||||
@@ -16,7 +16,10 @@ Delegated admin service accounts (DASA) are regular [GCP service accounts](https
|
||||
|
||||
## Disadvantages
|
||||
* DASA accounts can only be delegated admins. [If a task requires super admin rights to perform](https://support.google.com/a/answer/2405986#:~:text=Only%20super%20administrators%20can...), DASA accounts won’t be able to do it.
|
||||
Not all Google Admin APIs work with DASA right now. For example, Google Vault API calls will fail with a DASA account; Classroom API calls do not return data.
|
||||
Not all Google Admin APIs work with DASA right no:
|
||||
* Google Vault API calls will fail with a DASA account
|
||||
* Classroom API calls do not return data
|
||||
* Cloud Identity Policies are not available
|
||||
* DASA is a delegated admin and can make Workspace / Cloud Identity admin API calls, it does not replace domain-wide delegation (DwD) when using GAM7 commands that interact with Gmail, Drive and Calendar user data.
|
||||
* GAM7 support for DASA is still experimental and some things may fail. Please report your findings to the [GAM group](https://groups.google.com/g/google-apps-manager).
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAM 7.17.01 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.18.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
MacOS Sequoia 15.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
Time: 2023-06-02T21:10:00-07:00
|
||||
@@ -15,10 +15,10 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAM 7.17.01 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.18.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
MacOS Sequoia 15.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
Your system time differs from www.googleapis.com by less than 1 second
|
||||
@@ -27,15 +27,15 @@ 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
|
||||
GAM 7.17.01 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.18.03 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
MacOS Sequoia 15.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: 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.4.0 22 Oct Sep 2024
|
||||
OpenSSL 3.5.2 5 ASug 2025
|
||||
cryptography 43.0.3
|
||||
filelock 3.16.1
|
||||
google-api-python-client 2.149.0
|
||||
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 7.17.01
|
||||
Latest: 7.18.03
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +72,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
7.17.01
|
||||
7.18.03
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -82,10 +82,10 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 7.17.01 - https://github.com/GAM-team/GAM
|
||||
GAM 7.18.03 - https://github.com/GAM-team/GAM
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
MacOS Sequoia 15.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
Time: 2023-06-02T21:10:00-07:00
|
||||
|
||||
@@ -66,6 +66,7 @@ Client Access
|
||||
* [Administrators](Administrators)
|
||||
* [Alert Center](Alert-Center)
|
||||
* [Aliases](Aliases)
|
||||
* [Business Account Management](Business-Account-Management)
|
||||
* [Calendars](Calendars)
|
||||
* [Calendars - Access](Calendars-Access)
|
||||
* [Calendars - Events](Calendars-Events)
|
||||
@@ -128,7 +129,7 @@ Client Access
|
||||
* [Version and Help](Version-and-Help)
|
||||
|
||||
Special Service Account Access
|
||||
* [Chat Bot](Chat-Bot)
|
||||
* [Chat Bot Setup and Use](Chat-Bot-Setup-Use)
|
||||
|
||||
Service Account Access
|
||||
* [Users - Analytics Admin](Users-Analytics-Admin)
|
||||
|
||||
Reference in New Issue
Block a user