Compare commits

...

6 Commits

Author SHA1 Message Date
Ross Scroggs
ef1018f286 Expand adminrole commands 2025-08-04 14:33:36 -07:00
Ross Scroggs
63c0c58bf6 Update Administrators.md 2025-08-04 14:28:16 -07:00
Ross Scroggs
aa443ae6cb Update Administrators.md 2025-08-04 14:27:05 -07:00
Ross Scroggs
dbec314359 Update Classroom-Membership.md 2025-08-04 14:25:24 -07:00
Ross Scroggs
8270f0a82a Update Chat Bot documentation
Some checks failed
Push wiki / pushwiki (push) Has been cancelled
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
2025-08-01 09:05:53 -07:00
Ross Scroggs
2a4cd66227 Added commands to display Business Profile Accounts. #1807
Some checks failed
Push wiki / pushwiki (push) Has been cancelled
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
2025-07-31 18:11:49 -07:00
11 changed files with 241 additions and 42 deletions

View File

@@ -1511,15 +1511,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]

View File

@@ -1,3 +1,20 @@
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.

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.18.00'
__version__ = '7.18.01'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@@ -16621,10 +16621,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', []):
@@ -16641,6 +16645,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']:
@@ -16654,6 +16661,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)]
@@ -16675,25 +16684,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:
@@ -16702,6 +16745,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():
@@ -16721,9 +16766,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:
@@ -16744,15 +16790,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:
@@ -16767,13 +16819,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)
@@ -16783,6 +16839,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',
@@ -16801,23 +16859,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')

View File

@@ -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
```

View 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.

View File

@@ -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)

View File

@@ -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
```

View File

@@ -10,6 +10,15 @@ 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.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

View File

@@ -252,7 +252,7 @@ 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.03 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.18.00 - 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
@@ -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.03 - https://github.com/GAM-team/GAM - pythonsource
GAM 7.18.00 - 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

View File

@@ -3,7 +3,7 @@
Print the current version of Gam with details
```
gam version
GAM 7.17.03 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.18.00 - 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
@@ -15,7 +15,7 @@ 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.03 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.18.00 - 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
@@ -27,7 +27,7 @@ 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.03 - https://github.com/GAM-team/GAM - pyinstaller
GAM 7.18.00 - 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
@@ -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.03
Latest: 7.18.00
echo $?
1
```
@@ -72,7 +72,7 @@ echo $?
Print the current version number without details
```
gam version simple
7.17.03
7.18.00
```
In Linux/MacOS you can do:
```
@@ -82,7 +82,7 @@ echo $VER
Print the current version of Gam and address of this Wiki
```
gam help
GAM 7.17.03 - https://github.com/GAM-team/GAM
GAM 7.18.00 - 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

View File

@@ -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)