mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-07 07:41:38 +00:00
Compare commits
92 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7340557a8c | ||
|
|
66ec9d0d4b | ||
|
|
cc6ccd1338 | ||
|
|
25c167ee0a | ||
|
|
f620850a58 | ||
|
|
73ad3cc3e5 | ||
|
|
b03083cb09 | ||
|
|
6642e23e81 | ||
|
|
a237272440 | ||
|
|
d3ac277523 | ||
|
|
e21ff2bec2 | ||
|
|
369df07748 | ||
|
|
b218abaae7 | ||
|
|
967898fa86 | ||
|
|
80570f2fda | ||
|
|
6437547e33 | ||
|
|
f87f000be2 | ||
|
|
08f6f86d10 | ||
|
|
e70bfca92a | ||
|
|
2be5d40f44 | ||
|
|
170e188f1f | ||
|
|
60d6188769 | ||
|
|
626eb1eadc | ||
|
|
db40ada5d0 | ||
|
|
ba8c27339e | ||
|
|
822488dce5 | ||
|
|
bbd76ec23f | ||
|
|
e2a6f8badf | ||
|
|
2462aa7dcb | ||
|
|
d7a0da6e52 | ||
|
|
9922ed4994 | ||
|
|
3a0c52d8eb | ||
|
|
f3e7c46561 | ||
|
|
b42c916516 | ||
|
|
4fd7172f7a | ||
|
|
e670cf3e6a | ||
|
|
e305cc0789 | ||
|
|
d7b9d43c63 | ||
|
|
75e3ae8144 | ||
|
|
130a483e4d | ||
|
|
cbd04bcec4 | ||
|
|
a51b245015 | ||
|
|
64356a9736 | ||
|
|
c18375abb7 | ||
|
|
c9c0cac57e | ||
|
|
8ca3717f97 | ||
|
|
cd0d82e994 | ||
|
|
f29f27577c | ||
|
|
cb5e5d1943 | ||
|
|
88bdfd2883 | ||
|
|
e875acf428 | ||
|
|
5d213e9951 | ||
|
|
35d61da0a0 | ||
|
|
da04ead86d | ||
|
|
5526c987ea | ||
|
|
d9795b3f83 | ||
|
|
39a17bacb1 | ||
|
|
af94ea6e54 | ||
|
|
c220f41cbe | ||
|
|
8a32e53652 | ||
|
|
372f86a79a | ||
|
|
7f307254bf | ||
|
|
2ae7b4a4b5 | ||
|
|
6dde273ee9 | ||
|
|
b66f6f60fe | ||
|
|
01fcefc647 | ||
|
|
a59e3008c5 | ||
|
|
eb82da4ff2 | ||
|
|
c4aa399446 | ||
|
|
f1713ec685 | ||
|
|
74924c9c0e | ||
|
|
8d3b65f5f1 | ||
|
|
260f2d3f5c | ||
|
|
475275add7 | ||
|
|
d71832096a | ||
|
|
f12d3abfc1 | ||
|
|
474aa069b7 | ||
|
|
c49708cbae | ||
|
|
43ecba07bb | ||
|
|
51f8ebe8e2 | ||
|
|
28edce3aca | ||
|
|
fe1f0285f8 | ||
|
|
da83121d0d | ||
|
|
f58a69e374 | ||
|
|
2f40a164c5 | ||
|
|
58a3fa7313 | ||
|
|
39ce5b7349 | ||
|
|
860d44d819 | ||
|
|
5e90ff143e | ||
|
|
28e05bf09a | ||
|
|
0781e27993 | ||
|
|
a441dddc06 |
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@@ -126,7 +126,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
cache.tar.xz
|
||||
key: gam-${{ matrix.jid }}-20250603
|
||||
key: gam-${{ matrix.jid }}-20250701
|
||||
|
||||
- name: Untar Cache archive
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||
@@ -457,10 +457,6 @@ jobs:
|
||||
- name: Custom wheels for Win arm64
|
||||
if: runner.os == 'Windows' && runner.arch == 'ARM64'
|
||||
run: |
|
||||
latest_lxml_whl=$(curl https://api.github.com/repos/GAM-team/lxml-wheel/releases/latest -s | jq -r .assets.[0].browser_download_url)
|
||||
echo "Downloading ${latest_lxml_whl}..."
|
||||
curl -O -L "$latest_lxml_whl"
|
||||
"$PYTHON" -m pip install lxml*.whl
|
||||
latest_crypt_whl=$(curl https://api.github.com/repos/jay0lee/cryptography/releases/latest -s | jq -r .assets.[0].browser_download_url)
|
||||
echo "Downloading ${latest_crypt_whl}..."
|
||||
curl -O -L "$latest_crypt_whl"
|
||||
@@ -810,7 +806,7 @@ jobs:
|
||||
echo "Created shared drive ${driveid}"
|
||||
$gam create user $newuser firstname GHA lastname $JID displayname "Github Actions ${JID}" password random recoveryphone 12125121110 recoveryemail jay0lee@gmail.com gha.jid $JID languages en+,en-GB- ou "${newou}"
|
||||
$gam user $newuser add license workspaceenterpriseplus
|
||||
$gam user $newuser update photo https://dummyimage.com/400x600/000/fff
|
||||
$gam user $newuser update photo https://dummyimage.com/98x98/000/fff.jpg
|
||||
$gam user $newuser get photo
|
||||
$gam user $newuser delete photo
|
||||
$gam create alias $newalias user $newuser
|
||||
@@ -857,7 +853,7 @@ jobs:
|
||||
$gam user $newuser show labels > labels.txt
|
||||
$gam user $gam_user importemail subject "GHA import $newbase" message "This is a test import" labels IMPORTANT,UNREAD,INBOX,STARRED
|
||||
$gam user $gam_user insertemail subject "GHA insert $newbase" file gam.py labels INBOX,UNREAD # yep body is gam code
|
||||
$gam user $gam_user sendemail subject "GHA send $gam_user $newbase" file gam.py recipient admin@pdl.jaylee.us
|
||||
$gam user $gam_user sendemail recipient admin@pdl.jaylee.us subject "GHA send $gam_user $newbase" file gam.py
|
||||
$gam user $gam_user draftemail subject "GHA draft $newbase" message "Draft message test"
|
||||
$gam csvfile sample.csv:email waitformailbox retries 20
|
||||
$gam user $newuser delegate to "${newbase}-bulkuser-1" || if [ $? != 50 ]; then exit $?; fi # expect a 50 return code (delegation failed)
|
||||
@@ -920,7 +916,7 @@ jobs:
|
||||
$gam config enable_dasa true save
|
||||
$gam print users query "gha.jid=$JID" | $gam csv - gam delete user ~primaryEmail || if [ $? != 50 ]; then exit $?; fi # expect a 50 return code (vault hold on user)
|
||||
$gam print mobile
|
||||
$gam print devices
|
||||
$gam print devices clientstates
|
||||
$gam print browsers
|
||||
$gam print cros allfields orderby serialnumber
|
||||
$gam show crostelemetry storagepercentonly
|
||||
|
||||
2
.github/workflows/pushwiki.yml
vendored
2
.github/workflows/pushwiki.yml
vendored
@@ -5,6 +5,8 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- 'wiki/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pushwiki:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -279,6 +279,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
geminiedu | 1010470004 | Gemini Education |
|
||||
geminiedupremium| 1010470005 | Gemini Education Premium |
|
||||
geminient| duetai | 1010470001 | Gemini Enterprise |
|
||||
geminiultra | 1010470008 | Google AI Ultra for Business |
|
||||
gsuitebasic | gafb | gafw | basic | Google-Apps-For-Business |
|
||||
gsuitebusiness | gau | gsb | unlimited | Google-Apps-Unlimited |
|
||||
gsuitebusinessarchived | gsbau | businessarchived | 1010340002 | Google Workspace Business - Archived User |
|
||||
@@ -380,6 +381,8 @@ If an item contains spaces, it should be surrounded by ".
|
||||
domain:<DomainName>|domain|default
|
||||
<CalendarItem> ::= <EmailAddress>
|
||||
<ChannelCustomerID> ::= <String>
|
||||
<ChatEmojiName> ::= :<String>:
|
||||
<ChatEmoji> ::= emojiname <ChatEmojiName> | customemojis/<String>
|
||||
<ChatMember> ::= spaces/<String>/members/<String>
|
||||
<ChatMessage> ::= spaces/<String>/messages/<String>
|
||||
<ChatSpace> ::= spaces/<String> | space <String> | space spaces/<String>
|
||||
@@ -402,6 +405,11 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<ContactGroupItem> ::= <ContactGroupID>|<ContactGroupName>
|
||||
<CorporaAttribute> ::= alldrives|allteamdrives|domain|onlyteamdrives|user
|
||||
<CourseAlias> ::= <String>
|
||||
<CourseAnnouncementContent> ::=
|
||||
((text <String>)|
|
||||
(textfile <FileName> [charset <Charset>])|
|
||||
(gdoc <UserGoogleDoc>)|
|
||||
(gcsdoc <StorageBucketObjectName>))
|
||||
<CourseAnnouncementID> ::= <Number>
|
||||
<CourseAnnouncementState> ::= draft|published|deleted
|
||||
<CourseID> ::= <Number>|d:<CourseAlias>
|
||||
@@ -664,6 +672,7 @@ If an item contains spaces, it should be surrounded by ".
|
||||
(gdoc|ghtml <UserGoogleDoc>)|
|
||||
(gcsdoc|gcshtml <StorageBucketObjectName>)
|
||||
<YouTubeChannelID> ::= <String>
|
||||
|
||||
## Lists of basic items
|
||||
|
||||
<APIScopeURLList> ::= "<APIScopeURL>(,<APIScopeURL>)*"
|
||||
@@ -2725,6 +2734,7 @@ gam print chromschemas [todrive <ToDriveAttribute>*]
|
||||
<ChromePolicySchemaFieldName>* [fields <ChromePolicySchemaFieldNameList>]
|
||||
[[formatjson [quotechar <Character>]]
|
||||
|
||||
gam info chromeschema std <SchemaName>
|
||||
gam show chromeschemas std
|
||||
[filter <String>]
|
||||
|
||||
@@ -3115,8 +3125,21 @@ gam delete courses <CourseEntity> [archive|archived]
|
||||
gam course <CourseID> create|add alias <CourseAlias>
|
||||
gam course <CourseID> delete alias <CourseAlias>
|
||||
|
||||
<CourseAnnouncementContent> ::=
|
||||
((text <String>)|
|
||||
(textfile <FileName> [charset <Charset>])|
|
||||
(gdoc <UserGoogleDoc>)|
|
||||
(gcsdoc <StorageBucketObjectName>))
|
||||
|
||||
gam course <CourseID> create announcement
|
||||
<CourseAnnouncementContent> [scheduledtime <Time>] [state draft|published]
|
||||
gam course <CourseID> remove announcement <CourseAnnouncementID>
|
||||
gam course <CourseID> update announcement <CourseAnnouncementID>
|
||||
[<CourseAnnouncementContent>] [scheduledtime <Time>] [state published]
|
||||
|
||||
gam course <CourseID> create|add topic <CourseTopic>
|
||||
gam course <CourseID> delete topic <CourseTopicID>
|
||||
gam course <CourseID> update topic <CourseTopicID> <CourseTopic>
|
||||
|
||||
gam course <CourseID> create|add teachers [makefirstteacherowner] <UserItem>
|
||||
gam course <CourseID> create|add students <UserItem>
|
||||
@@ -3128,8 +3151,15 @@ gam course <CourseID> sync students [addonly|removeonly] <UserTypeEntity>
|
||||
gam courses <CourseEntity> create|add alias <CourseAliasEntity>
|
||||
gam courses <CourseEntity> delete alias <CourseAliasEntity>
|
||||
|
||||
gam courses <CourseEntity> create announcement
|
||||
<CourseAnnouncementContent>> [scheduledtime <Time>] [state draft|published]
|
||||
gam courses <CourseEntity> remove announcement <CourseAnnouncementIDEntity>
|
||||
gam courses <CourseEntity> update announcement <CourseAnnouncementIDEntity>
|
||||
[<CourseAnnouncementContent>] [scheduledtime <Time>] [state published]
|
||||
|
||||
gam courses <CourseEntity> create|add topic <CourseTopicEntity>
|
||||
gam courses <CourseEntity> delete topic <CourseTopicIDEntity>
|
||||
gam courses <CourseEntity> update topic <CourseTopicIDEntity> <CourseTopic>
|
||||
|
||||
gam courses <CourseEntity> create|add teachers [makefirstteacherowner] <UserTypeEntity>
|
||||
gam courses <CourseEntity> create|add students <UserTypeEntity>
|
||||
@@ -4120,6 +4150,7 @@ gam print devices [todrive <ToDriveAttribute>*]
|
||||
[orderby <DeviceOrderByFieldName> [ascending|descending]]
|
||||
[all|company|personal|nocompanydevices|nopersonaldevices]
|
||||
[nodeviceusers|oneuserperrow]
|
||||
[clientstates]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[showitemcountonly]
|
||||
|
||||
@@ -4431,19 +4462,18 @@ gam report usage customer [todrive <ToDriveAttribute>*]
|
||||
[convertmbtogb]
|
||||
|
||||
<ActivityApplicationName> ::=
|
||||
access|accesstransparency|
|
||||
accesstransparency|access|
|
||||
admin|
|
||||
calendar|calendars|
|
||||
chat|
|
||||
chrome|
|
||||
classroom|
|
||||
contextawareaccess|
|
||||
currents|gplus|google+|
|
||||
gplus|currents|google+|
|
||||
datastudio|
|
||||
devices|mobile|
|
||||
domain|
|
||||
drive|doc|docs|
|
||||
gcp|
|
||||
gemini|geminiforworkspace|
|
||||
gcp|cloud|
|
||||
geminiinworkspaceapps|gemini|geminiforworkspace|
|
||||
groups|group|
|
||||
groupsenterprise|enterprisegroups|
|
||||
jamboard|
|
||||
@@ -4461,7 +4491,7 @@ gam report <ActivityApplicationName> [todrive <ToDriveAttribute>*]
|
||||
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath> [showorgunit])|(select <UserTypeEntity>)]
|
||||
[([start <Time>] [end <Time>])|(range <Time> <Time>)|
|
||||
yesterday|today|thismonth|(previousmonths <Integer>)]
|
||||
[filtertime.* <Time>] [filter|filters <String>]
|
||||
[filtertime.<String> <Time>] [filter|filters <String>]
|
||||
[event|events <EventNameList>] [ip <String>]
|
||||
[groupidfilter <String>]
|
||||
[maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
||||
@@ -4534,7 +4564,7 @@ gam update resoldcustomer <CustomerID> <ResoldCustomerAttribues>+
|
||||
gam info resoldcustomer <CustomerID> [formatjson]
|
||||
|
||||
gam create|add resoldsubscription <CustomerID> (sku <SKUID>)
|
||||
(plan annual_monthly_pay|annual_yearly_pay|flexible|trial) (seats <Number>)
|
||||
(plan annual_monthly_pay|annual_yearly_pay|flexible|trial|free) (seats <Number>)
|
||||
[customer_auth_token <String>] [deal <String>] [purchaseorderid <String>]
|
||||
gam update resoldsubscription <CustomerID> <SKUID>
|
||||
activate|suspend|startpaidservice|
|
||||
@@ -4773,6 +4803,8 @@ gam <UserTypeEntity> sendemail from <EmailAddress>
|
||||
allowcontentmanagerstosharefolders|
|
||||
copyrequireswriterpermission|
|
||||
domainusersonly|
|
||||
downloadrestrictedforreaders|
|
||||
downloadrestrictedforwriters|
|
||||
drivemembersonly|teammembersonly|
|
||||
sharingfoldersrequiresorganizerpermission
|
||||
|
||||
@@ -4812,11 +4844,13 @@ gam print shareddrives [todrive <ToDriveAttribute>*]
|
||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
||||
[showwebviewlink text|hyperlink]
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show shareddrives
|
||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
[fields <SharedDriveFieldNameList>] [noorgunits [<Boolean>]]
|
||||
[showwebviewlink text|hyperlink]
|
||||
[formatjson] [noorgunits [<Boolean>]]
|
||||
|
||||
gam print shareddriveorganizers [todrive <ToDriveAttribute>*]
|
||||
@@ -4897,12 +4931,14 @@ gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
(role|roles <SharedDriveACLRoleList>)*
|
||||
[fields <SharedDriveFieldNameList>]
|
||||
[showwebviewlink text|hyperlink]
|
||||
[guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
|
||||
gam <UserTypeEntity> show shareddrives
|
||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
(role|roles <SharedDriveACLRoleList>)*
|
||||
[fields <SharedDriveFieldNameList>]
|
||||
[showwebviewlink text|hyperlink]
|
||||
[guiroles [<Boolean>]] [formatjson]
|
||||
|
||||
<PermissionMatch> ::=
|
||||
@@ -5030,18 +5066,18 @@ gam <UserTypeEntity> delete permissions <SharedDriveEntityAdmin> <DriveFilePermi
|
||||
|
||||
In these commands, the Google administrator named in oauth2.txt is used.
|
||||
|
||||
gam copy teamdriveacls <SharedDriveEntity> to <SharedDriveEntity>
|
||||
gam copy shareddriveacls <SharedDriveEntity> to <SharedDriveEntity>
|
||||
[adminaccess|asadmin]
|
||||
[showpermissionsmessages [<Boolean>]]
|
||||
[excludepermissionsfromdomains|includepermissionsfromdomains <DomainNameList>]
|
||||
(mappermissionsdomain <DomainName> <DomainName>)*
|
||||
gam sync teamdriveacls <SharedDriveEntity> with <SharedDriveEntity>
|
||||
gam sync shareddriveacls <SharedDriveEntity> with <SharedDriveEntity>
|
||||
[adminaccess|asadmin]
|
||||
[showpermissionsmessages [<Boolean>]]
|
||||
[excludepermissionsfromdomains|includepermissionsfromdomains <DomainNameList>]
|
||||
(mappermissionsdomain <DomainName> <DomainName>)*
|
||||
|
||||
gam print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
gam print shareddriveacls [todrive <ToDriveAttribute>*]
|
||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
|
||||
@@ -5049,7 +5085,7 @@ gam print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
[oneitemperrow] [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam show teamdriveacls
|
||||
gam show shareddriveacls
|
||||
[teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
|
||||
@@ -5059,18 +5095,18 @@ gam show teamdriveacls
|
||||
|
||||
In these commands, you specify an administrator and then indicate that you want domain administrator access with the adminaccess option.
|
||||
|
||||
gam <UserTypeEntity> copy teamdriveacls <SharedDriveEntity> to <SharedDriveEntity>
|
||||
gam <UserTypeEntity> copy shareddriveacls <SharedDriveEntity> to <SharedDriveEntity>
|
||||
[adminaccess|asadmin]
|
||||
[showpermissionsmessages [<Boolean>]]
|
||||
[excludepermissionsfromdomains|includepermissionsfromdomains <DomainNameList>]
|
||||
(mappermissionsdomain <DomainName> <DomainName>)*
|
||||
gam <UserTypeEntity> sync teamdriveacls <SharedDriveEntity> with <SharedDriveEntity>
|
||||
gam <UserTypeEntity> sync shareddriveacls <SharedDriveEntity> with <SharedDriveEntity>
|
||||
[adminaccess|asadmin]
|
||||
[showpermissionsmessages [<Boolean>]]
|
||||
[excludepermissionsfromdomains|includepermissionsfromdomains <DomainNameList>]
|
||||
(mappermissionsdomain <DomainName> <DomainName>)*
|
||||
|
||||
gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
gam <UserTypeEntity> print shareddriveacls [todrive <ToDriveAttribute>*]
|
||||
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
|
||||
@@ -5079,7 +5115,7 @@ gam <UserTypeEntity> print teamdriveacls [todrive <ToDriveAttribute>*]
|
||||
[shownopermissionsdrives false|true|only]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam <UserTypeEntity> show teamdriveacls
|
||||
gam <UserTypeEntity> show shareddriveacls
|
||||
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
[user|group <EmailAddress> [checkgroups]] (role|roles <SharedDriveACLRoleList>)*
|
||||
@@ -5605,6 +5641,7 @@ gam update user <UserItem> [ignorenullpassword] <UserAttribute>*
|
||||
[logpassword <FileName>]
|
||||
gam delete user <UserItem> [noactionifalias]
|
||||
gam undelete user <UserItem> [ou|org|orgunit <OrgUnitPath>]
|
||||
gam check suspended <UserItem>
|
||||
gam suspend user <UserItem> [noactionifalias]
|
||||
gam unsuspend user <UserItem> [noactionifalias]
|
||||
gam info user [<UserItem>]
|
||||
@@ -6435,6 +6472,22 @@ gam <UserTypeEntity> print chatevents [todrive <ToDriveAttribute>*]
|
||||
filter <String>
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
<ChatEmojiName> ::= :[0-9a-z_-]+:
|
||||
<ChatEmoji> ::= emojiname <ChatEmojiName> | customemojis/<String>
|
||||
|
||||
gam <UserTypeEntity> create chatemoji <ChatEmojiName>
|
||||
([drivedir|(sourcefolder <FilePath>)] [filename <FileNamePattern>])
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> delete chatemoji <ChatEmoji>
|
||||
gam <UserTypeEntity> info chatemoji <ChatEmoji>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> show chatemojis
|
||||
[showcreatedby any|me|others]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print chatemojis [todrive <ToDriveAttribute>*]
|
||||
[showcreatedby any|me|others]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
# Users - Drive
|
||||
|
||||
<DriveFileOrderByFieldName> ::=
|
||||
@@ -6905,6 +6958,7 @@ gam <UserTypeEntity> collect orphans
|
||||
capabilities.canchangecopyrequireswriterpermission|
|
||||
capabilities.canchangecopyrequireswriterpermissionrestriction|
|
||||
capabilities.canchangedomainusersonlyrestriction|
|
||||
capabilities.canchangedownloadrestriction|
|
||||
capabilities.canchangedrivebackground|
|
||||
capabilities.canchangedrivemembersonlyrestriction|
|
||||
capabilities.canchangesecurityupdateenabled|
|
||||
@@ -7203,7 +7257,8 @@ gam <UserTypeEntity> show filesharecounts
|
||||
owners|
|
||||
parents|
|
||||
size|
|
||||
trashed
|
||||
trashed|
|
||||
webviewlink
|
||||
<FileTreeFieldNameList> ::= "<FileTreeFieldName>(,<FileTreeFieldName>)*"
|
||||
|
||||
gam <UserTypeEntity> print filetree [todrive <ToDriveAttribute>*]
|
||||
@@ -7396,10 +7451,12 @@ gam <UserTypeEntity> print filters [labelidsonly] [todrive <ToDriveAttribute>*]
|
||||
|
||||
gam <UserTypeEntity> create form
|
||||
title <String> [description <String>] [isquiz [<Boolean>]] [<JSONData>]
|
||||
[ispublished [<Boolean>] isacceptingresponses [<Boolean>]]
|
||||
[drivefilename <DriveFileName>] [<DriveFileParentAttribute>]
|
||||
[(csv [todrive <ToDriveAttribute>*]) | returnidonly]
|
||||
gam <UserTypeEntity> update form <DriveFileEntity>
|
||||
[title <String>] [description <String>] [isquiz [<Boolean>]] [<JSONData>]
|
||||
[ispublished [<Boolean>] isacceptingresponses [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> print forms <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
@@ -7591,48 +7648,61 @@ gam <UserTypeEntity> insert message
|
||||
|
||||
gam <UserTypeEntity> archive messages <GroupItem>
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_archive <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> delete messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_delete <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> modify messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
|
||||
((addlabel <LabelName>)|(removelabel <LabelName>))+
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> spam messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_spam <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> trash messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_trash <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> untrash messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_untrash <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
|
||||
gam <UserTypeEntity> export message|messages
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [doit] [max_to_export <Number>])|(ids <MessageIDEntity>)
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_export <Number>])|(ids <MessageIDEntity>)
|
||||
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
|
||||
gam <UserTypeEntity> export thread|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [doit] [max_to_export <Number>])|(ids <ThreadIDEntity>)
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_export <Number>])|(ids <ThreadIDEntity>)
|
||||
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
|
||||
|
||||
gam <UserTypeEntity> forward message|messages recipient|to <RecipientEntity>
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_forward <Number>])|(ids <MessageIDEntity>)
|
||||
[subject <String>] [addorigfieldstosubject [<Boolean>]] [altcharset <String>]
|
||||
gam <UserTypeEntity> forward thread|thtreads recipient|to <RecipientEntity>
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
quick|notquick] [doit] [max_to_forward <Number>])|(ids <ThreadIDEntity>)
|
||||
[subject <String>] [addorigfieldstosubject [<Boolean>]] [altcharset <String>]
|
||||
|
||||
gam <UserTypeEntity> show messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [max_to_show <Number>] [includespamtrash])|(ids <MessageIDEntity>)
|
||||
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
|
||||
[countsonly|positivecountsonly] [useronly]
|
||||
@@ -7645,6 +7715,7 @@ gam <UserTypeEntity> show messages|threads
|
||||
[uploadattachments [<DriveFileParentAttribute>]]]
|
||||
gam <UserTypeEntity> print messages|threads [todrive <ToDriveAttribute>*]
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [max_to_print <Number>] [includespamtrash])|(ids <MessageIDEntity>)
|
||||
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
|
||||
[countsonly|positivecountsonly] [useronly]
|
||||
@@ -8294,6 +8365,8 @@ gam <UserTypeEntity> print tasklists [todrive <ToDriveAttribute>*]
|
||||
allowcontentmanagerstosharefolders|
|
||||
copyrequireswriterpermission|
|
||||
domainusersonly|
|
||||
downloadrestrictedforreaders|
|
||||
downloadrestrictedforwriters|
|
||||
drivemembersonly|teammembersonly|
|
||||
sharingfoldersrequiresorganizerpermission
|
||||
|
||||
|
||||
@@ -1,3 +1,175 @@
|
||||
7.12.01
|
||||
|
||||
Added support for `plan free` in `gam create resoldsubscription`.
|
||||
|
||||
* The free plan is exclusive to the Cloud Identity SKU and does not incur any billing.
|
||||
|
||||
7.12.00
|
||||
|
||||
Started updated handling of missing scopes messages in client access commands;
|
||||
this is a work in progress.
|
||||
|
||||
Updated `gam info|show shareddrive` to handle changes in the Drive API that caused traps.
|
||||
|
||||
Added `downloadrestrictedforreaders` and `downloadrestrictedforwriters` to
|
||||
`<SharedDriveRestrictionsSubfieldName>` to support new Shared Drive restrictions.
|
||||
|
||||
Updated `gam course <CourseID> create|update announcement` to accept input from
|
||||
a literal string, a file or a Google Doc.
|
||||
```
|
||||
<CourseAnnouncementContent> ::=
|
||||
((text <String>)|
|
||||
(textfile <FileName> [charset <Charset>])|
|
||||
(gdoc <UserGoogleDoc>)|
|
||||
(gcsdoc <StorageBucketObjectName>))
|
||||
```
|
||||
|
||||
Added command `gam check suspended <UserItem>` that checks the suspension status of a user
|
||||
and sets the return code to 0 if the user is not suspended or 26 if it is.
|
||||
```
|
||||
$ gam check suspended testok@domain.com
|
||||
User: testok@domain.com, Account Suspended: False
|
||||
$ echo $?
|
||||
0
|
||||
|
||||
$ gam check suspended testsusp@domain.com
|
||||
User: testsusp@domain.com, Account Suspended: True, Suspension Reason: ADMIN
|
||||
$ echo $?
|
||||
26
|
||||
```
|
||||
|
||||
Updated `gam <UserTypeEntity> sendemail` to verify that one of `recipient|to|from`
|
||||
immediately follows `sendemail`.
|
||||
|
||||
7.11.00
|
||||
|
||||
Added commands to manage classroom/course announcements.
|
||||
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Classroom-Courses#manage-course-announcements
|
||||
|
||||
Upgraded to OpenSSL 3.5.1.
|
||||
|
||||
7.10.10
|
||||
|
||||
Added choices `text` and `hyperlink` to option `showwebviewlink` in `gam [<UserTypeEntity>] print|show shareddrives`.
|
||||
* `showwebviewlink text` - Displays `https://drive.google.com/drive/folders/<SharedDriveID>`
|
||||
* `showwebviewlink hyperlink` - Displays `=HYPERLINK("https://drive.google.com/drive/folders/<SharedDriveID>", "<SharedDriveName>")`
|
||||
|
||||
7.10.09
|
||||
|
||||
Added option `showwebviewlink` to `gam [<UserTypeEntity>] print|show shareddrives` that
|
||||
displays the web view link for the Shared Drive: `https://drive.google.com/drive/folders/<SharedDriveID>`.
|
||||
|
||||
7.10.08
|
||||
|
||||
Fixed bug in commands that modify messages where the `labelids <LabelIdList>` option
|
||||
could not be used unless one of these options was also specified: `query`, `matchlabel`, `ids`;
|
||||
it can be now be used by itself.
|
||||
|
||||
7.10.07
|
||||
|
||||
Updated `gam <UserTypeEntity> copy|move drivefile` to hanndle additional instances of
|
||||
the `cannotModifyInheritedPermission` error.
|
||||
|
||||
Added license SKU `Google AI Ultra for Business`
|
||||
* ProductID - 101047
|
||||
* SKUID - 1010470008 | geminiultra
|
||||
|
||||
7.10.06
|
||||
|
||||
Added option `clientstates` to `gam print devices` to include client states in device output.
|
||||
|
||||
7.10.05
|
||||
|
||||
Google renamed an error: `cannotModifyInheritedTeamDrivePermission` became `cannotModifyInheritedPermission`.
|
||||
GAM will now handle the new error.
|
||||
|
||||
7.10.04
|
||||
|
||||
Updated `gam report <ActivityApplicationName>` to accept accept application names as defined
|
||||
in the Reports API discovery document; this means that GAM does not have to be updated when
|
||||
Google defines a new application name.
|
||||
|
||||
`gemini_in_workspace_apps` is now available in `gam report`.
|
||||
|
||||
7.10.03
|
||||
|
||||
Fixed bug in commands that modify messages where the `labelids <LabelIdList>` option
|
||||
was not being applied.
|
||||
|
||||
7.10.02
|
||||
|
||||
Added option `labelids <LabelIdList>` to all commands that process messages;
|
||||
this option causes GAM to only return messages with labels that match all of the specified label IDs.
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show forms` to always display `isPublished` and
|
||||
`isAcceptingResponses` in `publishSettings/publishState` regardless of their value;
|
||||
the API doesn't return these values when they are False.
|
||||
|
||||
7.10.01
|
||||
|
||||
Added options `ispublished [<Boolean>]` and `isacceptingresponses [<Boolean>]` to
|
||||
`gam <UserTypeEntity> create|update form`.
|
||||
|
||||
7.10.00
|
||||
|
||||
Added commands to manage/display Chat Custom Emojis.
|
||||
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Users-Chat#manage-chat-emojis
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Users-Chat#display-chat-emojis
|
||||
|
||||
Updated `gam <UserItem> print|show chatspaces|chatmembers asadmin` to display
|
||||
the spaces in ascending display name order.
|
||||
|
||||
7.09.07
|
||||
|
||||
Added `webviewlink` to `<FileTreeFieldName>` for use in `gam <UserTypeEntity> print|show filetree`.
|
||||
|
||||
7.09.06
|
||||
|
||||
Upddated `gam print|show shareddrives`, `gam print|show shareddriveacls`, `gam print shareddriveorganizers`
|
||||
to display the Shared Drives in ascending name order; the API returns them in an unidentifiable order.
|
||||
|
||||
7.09.05
|
||||
|
||||
Improved output of `gam info|show chromeschemas [std]` to more accurately display the schemas.
|
||||
|
||||
Fixed bugs in `gam update chromepolicy` that caused invalid error messaages.
|
||||
|
||||
7.09.04
|
||||
|
||||
Fixed bug in `gam whatis <EmailItem>` where the check for an invitable user always failed.
|
||||
|
||||
Fixed bug in `gam print shareddriveorganizers` where no organizers were displayed when `domain` in `gam.cfg` was blank.
|
||||
|
||||
Updated to Python 3.13.5
|
||||
|
||||
7.09.03
|
||||
|
||||
Updated `gam <UserTypeEntity> create focustime|outofoffice ... timerange <Time> <Time>` to check
|
||||
that the first `<Time>` is less than the second `Time`; previously the event was not created.
|
||||
|
||||
For new installs the `enforce_expansive_access` Boolean variable in `gam.cfg` now defaults to True.
|
||||
For existing installations, if `enforce_expansive_access` has not been added to `gam.cfg`,
|
||||
a default value of True will be used.
|
||||
|
||||
7.09.02
|
||||
|
||||
Added command `gam info chromeschema std <SchemaName>` to display a Chrome policy schema in the same format as Legacy GAM.
|
||||
|
||||
Improved output of `gam show chromeschemas [std]` and `gam info chromeschema [std]` to more accurately display the schemas.
|
||||
|
||||
7.09.01
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print diskusage` where the `ownedByMe` column was
|
||||
blank for the top folder.
|
||||
|
||||
Fixed bug in `gam update chromepolicy` where the following error was generated
|
||||
when updating policies with simple numerical values.
|
||||
```
|
||||
ERROR: Missing argument: Expected <value>"
|
||||
```
|
||||
|
||||
7.09.00
|
||||
|
||||
Removed the overly broad service account `IAM and Access Management API` scope `https://www.googleapis.com/auth/cloud-platform`
|
||||
|
||||
1768
src/gam/__init__.py
1768
src/gam/__init__.py
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,7 @@ ANALYTICS_ADMIN = 'analyticsadmin'
|
||||
CALENDAR = 'calendar'
|
||||
CBCM = 'cbcm'
|
||||
CHAT = 'chat'
|
||||
CHAT_CUSTOM_EMOJIS = 'chatcustomemojis'
|
||||
CHAT_EVENTS = 'chatevents'
|
||||
CHAT_MEMBERSHIPS = 'chatmemberships'
|
||||
CHAT_MEMBERSHIPS_ADMIN = 'chatmembershipsadmin'
|
||||
@@ -210,6 +211,7 @@ _INFO = {
|
||||
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},
|
||||
CHAT_CUSTOM_EMOJIS: {'name': 'Chat API - Custom Emojis', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
CHAT_EVENTS: {'name': 'Chat API - Events', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
CHAT_MEMBERSHIPS: {'name': 'Chat API - Memberships', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
CHAT_MEMBERSHIPS_ADMIN: {'name': 'Chat API - Memberships Admin', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHAT},
|
||||
@@ -224,15 +226,15 @@ _INFO = {
|
||||
CHROMEMANAGEMENT_TELEMETRY: {'name': 'Chrome Management API - Telemetry', 'version': 'v1', 'v2discovery': True, 'mappedAPI': CHROMEMANAGEMENT},
|
||||
CHROMEPOLICY: {'name': 'Chrome Policy API', 'version': 'v1', 'v2discovery': True},
|
||||
CHROMEVERSIONHISTORY: {'name': 'Chrome Version History API', 'version': 'v1', 'v2discovery': True},
|
||||
CLOUDCHANNEL: {'name': 'Channel Channel API', 'version': 'v1', 'v2discovery': True},
|
||||
CLOUDIDENTITY_DEVICES: {'name': 'Cloud Identity Devices API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_GROUPS: {'name': 'Cloud Identity Groups API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_GROUPS_BETA: {'name': 'Cloud Identity Groups API', 'version': 'v1beta1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_INBOUND_SSO: {'name': 'Cloud Identity Inbound SSO API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_ORGUNITS: {'name': 'Cloud Identity OrgUnits API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_ORGUNITS_BETA: {'name': 'Cloud Identity OrgUnits API', 'version': 'v1beta1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_POLICY: {'name': 'Cloud Identity Policy API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_USERINVITATIONS: {'name': 'Cloud Identity User Invitations API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDCHANNEL: {'name': 'Cloud Channel API', 'version': 'v1', 'v2discovery': True},
|
||||
CLOUDIDENTITY_DEVICES: {'name': 'Cloud Identity API - Devices', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_GROUPS: {'name': 'Cloud Identity API - Groups', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_GROUPS_BETA: {'name': 'Cloud Identity API - Groups Beta', 'version': 'v1beta1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_INBOUND_SSO: {'name': 'Cloud Identity API - Inbound SSO Settings', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_ORGUNITS: {'name': 'Cloud Identity API - OrgUnits', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_ORGUNITS_BETA: {'name': 'Cloud Identity API - OrgUnits Beta', 'version': 'v1beta1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_POLICY: {'name': 'Cloud Identity API - Policy', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDIDENTITY_USERINVITATIONS: {'name': 'Cloud Identity API - User Invitations', 'version': 'v1', 'v2discovery': True, 'mappedAPI': 'cloudidentity'},
|
||||
CLOUDRESOURCEMANAGER: {'name': 'Cloud Resource Manager API v3', 'version': 'v3', 'v2discovery': True},
|
||||
CONTACTS: {'name': 'Contacts API', 'version': 'v3', 'v2discovery': False},
|
||||
CONTACTDELEGATION: {'name': 'Contact Delegation API', 'version': 'v1', 'v2discovery': True, 'localjson': True},
|
||||
@@ -256,13 +258,13 @@ _INFO = {
|
||||
LICENSING: {'name': 'License Manager API', 'version': 'v1', 'v2discovery': True},
|
||||
LOOKERSTUDIO: {'name': 'Looker Studio API', 'version': 'v1', 'v2discovery': True, 'localjson': True},
|
||||
MEET: {'name': 'Meet API', 'version': 'v2', 'v2discovery': True},
|
||||
MEET_BETA: {'name': 'Meet API', 'version': 'v2beta', 'v2discovery': True, 'localjson': True, 'mappedAPI': MEET},
|
||||
MEET_BETA: {'name': 'Meet API Beta', 'version': 'v2beta', 'v2discovery': True, 'localjson': True, 'mappedAPI': MEET},
|
||||
OAUTH2: {'name': 'OAuth2 API', 'version': 'v2', 'v2discovery': False},
|
||||
ORGPOLICY: {'name': 'Organization Policy API', 'version': 'v2', 'v2discovery': True},
|
||||
PEOPLE: {'name': 'People API', 'version': 'v1', 'v2discovery': True},
|
||||
PEOPLE_DIRECTORY: {'name': 'People Directory API', 'version': 'v1', 'v2discovery': True, 'mappedAPI': PEOPLE},
|
||||
PEOPLE_OTHERCONTACTS: {'name': 'People API - Other Contacts', 'version': 'v1', 'v2discovery': True, 'mappedAPI': PEOPLE},
|
||||
PRINTERS: {'name': 'Directory API Printers', 'version': 'directory_v1', 'v2discovery': True, 'mappedAPI': 'admin'},
|
||||
PRINTERS: {'name': 'Directory API - Printers', 'version': 'directory_v1', 'v2discovery': True, 'mappedAPI': 'admin'},
|
||||
PUBSUB: {'name': 'Pub / Sub API', 'version': 'v1', 'v2discovery': True},
|
||||
REPORTS: {'name': 'Reports API', 'version': 'reports_v1', 'v2discovery': True, 'mappedAPI': 'admin'},
|
||||
RESELLER: {'name': 'Reseller API', 'version': 'v1', 'v2discovery': True},
|
||||
@@ -360,29 +362,29 @@ _CLIENT_SCOPES = [
|
||||
'subscopes': READONLY,
|
||||
'offByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/apps.order'},
|
||||
{'name': 'Cloud Identity Groups API',
|
||||
{'name': 'Cloud Identity API - Groups',
|
||||
'api': CLOUDIDENTITY_GROUPS,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/cloud-identity.groups'},
|
||||
{'name': 'Cloud Identity Groups API Beta (Enables group locking/unlocking)',
|
||||
{'name': 'Cloud Identity API - Groups Beta (Enables group locking/unlocking)',
|
||||
'api': CLOUDIDENTITY_GROUPS_BETA,
|
||||
'subscopes': [],
|
||||
'scope': 'https://www.googleapis.com/auth/cloud-identity.groups'},
|
||||
{'name': 'Cloud Identity - Inbound SSO Settings',
|
||||
{'name': 'Cloud Identity API - Inbound SSO Settings',
|
||||
'api': CLOUDIDENTITY_INBOUND_SSO,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/cloud-identity.inboundsso'},
|
||||
{'name': 'Cloud Identity OrgUnits API',
|
||||
{'name': 'Cloud Identity API - OrgUnits Beta',
|
||||
'api': CLOUDIDENTITY_ORGUNITS_BETA,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/cloud-identity.orgunits'},
|
||||
{'name': 'Cloud Identity - Policy',
|
||||
{'name': 'Cloud Identity API - Policy',
|
||||
'api': CLOUDIDENTITY_POLICY,
|
||||
'subscopes': READONLY,
|
||||
'roByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/cloud-identity.policies'
|
||||
},
|
||||
{'name': 'Cloud Identity User Invitations API',
|
||||
{'name': 'Cloud Identity API - User Invitations',
|
||||
'api': CLOUDIDENTITY_USERINVITATIONS,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/cloud-identity.userinvitations'},
|
||||
@@ -544,6 +546,10 @@ _SVCACCT_SCOPES = [
|
||||
'api': CALENDAR,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/calendar'},
|
||||
{'name': 'Chat API - Custom Emojis',
|
||||
'api': CHAT_CUSTOM_EMOJIS,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/chat.customemojis'},
|
||||
{'name': 'Chat API - Memberships',
|
||||
'api': CHAT_MEMBERSHIPS,
|
||||
'subscopes': READONLY,
|
||||
@@ -644,7 +650,7 @@ _SVCACCT_SCOPES = [
|
||||
'api': GMAIL,
|
||||
'subscopes': [],
|
||||
'scope': 'https://www.googleapis.com/auth/gmail.modify'},
|
||||
{'name': 'Gmail API - Basic Settings (Filters,IMAP, Language, POP, Vacation) - read/write, Sharing Settings (Delegates, Forwarding, SendAs) - read',
|
||||
{'name': 'Gmail API - Basic Settings (Filters, IMAP, Language, POP, Vacation) - read/write, Sharing Settings (Delegates, Forwarding, SendAs) - read',
|
||||
'api': GMAIL,
|
||||
'subscopes': [],
|
||||
'scope': 'https://www.googleapis.com/auth/gmail.settings.basic'},
|
||||
@@ -827,3 +833,27 @@ def getSvcAcctScopesList(userServiceAccountAccessOnly, svcAcctSpecialScopes):
|
||||
|
||||
def hasLocalJSON(api):
|
||||
return _INFO[api].get('localjson', False)
|
||||
|
||||
def findAPIforScope(scopesList):
|
||||
def checkScopeMatch(scope, cscope):
|
||||
if cscope['scope'] == scope:
|
||||
requiredAPIs.append(cscope['name'])
|
||||
return True
|
||||
if cscope['subscopes'] == READONLY and cscope['scope']+'.readonly' == scope:
|
||||
requiredAPIs.append(cscope['name']+' (supports readonly)')
|
||||
return True
|
||||
return False
|
||||
|
||||
requiredAPIs = []
|
||||
for scope in scopesList:
|
||||
for cscope in _CLIENT_SCOPES:
|
||||
if checkScopeMatch(scope, cscope):
|
||||
break
|
||||
else:
|
||||
for cscope in _SVCACCT_SCOPES:
|
||||
if checkScopeMatch(scope, cscope):
|
||||
break
|
||||
if not requiredAPIs:
|
||||
requiredAPIs = scopesList
|
||||
return ' or '.join(requiredAPIs)
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ Defaults = {
|
||||
DEVICE_MAX_RESULTS: '200',
|
||||
DOMAIN: '',
|
||||
DRIVE_DIR: '',
|
||||
ENFORCE_EXPANSIVE_ACCESS: FALSE,
|
||||
ENFORCE_EXPANSIVE_ACCESS: TRUE,
|
||||
DRIVE_MAX_RESULTS: '1000',
|
||||
DRIVE_V3_BETA: FALSE,
|
||||
DRIVE_V3_NATIVE_NAMES: TRUE,
|
||||
|
||||
@@ -461,6 +461,8 @@ class GamCLArgs():
|
||||
ARG_CHANNELSKU = 'channelsku'
|
||||
ARG_CHANNELSKUS = 'channelskus'
|
||||
ARG_CHAT = 'chat'
|
||||
ARG_CHATEMOJI = 'chatemoji'
|
||||
ARG_CHATEMOJIS = 'chatemojis'
|
||||
ARG_CHATEVENT = 'chatevent'
|
||||
ARG_CHATEVENTS = 'chatevents'
|
||||
ARG_CHATMEMBER = 'chatmember'
|
||||
@@ -775,6 +777,7 @@ class GamCLArgs():
|
||||
ARG_STORAGEBUCKETS = 'storagebuckets'
|
||||
ARG_STORAGEFILE = 'storagefile'
|
||||
ARG_STORAGEFILES = 'storagefiles'
|
||||
ARG_SUSPENDED = 'suspended'
|
||||
ARG_SVCACCT = 'svcacct'
|
||||
ARG_SVCACCTS = 'svcaccts'
|
||||
ARG_TASK = 'task'
|
||||
@@ -843,6 +846,8 @@ class GamCLArgs():
|
||||
OB_CHARACTER = 'Character'
|
||||
OB_CHAR_SET = 'CharacterSet'
|
||||
OG_CHAT_ATTACHMENT = 'ChatAttachment'
|
||||
OB_CHAT_EMOJI = 'ChatEmoji'
|
||||
OB_CHAT_EMOJI_NAME = 'ChatEmojiName'
|
||||
OB_CHAT_EVENT = 'ChatEvent'
|
||||
OB_CHAT_MEMBER = 'ChatMember'
|
||||
OB_CHAT_MESSAGE = 'ChatMessage'
|
||||
@@ -871,8 +876,11 @@ class GamCLArgs():
|
||||
OB_CONTACT_GROUP_ITEM = 'ContactGroupItem'
|
||||
OB_COURSE_ALIAS = 'CourseAlias'
|
||||
OB_COURSE_ALIAS_ENTITY = 'CourseAliasEntity'
|
||||
OB_COURSE_ANNOUNCEMENT_ID = "CourseAnnouncementID"
|
||||
OB_COURSE_ANNOUNCEMENT_ID_ENTITY = "CourseAnnouncementIDEntity"
|
||||
OB_COURSE_ANNOUNCEMENT_STATE_LIST = "CourseAnnouncementStateList"
|
||||
OB_COURSE_ANNOUNCEMENT_ADD_STATE_LIST = "CourseAnnouncementAddStateList"
|
||||
OB_COURSE_ANNOUNCEMENT_UPDATE_STATE_LIST = "CourseAnnouncementUpdateStateList"
|
||||
OB_COURSE_ENTITY = 'CourseEntity'
|
||||
OB_COURSE_ID = 'CourseID'
|
||||
OB_COURSE_MATERIAL_ID_ENTITY = 'CourseMaterialIDEntity'
|
||||
@@ -930,6 +938,7 @@ class GamCLArgs():
|
||||
OB_FILE_NAME = 'FileName'
|
||||
OB_FILE_NAME_FIELD_NAME = OB_FILE_NAME+'(:'+OB_FIELD_NAME+')+'
|
||||
OB_FILE_NAME_OR_URL = 'FileName|URL'
|
||||
OB_FILE_NAME_PATTERN = 'FileNamePattern'
|
||||
OB_FILE_PATH = 'FilePath'
|
||||
OB_FILTER_ID_ENTITY = 'FilterIDEntity'
|
||||
OB_FORMAT_LIST = 'FormatList'
|
||||
@@ -975,7 +984,6 @@ class GamCLArgs():
|
||||
OB_PERMISSION_ID_LIST = 'PermissionIDList'
|
||||
OB_PERMISSION_ROLE_LIST = 'PermissionRoleList'
|
||||
OB_PERMISSION_TYPE_LIST = 'PermissionTypeList'
|
||||
OB_PHOTO_FILENAME_PATTERN = 'FilenameNamePattern'
|
||||
OB_PRINTER_ID = 'PrinterID'
|
||||
OB_PRIVILEGE_LIST = 'PrivilegeList'
|
||||
OB_PRODUCT_ID = 'ProductID'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2024 Ross Scroggs All Rights Reserved.
|
||||
# Copyright (C) 2025 Ross Scroggs All Rights Reserved.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
@@ -86,6 +86,7 @@ class GamEntity():
|
||||
CHANNEL_SKU = 'chsk'
|
||||
CHAT_BOT = 'chbo'
|
||||
CHAT_ADMIN = 'chad'
|
||||
CHAT_EMOJI = 'chem'
|
||||
CHAT_EVENT = 'chev'
|
||||
CHAT_MANAGER_USER = 'chgu'
|
||||
CHAT_MEMBER = 'chme'
|
||||
@@ -436,6 +437,7 @@ class GamEntity():
|
||||
CHANNEL_SKU: ['Channel SKUs', 'Channel SKU'],
|
||||
CHAT_BOT: ['Chat BOTs', 'Chat BOT'],
|
||||
CHAT_ADMIN: ['Chat Admins', 'Chat Admin'],
|
||||
CHAT_EMOJI: ['Chat Emojis', 'Chat Emoji'],
|
||||
CHAT_EVENT: ['Chat Events', 'Chat Event'],
|
||||
CHAT_MANAGER_USER: ['Chat User Managers', 'Chat User Manager'],
|
||||
CHAT_MESSAGE: ['Chat Messages', 'Chat Message'],
|
||||
|
||||
@@ -41,6 +41,7 @@ CANNOT_DELETE_PERMISSION = 'cannotDeletePermission'
|
||||
CANNOT_DELETE_PRIMARY_CALENDAR = 'cannotDeletePrimaryCalendar'
|
||||
CANNOT_DELETE_PRIMARY_SENDAS = 'cannotDeletePrimarySendAs'
|
||||
CANNOT_DELETE_RESOURCE_WITH_CHILDREN = 'cannotDeleteResourceWithChildren'
|
||||
CANNOT_MODIFY_INHERITED_PERMISSION = 'cannotModifyInheritedPermission'
|
||||
CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION = 'cannotModifyInheritedTeamDrivePermission'
|
||||
CANNOT_MODIFY_RESTRICTED_LABEL = 'cannotModifyRestrictedLabel'
|
||||
CANNOT_MODIFY_VIEWERS_CAN_COPY_CONTENT = 'cannotModifyViewersCanCopyContent'
|
||||
@@ -133,6 +134,7 @@ OPERATION_NOT_SUPPORTED = 'operationNotSupported'
|
||||
ORGANIZER_ON_NON_TEAMDRIVE_NOT_SUPPORTED = 'organizerOnNonTeamDriveNotSupported'
|
||||
ORGANIZER_ON_NON_TEAMDRIVE_ITEM_NOT_SUPPORTED = 'organizerOnNonTeamDriveItemNotSupported'
|
||||
ORGUNIT_NOT_FOUND = 'orgunitNotFound'
|
||||
OUTSIDE_DOMAIN_MEMBER_CANNOT_CHANGE_TEAMDRIVE_RESTRICTIONS = 'outsideDomainMemberCannotChangeTeamDriveRestrictions'
|
||||
OWNER_ON_TEAMDRIVE_ITEM_NOT_SUPPORTED = 'ownerOnTeamDriveItemNotSupported'
|
||||
OWNERSHIP_CHANGE_ACROSS_DOMAIN_NOT_PERMITTED = 'ownershipChangeAcrossDomainNotPermitted'
|
||||
PARTICIPANT_IS_NEITHER_ORGANIZER_NOR_ATTENDEE = 'participantIsNeitherOrganizerNorAttendee'
|
||||
@@ -228,6 +230,7 @@ DRIVE3_CREATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID, INVALID_SHARING_REQUEST
|
||||
FILE_ORGANIZER_NOT_YET_ENABLED_FOR_THIS_TEAMDRIVE,
|
||||
FILE_ORGANIZER_ON_FOLDERS_IN_SHARED_DRIVE_ONLY,
|
||||
FILE_ORGANIZER_ON_NON_TEAMDRIVE_NOT_SUPPORTED,
|
||||
CANNOT_MODIFY_INHERITED_PERMISSION,
|
||||
TEAMDRIVES_FOLDER_SHARING_NOT_SUPPORTED, INVALID_LINK_VISIBILITY, ABUSIVE_CONTENT_RESTRICTION]
|
||||
DRIVE3_GET_ACL_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, FORBIDDEN, INTERNAL_ERROR,
|
||||
INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, INSUFFICIENT_FILE_PERMISSIONS,
|
||||
@@ -248,10 +251,10 @@ DRIVE3_UPDATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID_OWNERSHIP_TRANSFER, CANN
|
||||
FILE_ORGANIZER_ON_FOLDERS_IN_SHARED_DRIVE_ONLY,
|
||||
FILE_ORGANIZER_ON_NON_TEAMDRIVE_NOT_SUPPORTED,
|
||||
CANNOT_UPDATE_PERMISSION,
|
||||
CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION,
|
||||
CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION, CANNOT_MODIFY_INHERITED_PERMISSION,
|
||||
FIELD_NOT_WRITABLE, PERMISSION_NOT_FOUND]
|
||||
DRIVE3_DELETE_ACL_THROW_REASONS = [BAD_REQUEST, CANNOT_REMOVE_OWNER,
|
||||
CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION,
|
||||
CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION, CANNOT_MODIFY_INHERITED_PERMISSION,
|
||||
INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, SHARING_RATE_LIMIT_EXCEEDED,
|
||||
NOT_FOUND, PERMISSION_NOT_FOUND, CANNOT_DELETE_PERMISSION]
|
||||
DRIVE3_MODIFY_LABEL_THROW_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, NOT_FOUND, FORBIDDEN, INTERNAL_ERROR,
|
||||
@@ -273,11 +276,11 @@ GROUP_SETTINGS_THROW_REASONS = [NOT_FOUND, GROUP_NOT_FOUND, DOMAIN_NOT_FOUND, DO
|
||||
INVALID, INVALID_ARGUMENT, INVALID_PARAMETER, INVALID_ATTRIBUTE_VALUE, INVALID_INPUT,
|
||||
SERVICE_LIMIT, SERVICE_NOT_AVAILABLE, AUTH_ERROR, REQUIRED]
|
||||
GROUP_SETTINGS_RETRY_REASONS = [INVALID, SERVICE_LIMIT, SERVICE_NOT_AVAILABLE]
|
||||
GROUP_LIST_THROW_REASONS = [RESOURCE_NOT_FOUND, DOMAIN_NOT_FOUND, FORBIDDEN, BAD_REQUEST]
|
||||
GROUP_LIST_THROW_REASONS = [RESOURCE_NOT_FOUND, DOMAIN_NOT_FOUND, FORBIDDEN, BAD_REQUEST, PERMISSION_DENIED]
|
||||
GROUP_LIST_USERKEY_THROW_REASONS = GROUP_LIST_THROW_REASONS+[INVALID_MEMBER, INVALID_INPUT]
|
||||
KEEP_THROW_REASONS = [AUTH_ERROR, BAD_REQUEST, PERMISSION_DENIED, INVALID_ARGUMENT, NOT_FOUND]
|
||||
LOOKERSTUDIO_THROW_REASONS = [INVALID_ARGUMENT, SERVICE_NOT_AVAILABLE, BAD_REQUEST, NOT_FOUND, PERMISSION_DENIED, INTERNAL_ERROR]
|
||||
MEMBERS_THROW_REASONS = [GROUP_NOT_FOUND, DOMAIN_NOT_FOUND, DOMAIN_CANNOT_USE_APIS, INVALID, FORBIDDEN, SERVICE_NOT_AVAILABLE]
|
||||
MEMBERS_THROW_REASONS = [GROUP_NOT_FOUND, DOMAIN_NOT_FOUND, DOMAIN_CANNOT_USE_APIS, INVALID, FORBIDDEN, SERVICE_NOT_AVAILABLE, PERMISSION_DENIED]
|
||||
MEMBERS_RETRY_REASONS = [SYSTEM_ERROR, SERVICE_NOT_AVAILABLE]
|
||||
ORGUNIT_GET_THROW_REASONS = [INVALID_ORGUNIT, ORGUNIT_NOT_FOUND, BACKEND_ERROR, BAD_REQUEST, INVALID_CUSTOMER_ID, LOGIN_REQUIRED]
|
||||
PEOPLE_ACCESS_THROW_REASONS = [SERVICE_NOT_AVAILABLE, FORBIDDEN, PERMISSION_DENIED, FAILED_PRECONDITION]
|
||||
@@ -398,6 +401,8 @@ class cannotDeletePrimarySendAs(Exception):
|
||||
pass
|
||||
class cannotDeleteResourceWithChildren(Exception):
|
||||
pass
|
||||
class cannotModifyInheritedPermission(Exception):
|
||||
pass
|
||||
class cannotModifyInheritedTeamDrivePermission(Exception):
|
||||
pass
|
||||
class cannotModifyRestrictedLabel(Exception):
|
||||
@@ -574,6 +579,8 @@ class organizerOnNonTeamDriveItemNotSupported(Exception):
|
||||
pass
|
||||
class orgunitNotFound(Exception):
|
||||
pass
|
||||
class outsideDomainMemberCannotChangeTeamDriveRestrictions(Exception):
|
||||
pass
|
||||
class ownerOnTeamDriveItemNotSupported(Exception):
|
||||
pass
|
||||
class ownershipChangeAcrossDomainNotPermitted(Exception):
|
||||
@@ -698,6 +705,7 @@ REASON_EXCEPTION_MAP = {
|
||||
CANNOT_DELETE_PRIMARY_CALENDAR: cannotDeletePrimaryCalendar,
|
||||
CANNOT_DELETE_PRIMARY_SENDAS: cannotDeletePrimarySendAs,
|
||||
CANNOT_DELETE_RESOURCE_WITH_CHILDREN: cannotDeleteResourceWithChildren,
|
||||
CANNOT_MODIFY_INHERITED_PERMISSION: cannotModifyInheritedPermission,
|
||||
CANNOT_MODIFY_INHERITED_TEAMDRIVE_PERMISSION: cannotModifyInheritedTeamDrivePermission,
|
||||
CANNOT_MODIFY_RESTRICTED_LABEL: cannotModifyRestrictedLabel,
|
||||
CANNOT_MODIFY_VIEWERS_CAN_COPY_CONTENT: cannotModifyViewersCanCopyContent,
|
||||
@@ -786,6 +794,7 @@ REASON_EXCEPTION_MAP = {
|
||||
ORGANIZER_ON_NON_TEAMDRIVE_NOT_SUPPORTED: organizerOnNonTeamDriveNotSupported,
|
||||
ORGANIZER_ON_NON_TEAMDRIVE_ITEM_NOT_SUPPORTED: organizerOnNonTeamDriveItemNotSupported,
|
||||
ORGUNIT_NOT_FOUND: orgunitNotFound,
|
||||
OUTSIDE_DOMAIN_MEMBER_CANNOT_CHANGE_TEAMDRIVE_RESTRICTIONS: outsideDomainMemberCannotChangeTeamDriveRestrictions,
|
||||
OWNER_ON_TEAMDRIVE_ITEM_NOT_SUPPORTED: ownerOnTeamDriveItemNotSupported,
|
||||
OWNERSHIP_CHANGE_ACROSS_DOMAIN_NOT_PERMITTED: ownershipChangeAcrossDomainNotPermitted,
|
||||
PARTICIPANT_IS_NEITHER_ORGANIZER_NOR_ATTENDEE: participantIsNeitherOrganizerNorAttendee,
|
||||
|
||||
@@ -184,8 +184,8 @@ ALREADY_EXISTS_IN_TARGET_FOLDER = 'Already exists in {0}: {1}'
|
||||
ALREADY_EXISTS_USE_MERGE_ARGUMENT = 'Already exists; use the "merge" argument to merge the labels'
|
||||
API_ACCESS_DENIED = 'API access Denied'
|
||||
API_CALLS_RETRY_DATA = 'API calls retry data\n'
|
||||
API_CHECK_CLIENT_AUTHORIZATION = 'Please make sure the Client ID: {0} is authorized for the appropriate API or scopes:\n{1}\n\nRun: gam oauth create\n'
|
||||
API_CHECK_SVCACCT_AUTHORIZATION = 'Please make sure the Service Account Client ID: {0} is authorized for the appropriate API or scopes:\n{1}\n\nRun: gam user {2} update serviceaccount\n'
|
||||
API_CHECK_CLIENT_AUTHORIZATION = 'Please make sure the Client ID: {0} is authorized for the appropriate API or scopes: {1}\n\nRun: gam oauth create\n'
|
||||
API_CHECK_SVCACCT_AUTHORIZATION = 'Please make sure the Service Account Client ID: {0} is authorized for the appropriate API or scopes: {1}\n\nRun: gam user {2} update serviceaccount\n'
|
||||
API_ERROR_SETTINGS = 'API error, some settings not set'
|
||||
ARE_BOTH_REQUIRED = 'Arguments {0} and {1} are both required'
|
||||
ARE_MUTUALLY_EXCLUSIVE = 'Arguments {0} and {1} are mutually exclusive'
|
||||
@@ -309,7 +309,9 @@ INVALID_ALIAS = 'Invalid Alias'
|
||||
INVALID_ATTENDEE_CHANGE = 'Invalid attendee change "{0}"'
|
||||
INVALID_CHARSET = 'Invalid charset "{0}"'
|
||||
INVALID_DATE_TIME_RANGE = '{0} {1} must be greater than/equal to {2} {3}'
|
||||
INVALID_EMOJI_NAME = '{0} does not match pattern :[0-9a-z_-]:'
|
||||
INVALID_ENTITY = 'Invalid {0}, {1}'
|
||||
INVALID_EVENT_TIMERANGE = '{0} {1} must be less than {2}'
|
||||
INVALID_FILE_SELECTION_WITH_ADMIN_ACCESS = 'Invalid file selection with adminaccess|asadmin'
|
||||
INVALID_GROUP = 'Invalid Group'
|
||||
INVALID_HTTP_HEADER = 'Invalid http header data: {0}'
|
||||
@@ -423,7 +425,7 @@ NO_LABELS_TO_PROCESS = 'No Labels to process'
|
||||
NO_MESSAGES_WITH_LABEL = 'No Messages with Label'
|
||||
NO_PARENTS_TO_CONVERT_TO_SHORTCUTS = 'No parents to convert to shortcuts'
|
||||
NO_REPORT_AVAILABLE = 'No {0} report available.'
|
||||
NO_SCOPES_FOR_API = 'There are no scopes authorized for the {0}'
|
||||
NO_SCOPES_FOR_API = 'There are no scopes authorized for the API(s): {0}'
|
||||
NO_SERIAL_NUMBERS_SPECIFIED = 'No serial numbers specified'
|
||||
NO_SSO_PROFILE_MATCHES = 'No SSO profile matches display name {0}'
|
||||
NO_SSO_PROFILE_ASSIGNED = 'No SSO profile assigned to {0} {1}'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2023 Ross Scroggs All Rights Reserved.
|
||||
# Copyright (C) 2025 Ross Scroggs All Rights Reserved.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
@@ -107,6 +107,8 @@ _SKUS = {
|
||||
'product': '101047', 'aliases': ['aisecurity'], 'displayName': 'AI Security'},
|
||||
'1010470007': {
|
||||
'product': '101047', 'aliases': ['aimeetingsandmessaging'], 'displayName': 'AI Meetings and Messaging'},
|
||||
'1010470008': {
|
||||
'product': '101047', 'aliases': ['geminiultra'], 'displayName': 'Google AI Ultra for Business'},
|
||||
'1010490001': {
|
||||
'product': '101049', 'aliases': ['eeu'], 'displayName': 'Endpoint Education Upgrade'},
|
||||
'1010500001': {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2023 Ross Scroggs All Rights Reserved.
|
||||
# Copyright (C) 2025 Ross Scroggs All Rights Reserved.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- [Python Regular Expressions](Python-Regular-Expressions)
|
||||
- [Definitions](#definitions)
|
||||
- [Manage Projects](#manage-projects)
|
||||
- [Authorize a super admin to create projects](#authorize-a-super-admin-to-create-projects)
|
||||
- [Authorize a user to create projects](#authorize-a-user-to-create-projects)
|
||||
- [Authorize Service Account Key Uploads](#authorize-service-account-key-uploads)
|
||||
- [Authorize GAM to create projects](#authorize-gam-to-create-projects)
|
||||
- [Create a new GCP project folder](#create-a-new-gcp-project-folder)
|
||||
@@ -74,11 +74,6 @@ Verify that all scopes are available:
|
||||
* Select "ON for everyone"
|
||||
* Click "SAVE"
|
||||
|
||||
Verify that internal apps are trusted.
|
||||
* Access the admin console and go to Security -> Access and data control -> API Controls
|
||||
* Check that "Trust internal, domain-owned apps" is present in the **Settings** section
|
||||
* Click "SAVE"
|
||||
|
||||
If you run a Google Workspace Education SKU, verify that Classroom API is enabled if required.
|
||||
* Access the admin console and go to Apps -> Google Workspace - Classroom
|
||||
* Expand "Data access"
|
||||
@@ -110,12 +105,13 @@ Verify whether the super admin you'll be using is in an OU where reauthenticatio
|
||||
* Access the admin console and go to Security -> Overview
|
||||
* Scroll down and open Google Cloud session control section
|
||||
* Select the OU containing the super admin
|
||||
* If Require reauthentication is selected and Exempt Trusted apps is not checked, you'll have to do `gam oauth create` at whatever frequency is specified
|
||||
* If that sounds unappealing, check Exempt Trusted apps
|
||||
* Click "OVERRIDE"
|
||||
* If Require reauthentication is selected, you'll need either:
|
||||
* uncheck Google Cloud Storage and any other GCP APIs that you selected on `gam oauth create` (reauth is only necessary for GCP APIs)
|
||||
* enable "Exempt Trusted apps"
|
||||
* rerun `gam oauth create` at whatever frequency is specified
|
||||
|
||||
Additional steps may be required if errors are encountered.
|
||||
* [Authorize a super admin to create projects](#authorize-a-super-admin-to-create-projects)
|
||||
* [Authorize a user to create projects](#authorize-a-user-to-create-projects)
|
||||
* [Authorize Service Account Key Uploads](#authorize-service-account-key-uploads)
|
||||
* [Authorize GAM to create projects](#authorize-gam-to-create-projects)
|
||||
|
||||
@@ -169,8 +165,8 @@ For `print|show projects`, you can eliminate the password prompt and authenticat
|
||||
gam print projects admin admin@domain.com
|
||||
```
|
||||
|
||||
## Authorize a super admin to create projects
|
||||
If you try to create a project and get an error saying that the admin you specified is not authorized to create projects,
|
||||
## Authorize a user to create projects
|
||||
If you try to create a project and get an error saying that the user you specified is not authorized to create projects,
|
||||
perform these steps and then retry the create project command.
|
||||
|
||||
* Login as an existing super admin at console.cloud.google.com
|
||||
@@ -184,13 +180,12 @@ perform these steps and then retry the create project command.
|
||||
* Click in the Select a role box
|
||||
* Type project creator in the Filter box
|
||||
* Click Project Creator
|
||||
* Click + Add Another Role
|
||||
* Type orgpolicy.policyAdmin in the Filter box
|
||||
* Click Organization Policy Administrator
|
||||
* Click Save
|
||||
|
||||
## Authorize Service Account Key Uploads
|
||||
|
||||
*IMPORTANT:* Google best practice is to NOT use service account keys. Rather than overriding Google's default policy please consider [running GAM on Google Compute Engine Securely](https://github.com/GAM-team/GAM/wiki/l-Running-GAM-on-Google-Compute-Engine-(GCE)-Securely) so that service account keys are not necessary.
|
||||
|
||||
If you try to create a project and get an error saying that Constraint `constraints/iam.disableServiceAccountKeyUpload violated for service account projects/gam-project-xxxxx`,
|
||||
perform these steps and then you should be able to authorize and use your project.
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
banana|basil|blueberry|flamingo|graphite|grape|
|
||||
lavender|peacock|sage|tangerine|tomato
|
||||
<FileFormat> ::=
|
||||
csv|doc|dot|docx|dotx|epub|html|jpeg|jpg|mht|odp|ods|odt|
|
||||
csv|doc|dot|docx|dotx|epub|html|jpeg|jpg|json|mht|odp|ods|odt|
|
||||
pdf|png|ppt|pot|potx|pptx|rtf|svg|tsv|txt|xls|xlt|xlsx|xltx|zip|
|
||||
ms|microsoft|openoffice|
|
||||
<LabelColorHex> ::=
|
||||
@@ -278,6 +278,8 @@
|
||||
domain:<DomainName>|domain|default
|
||||
<CalendarItem> ::= <EmailAddress>
|
||||
<ChannelCustomerID> ::= <String>
|
||||
<ChatEmojiName> ::= :[0-9a-z_-]+:
|
||||
<ChatEmoji> ::= emojiname <ChatEmojiName> | customemojis/<String>
|
||||
<ChatMember> ::= spaces/<String>/members/<String>
|
||||
<ChatMessage> ::= spaces/<String>/messages/<String>
|
||||
<ChatSpace> ::= spaces/<String> | space <String> | space spaces/<String>
|
||||
@@ -300,6 +302,11 @@
|
||||
<ContactGroupItem> ::= <ContactGroupID>|<ContactGroupName>
|
||||
<CorporaAttribute> ::= alldrives|allteamdrives|domain|onlyteamdrives|user
|
||||
<CourseAlias> ::= <String>
|
||||
<CourseAnnouncementContent> ::=
|
||||
((text <String>)|
|
||||
(textfile <FileName> [charset <Charset>])|
|
||||
(gdoc <UserGoogleDoc>)|
|
||||
(gcsdoc <StorageBucketObjectName>))
|
||||
<CourseAnnouncementID> ::= <Number>
|
||||
<CourseAnnouncementState> ::= draft|published|deleted
|
||||
<CourseID> ::= <Number>|d:<CourseAlias>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@
|
||||
- [Create and update courses](#create-and-update-courses)
|
||||
- [Delete courses](#delete-courses)
|
||||
- [Manage course aliases](#manage-course-aliases)
|
||||
- [Manage course announcements](#manage-course-announcements)
|
||||
- [Manage course topics](#manage-course-topics)
|
||||
- [Display courses](#display-courses)
|
||||
- [Display course counts](#display-course-counts)
|
||||
@@ -55,6 +56,11 @@ gam user user@domain.com check|update serviceaccount
|
||||
<CourseAliasEntity> ::=
|
||||
<CourseAliasList>|<FileSelector>|<CSVFileSelector>|<CSVkmdSelector>|<CSVDataSelector>
|
||||
See: https://github.com/GAM-team/GAM/wiki/Collections-of-Items
|
||||
<CourseAnnouncementContent> ::=
|
||||
((text <String>)|
|
||||
(textfile <FileName> [charset <Charset>])|
|
||||
(gdoc <UserGoogleDoc>)|
|
||||
(gcsdoc <StorageBucketObjectName>))
|
||||
<CourseAnnouncementID> ::= <Number>
|
||||
<CourseAnnouncementIDList> ::= "<CourseAnnouncementID>(,<CourseAnnouncementID>)*"
|
||||
<CourseAnnouncementIDEntity> ::=
|
||||
@@ -389,17 +395,40 @@ These commands can process multiple courses.
|
||||
gam courses <CourseEntity> add alias <CourseAliasEntity>
|
||||
gam courses <CourseEntity> delete alias <CourseAliasEntity>
|
||||
```
|
||||
|
||||
## Manage course announcements
|
||||
These commands can process a single course.
|
||||
```
|
||||
gam course <CourseID> add announcement
|
||||
<CourseAnnouncementContent> [scheduledtime <Time>] [state draft|published]
|
||||
gam course <CourseID> delete announcement <CourseAnnouncementID>
|
||||
gam course <CourseID> update announcement <CourseAnnouncementID>
|
||||
[<CourseAnnouncementContent>] [scheduledtime <Time>] [state published]
|
||||
```
|
||||
These commands can process multiple courses.
|
||||
```
|
||||
gam courses <CourseEntity> add announcement
|
||||
<CourseAnnouncementContent> [scheduledtime <Time>] [state draft|published]
|
||||
gam courses <CourseEntity> delete announcement <CourseAnnouncementIDEntity>
|
||||
gam courses <CourseEntity> update announcement <CourseAnnouncementIDEntity>
|
||||
[<CourseAnnouncementContent>] [scheduledtime <Time>] [state published]
|
||||
```
|
||||
|
||||
## Manage course topics
|
||||
These commands can process a single course.
|
||||
```
|
||||
gam course <CourseID> add topic <CourseTopic>
|
||||
gam course <CourseID> delete topic <CourseTopicID>
|
||||
gam course <CourseID> update topic <CourseTopicID> <CourseTopic>
|
||||
|
||||
```
|
||||
These commands can process multiple courses.
|
||||
```
|
||||
gam courses <CourseEntity> add topic <CourseTopicEntity>
|
||||
gam courses <CourseEntity> delete topic <CourseTopicIDEntity>
|
||||
gam courses <CourseEntity> update topic <CourseTopicIDEntity> <CourseTopic>
|
||||
```
|
||||
|
||||
## Display courses
|
||||
```
|
||||
gam info course <CourseID> [owneremail] [alias|aliases] [show all|students|teachers] [countsonly]
|
||||
|
||||
@@ -211,6 +211,7 @@ gam print devices [todrive <ToDriveAttribute>*]
|
||||
[orderby <DeviceOrderByFieldName> [ascending|descending]]
|
||||
[all|company|personal|nocompanydevices|nopersonaldevices]
|
||||
[nodeviceusers|oneuserperrow]
|
||||
[clientstates]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, all devices are displayed; use the query options to limit the display.
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
|
||||
## Query documentation
|
||||
* [Cloud Identity Groups API - Search Dynamic Groups](https://cloud.google.com/identity/docs/reference/rest/v1/groups#dynamicgroupquery)
|
||||
* [Member REstrictions](https://cloud.google.com/identity/docs/reference/rest/v1/SecuritySettings#MemberRestriction)
|
||||
* [Dynamic Groups Member Attributes](https://cloud.google.com/identity/docs/how-to/dynamic-groups-attributes)
|
||||
* [Member Restrictions](https://cloud.google.com/identity/docs/reference/rest/v1/SecuritySettings#MemberRestriction)
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -12,14 +12,28 @@
|
||||
|
||||
## Notes
|
||||
To use these commands you must update your client access authentication.
|
||||
You'll enter 19R to turn on the Cloud Identity Policy scope; then continue
|
||||
You'll enter 20r to turn on the Cloud Identity Policy scope; then continue
|
||||
with authentication.
|
||||
```
|
||||
gam oauth delete
|
||||
gam oauth create
|
||||
...
|
||||
[R] 19) Cloud Identity - Policy
|
||||
[R] 20) Cloud Identity - Policy (supports readonly)
|
||||
```
|
||||
You must enable access to policies in the GCP cloud console.
|
||||
|
||||
* Login at console.cloud.google.com
|
||||
* In the upper left click the three lines to the left of Google Cloud and select IAM & Admin
|
||||
* Under IAM & Admin select IAM
|
||||
* Click in the box to the right of Google Cloud
|
||||
* Click the three dots at the right and select IAM/Permissions
|
||||
* Now you should be at "Permissions for organization ..."
|
||||
* Click on Grant Access
|
||||
* Enter the GAM project creator address in Principals
|
||||
* Click in the Select a role box
|
||||
* Type orgpolicy.policyAdmin in the Filter box
|
||||
* Click Organization Policy Administrator
|
||||
* Click Save
|
||||
|
||||
## Definitions
|
||||
```
|
||||
|
||||
@@ -33,6 +33,7 @@ ENTITY_IS_A_GROUP_RC = 22
|
||||
ENTITY_IS_A_GROUP_ALIAS_RC = 23
|
||||
ENTITY_IS_AN_UNMANAGED_ACCOUNT_RC = 24
|
||||
ORGUNIT_NOT_EMPTY_RC = 25
|
||||
USER_SUSPENDED_RC = 26
|
||||
CHECK_USER_GROUPS_ERROR_RC = 29
|
||||
ORPHANS_COLLECTED_RC = 30
|
||||
# Warnings/Errors
|
||||
|
||||
@@ -10,6 +10,172 @@ 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.12.00
|
||||
|
||||
Started updated handling of missing scopes messages in client access commands;
|
||||
this is a work in progress.
|
||||
|
||||
Updated `gam info|show shareddrive` to handle changes in the Drive API that caused traps.
|
||||
|
||||
Added `downloadrestrictedforreaders` and `downloadrestrictedforwriters` to
|
||||
`<SharedDriveRestrictionsSubfieldName>` to support new Shared Drive restrictions.
|
||||
|
||||
Updated `gam course <CourseID> create|update announcement` to accept input from
|
||||
a literal string, a file or a Google Doc.
|
||||
```
|
||||
<CourseAnnouncementContent> ::=
|
||||
((text <String>)|
|
||||
(textfile <FileName> [charset <Charset>])|
|
||||
(gdoc <UserGoogleDoc>)|
|
||||
(gcsdoc <StorageBucketObjectName>))
|
||||
```
|
||||
|
||||
Added command `gam check suspended <UserItem>` that checks the suspension status of a user
|
||||
and sets the return code to 0 if the user is not suspended or 26 if it is.
|
||||
```
|
||||
$ gam check suspended testok@domain.com
|
||||
User: testok@domain.com, Account Suspended: False
|
||||
$ echo $?
|
||||
0
|
||||
|
||||
$ gam check suspended testsusp@domain.com
|
||||
User: testsusp@domain.com, Account Suspended: True, Suspension Reason: ADMIN
|
||||
$ echo $?
|
||||
26
|
||||
```
|
||||
|
||||
Updated `gam <UserTypeEntity> sendemail` to verify that one of `recipient|to|from`
|
||||
immediately follows `sendemail`.
|
||||
|
||||
### 7.11.00
|
||||
|
||||
Added commands to manage classroom/course announcements.
|
||||
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Classroom-Courses#manage-course-announcements
|
||||
|
||||
Upgraded to OpenSSL 3.5.1.
|
||||
|
||||
### 7.10.10
|
||||
|
||||
Added choices `text` and `hyperlink` to option `showwebviewlink` in `gam [<UserTypeEntity>] print|show shareddrives`.
|
||||
* `showwebviewlink text` - Displays `https://drive.google.com/drive/folders/<SharedDriveID>`
|
||||
* `showwebviewlink hyperlink` - Displays `=HYPERLINK("https://drive.google.com/drive/folders/<SharedDriveID>", "<SharedDriveName>")`
|
||||
|
||||
### 7.10.09
|
||||
|
||||
Added option `showwebviewlink` to `gam [<UserTypeEntity>] print|show shareddrives` that
|
||||
displays the web view link for the Shared Drive: `https://drive.google.com/drive/folders/<SharedDriveID>`.
|
||||
|
||||
### 7.10.08
|
||||
|
||||
Fixed bug in commands that modify messages where the `labelids <LabelIdList>` option
|
||||
could not be used unless one of these options was also specified: `query`, `matchlabel`, `ids`;
|
||||
it can be now be used by itself.
|
||||
|
||||
### 7.10.07
|
||||
|
||||
Updated `gam <UserTypeEntity> copy|move drivefile` to hanndle additional instances of
|
||||
the `cannotModifyInheritedPermission` error.
|
||||
|
||||
Added license SKU `Google AI Ultra for Business`
|
||||
* ProductID - 101047
|
||||
* SKUID - 1010470008 | geminiultra
|
||||
|
||||
### 7.10.06
|
||||
|
||||
Added option `clientstates` to `gam print devices` to include client states in device output.
|
||||
|
||||
### 7.10.05
|
||||
|
||||
Google renamed an error: `cannotModifyInheritedTeamDrivePermission` became `cannotModifyInheritedPermission`.
|
||||
GAM will now handle the new error.
|
||||
|
||||
### 7.10.04
|
||||
|
||||
Updated `gam report <ActivityApplicationName>` to accept accept application names as defined
|
||||
in the Reports API discovery document; this means that GAM does not have to be updated when
|
||||
Google defines a new application name.
|
||||
|
||||
`gemini_in_workspace_apps` is now available in `gam report`.
|
||||
|
||||
### 7.10.03
|
||||
|
||||
Fixed bug in commands that modify messages where the `labelids <LabelIdList>` option
|
||||
was not being applied.
|
||||
|
||||
### 7.10.02
|
||||
|
||||
Added option `labelids <LabelIdList>` to all commands that process messages;
|
||||
this option causes GAM to only return messages with labels that match all of the specified label IDs.
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show forms` to always display `isPublished` and
|
||||
`isAcceptingResponses` in `publishSettings/publishState` regardless of their value;
|
||||
the API doesn't return these values when they are False.
|
||||
|
||||
### 7.10.01
|
||||
|
||||
Added options `ispublished [<Boolean>]` and `isacceptingresponses [<Boolean>]` to
|
||||
`gam <UserTypeEntity> create|update form`.
|
||||
|
||||
### 7.10.00
|
||||
|
||||
Added commands to manage/display Chat Custom Emojis.
|
||||
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Users-Chat#manage-chat-emojis
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Users-Chat#display-chat-emojis
|
||||
|
||||
Updated `gam <UserItem> print|show chatspaces|chatmembers asadmin` to display
|
||||
the spaces in ascending display name order.
|
||||
|
||||
### 7.09.07
|
||||
|
||||
Added `webviewlink` to `<FileTreeFieldName>` for use in `gam <UserTypeEntity> print|show filetree`.
|
||||
|
||||
### 7.09.06
|
||||
|
||||
Upddated `gam print|show shareddrives`, `gam print|show shareddriveacls`, `gam print shareddriveorganizers`
|
||||
to display the Shared Drives in ascending name order; the API returns them in an unidentifiable order.
|
||||
|
||||
### 7.09.05
|
||||
|
||||
Improved output of `gam info|show chromeschemas [std]` to more accurately display the schemas.
|
||||
|
||||
Fixed bugs in `gam update chromepolicy` that caused invalid error messaages.
|
||||
|
||||
### 7.09.04
|
||||
|
||||
Fixed bug in `gam whatis <EmailItem>` where the check for an invitable user always failed.
|
||||
|
||||
Fixed bug in `gam print shareddriveorganizers` where no organizers were displayed when `domain` in `gam.cfg` was blank.
|
||||
|
||||
Updated to Python 3.13.5
|
||||
|
||||
### 7.09.03
|
||||
|
||||
Updated `gam <UserTypeEntity> create focustime|outofoffice ... timerange <Time> <Time>` to check
|
||||
that the first `<Time>` is less than the second `Time`; previously the event was not created.
|
||||
|
||||
For new installs the `enforce_expansive_access` Boolean variable in `gam.cfg` now defaults to True.
|
||||
For existing installations, if `enforce_expansive_access` has not been added to `gam.cfg`,
|
||||
a default value of True will be used.
|
||||
|
||||
### 7.09.02
|
||||
|
||||
Added command `gam info chromeschema std <SchemaName>` to display a Chrome policy schema in the same format as Legacy GAM.
|
||||
|
||||
Improved output of `gam show chromeschemas [std]` and `gam info chromeschema [std]` to more accurately display the schemas.
|
||||
|
||||
### 7.09.01
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print diskusage` where the `ownedByMe` column was
|
||||
blank for the top folder.
|
||||
|
||||
Fixed bug in `gam update chromepolicy` where the following error was generated
|
||||
when updating policies with simple numerical values.
|
||||
```
|
||||
ERROR: Missing argument: Expected <value>"
|
||||
```
|
||||
|
||||
### 7.09.00
|
||||
|
||||
Removed the overly broad service account `IAM and Access Management API` scope `https://www.googleapis.com/auth/cloud-platform`
|
||||
|
||||
@@ -152,7 +152,7 @@ gam update group|groups <GroupEntity> create|add [<GroupRole>]
|
||||
[preview] [actioncsv]
|
||||
<UserItem>|<UserTypeEntity>
|
||||
```
|
||||
To add a group as a memmber of another group, just specify its email address.
|
||||
To add a group as a member of another group, just specify its email address.
|
||||
```
|
||||
gam update group group1@domain.com add member group2@domain.com
|
||||
```
|
||||
@@ -208,7 +208,7 @@ gam update group|groups <GroupEntity> delete|remove [<GroupRole>]
|
||||
```
|
||||
`<GroupRole>` is ignored, deletions take place regardless of role.
|
||||
|
||||
To remove a group as a memmber of another group, just specify its email address.
|
||||
To remove a group as a member of another group, just specify its email address.
|
||||
```
|
||||
gam update group group1@domain.com remove group2@domain.com
|
||||
```
|
||||
|
||||
@@ -251,9 +251,9 @@ 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.09.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.12.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 64-bit final
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
Path: /Users/admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -989,9 +989,9 @@ 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.09.00 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM 7.12.00 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 64-bit final
|
||||
Python 3.13.5 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
Path: C:\GAM7
|
||||
Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
- [Synchronize licenses](#synchronize-licenses)
|
||||
|
||||
## API documentation
|
||||
* [License Manager API](https://developers.google.com/admin-sdk/licensing/rest/v1/licenseAssignments)
|
||||
* [License Manager API](https://developers.google.com/workspace/admin/licensing/reference/rest/v1/licenseAssignments)
|
||||
|
||||
## License Products and SKUs
|
||||
* [Product and SKU IDs](https://developers.google.com/admin-sdk/licensing/v1/how-tos/products)
|
||||
@@ -62,6 +62,7 @@
|
||||
| Gemini Education | 1010470004 | geminiedu |
|
||||
| Gemini Education Premium | 1010470005 | geminiedupremium |
|
||||
| Gemini Enterprise | 1010470001 | geminient | duetai |
|
||||
| Google AI Ultra for Business | 1010470008 | geminiultra |
|
||||
| Google Apps Message Security | Google-Apps-For-Postini | postini |
|
||||
| Google Chrome Device Management | Google-Chrome-Device-Management | cdm |
|
||||
| Google Drive Storage 16TB | Google-Drive-storage-16TB | 16tb |
|
||||
|
||||
@@ -39,19 +39,18 @@ config csv_output_row_filter "'\"accounts:used_quota_in_mb\":count>15000'"
|
||||
## Activity reports
|
||||
```
|
||||
<ActivityApplicationName> ::=
|
||||
access|accesstransparency|
|
||||
accesstransparency|access|
|
||||
admin|
|
||||
calendar|calendars|
|
||||
chat|
|
||||
chrome|
|
||||
classroom|
|
||||
contextawareaccess|
|
||||
currents|gplus|google+|
|
||||
gplus|currents|google+|
|
||||
datastudio|
|
||||
devices|mobile|
|
||||
domain|
|
||||
drive|doc|docs|
|
||||
gcp|
|
||||
gemini|geminiforworkspace|
|
||||
gcp|cloud|
|
||||
geminiinworkspaceapps|gemini|geminiforworkspace|
|
||||
groups|group|
|
||||
groupsenterprise|enterprisegroups|
|
||||
jamboard|
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
createdtime|
|
||||
id|
|
||||
name|
|
||||
restrictions|
|
||||
themeid
|
||||
<SharedDriveFieldNameList> ::= "<SharedDriveFieldName>(,<SharedDriveFieldName>)*"
|
||||
|
||||
@@ -200,6 +201,8 @@
|
||||
allowcontentmanagerstosharefolders|
|
||||
copyrequireswriterpermission|
|
||||
domainusersonly|
|
||||
downloadrestrictedforreaders|
|
||||
downloadrestrictedforwriters|
|
||||
drivemembersonly|teammembersonly|
|
||||
sharingfoldersrequiresorganizerpermission
|
||||
|
||||
@@ -372,26 +375,38 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
gam [<UserTypeEntity>] show shareddrives
|
||||
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
[fields <SharedDriveFieldNameList>] [formatjson]
|
||||
[fields <SharedDriveFieldNameList>]
|
||||
[showwebviewlink text|hyperlink]
|
||||
[formatjson]
|
||||
```
|
||||
By default, all Shared Drives are displayed; use the following options to select a subset of Shared Drives:
|
||||
* `teamdriveadminquery|query <QueryTeamDrive>` - Use a query to select Shared Drives
|
||||
* `matchname <REMatchPattern>` - Retrieve Shared Drives with names that match a pattern.
|
||||
* `orgunit|org|ou <OrgUnitPath>` - Only Shared Drives in the specified Org Unit are selected
|
||||
|
||||
Use option `showwebviewlink` to display the web view link for the Shared Drive.
|
||||
* `showwebviewlink text` - Displays `https://drive.google.com/drive/folders/<SharedDriveID>`
|
||||
* `showwebviewlink hyperlink` - Dsiplays `=HYPERLINK("https://drive.google.com/drive/folders/<SharedDriveID>", "<SharedDriveName>")`
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam [<UserTypeEntity>] print shareddrives [todrive <ToDriveAttribute>*]
|
||||
[adminaccess|asadmin] [teamdriveadminquery|query <QueryTeamDrive>]
|
||||
[matchname <REMatchPattern>] [orgunit|org|ou <OrgUnitPath>]
|
||||
[fields <SharedDriveFieldNameList>] [formatjson [quotechar <Character>]]
|
||||
[fields <SharedDriveFieldNameList>]
|
||||
[showwebviewlink text|hyperlink]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, all Shared Drives are displayed; use the following options to select a subset of Shared Drives:
|
||||
* `teamdriveadminquery|query <QueryTeamDrive>` - Use a query to select Shared Drives
|
||||
* `matchname <REMatchPattern>` - Retrieve Shared Drives with names that match a pattern.
|
||||
* `orgunit|org|ou <OrgUnitPath>` - Only Shared Drives in the specified Org Unit are selected
|
||||
|
||||
Use option `showwebviewlink` to display the web view link for the Shared Drive.
|
||||
* `showwebviewlink text` - Displays `https://drive.google.com/drive/folders/<SharedDriveID>`
|
||||
* `showwebviewlink hyperlink` - Dsiplays `=HYPERLINK("https://drive.google.com/drive/folders/<SharedDriveID>", "<SharedDriveName>")`
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
- [Manage Chat Messages](#manage-chat-messages)
|
||||
- [Display Chat Messages](#display-chat-messages)
|
||||
- [Display Chat Events](#display-chat-events)
|
||||
- [Manage Chat Emojis](#manage-chat-emojis)
|
||||
- [Display Chat Emojis](#display-chat-emojis)
|
||||
- [Bulk Operations](#bulk-operations)
|
||||
|
||||
## Introduction
|
||||
@@ -19,6 +21,7 @@ To use these commands you must update your service account authorization.
|
||||
```
|
||||
gam user user@domain.com update serviceaccount
|
||||
|
||||
[*] 3) Chat API - Custom Emojis (supports readonly)
|
||||
[*] 4) Chat API - Memberships (supports readonly)
|
||||
[*] 5) Chat API - Memberships Admin (supports readonly)
|
||||
[*] 6) Chat API - Messages (supports readonly)
|
||||
@@ -51,10 +54,12 @@ Google requires that you have a Chat Bot configured in order to use the Chat API
|
||||
## API documentation
|
||||
* [Overview](https://developers.google.com/workspace/chat/overview)
|
||||
* [Chat API](https://developers.google.com/workspace/chat/api/reference/rest)
|
||||
* [Chat API - Custom Emojis](https://developers.google.com/workspace/chat/api/reference/rest/v1/customEmojis)
|
||||
* [Chat API - Members](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members/list)
|
||||
* [Chat API - Messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/list)
|
||||
* [Chat API - Events](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents/list)
|
||||
* [Apps in Google Chat](https://support.google.com/chat/answer/7655820)
|
||||
* [Manage customemoji permissions](https://support.google.com/a/answer/12850085)
|
||||
* [Manage Spaces in Admin Console](https://support.google.com/a/answer/13369245)
|
||||
* [Predefined permission settings](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.FIELDS.predefined_permission_settings)
|
||||
|
||||
@@ -83,6 +88,8 @@ Google requires that you have a Chat Bot configured in order to use the Chat API
|
||||
(gdoc <UserGoogleDoc>)|
|
||||
(gcsdoc <StorageBucketObjectName>))
|
||||
|
||||
<ChatEmojiName> ::= :[0-9a-z_-]+:
|
||||
<ChatEmoji> ::= emojiname <ChatEmojiName> | customemojis/<String>
|
||||
<ChatEvent> ::= spaces/<String>/spaceEvents/<String>
|
||||
<ChatMember> ::= spaces/<String>/members/<String>
|
||||
<ChatMemberList> ::= "<ChatMember>(,<ChatMember>)*"
|
||||
@@ -896,6 +903,75 @@ filter 'start_time=\"2024-03-15T11:30:00-04:00\" AND event_types:\"google.worksp
|
||||
filter 'start_time=\"2024-03-15T11:30:00+00:00\" AND end_time=\"2024-03-3100:00:00+00:00\" AND event_types:\"google.workspace.chat.message.v1.created\"'
|
||||
```
|
||||
|
||||
## Manage Chat Emojis
|
||||
|
||||
### Create a Chat Emoji
|
||||
```
|
||||
gam <UserTypeEntity> create chatemoji <ChatEmojiName>
|
||||
([drivedir|(sourcefolder <FilePath>)] [filename <FileNamePattern>])
|
||||
[formatjson]
|
||||
```
|
||||
Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores.
|
||||
Hyphens and underscores should be used to separate words and cannot be used consecutively.
|
||||
|
||||
By default, the emoji file will be uploaded from the current working directory.
|
||||
* `drivedir` - The emoji file will be uploaded from the directory specified by `drive_dir` in gam.cfg
|
||||
* `sourcefolder <FilePath>` - The emoji file will be uploaded from `<FilePath>`
|
||||
|
||||
Specify the emoji file name; the following substitutions will be made:
|
||||
* `#email#` and `#user#` will be replaced by the user's full email address
|
||||
* `#username#` will be replaced by the local part of the user's email address
|
||||
|
||||
### Delete a Chat Emoji
|
||||
Deletes the given Chat emoji.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> delete chatemoji <Chatemoji>
|
||||
```
|
||||
|
||||
## Display Chat Emojis
|
||||
### Display a specific Chat emoji
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> info chatemoji <Chatemoji>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
### Display information about all chat emojis
|
||||
```
|
||||
gam <UserTypeEntity> show chatemojis
|
||||
[showcreatedby any|me|others]
|
||||
[formatjson]
|
||||
```
|
||||
Select emojis to display:
|
||||
* `showcreatedby any` - Display all emojis regardless of creator
|
||||
* `showcreatedby ` - Display all emojis created by the user; this is the default
|
||||
* `showcreatedby others` - Display all emojis not created by the user
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print chatemojis [todrive <ToDriveAttribute>*]
|
||||
[showcreatedby any|me|others]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
Select emojis to display:
|
||||
* `showcreatedby any` - Display all emojis regardless of creator
|
||||
* `showcreatedby ` - Display all emojis created by the user; this is the default
|
||||
* `showcreatedby others` - Display all emojis not created by the user
|
||||
|
||||
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.
|
||||
|
||||
## Bulk Operations
|
||||
### Display information about all chat spaces for a collection of users
|
||||
```
|
||||
|
||||
@@ -968,7 +968,8 @@ Display a list of file/folder names indented to show structure.
|
||||
owners|
|
||||
parents|
|
||||
size|
|
||||
trashed
|
||||
trashed|
|
||||
webviewlink
|
||||
<FileTreeFieldNameList> ::= "<FileTreeFieldName>(,<FileTreeFieldName>)*"
|
||||
|
||||
gam <UserTypeEntity> print filetree [todrive <ToDriveAttribute>*]
|
||||
@@ -1722,9 +1723,9 @@ User,Owner,id,name,ownedByMe,trashed,explicitlyTrashed,directFileCount,directFil
|
||||
user@domain.com,user@domain.com,012YenC8f12ALUk9PVA,My Drive,,False,False,100,138212,24,167,189598,79,-1,My Drive
|
||||
user@domain.com,user@domain.com,Trash,Trash,,True,True,0,0,1,3,3072,9,-1,Trash
|
||||
|
||||
$ gam redirect csv ./MyDriveUsage.csv user user@domain.com print diskusage shareddriveid 0AL5LiIe4dqxZUk9PVA show summaryandtrash
|
||||
$ gam redirect csv ./SharedDriveUsage.csv user user@domain.com print diskusage shareddriveid 0AL5LiIe4dqxZUk9PVA show summaryandtrash
|
||||
User: user@domain.com, Print 1 Drive Disk Usage
|
||||
$ more MyDriveUsage.csv
|
||||
$ more SharedDriveUsage.csv
|
||||
User,id,name,trashed,explicitlyTrashed,directFileCount,directFileSize,directFolderCount,totalFileCount,totalFileSize,totalFolderCount,depth,path
|
||||
user@domain.com,0125LiIe4dqxZUk9PVA,TS Shared Drive 1,False,False,16,6144,7,42,73799,25,-1,SharedDrives/TS Shared Drive 1
|
||||
user@domain.com,Trash,Trash,True,True,1,1024,0,1,1024,0,-1,Trash
|
||||
|
||||
@@ -49,10 +49,19 @@ gam user user@domain.com update serviceaccount
|
||||
```
|
||||
gam <UserTypeEntity> create form
|
||||
title <String> [description <String>] [isquiz [Boolean>]] [<JSONData>]
|
||||
[ispublished [<Boolean>] isacceptingresponses [<Boolean>]]
|
||||
[drivefilename <DriveFileName>] [<DriveFileParentAttribute>]
|
||||
[(csv [todrive <ToDriveAttribute>*]) | returnidonly]
|
||||
```
|
||||
|
||||
The valid combinations of `ispublished` and `isacceptingresponses` are:
|
||||
* `ispublished true isacceptingresponses true`
|
||||
* `ispublished true isacceptingresponses false`
|
||||
* `ispublished false isacceptingresponses false`
|
||||
* `ispublished false` - Sets `isacceptingresponses false`
|
||||
* `isacceptingresponses false` - Sets `ispublished false`
|
||||
* `isacceptingresponses true` - Sets `ispublished true`
|
||||
|
||||
`<JSONData>` is a list of form update requests.
|
||||
|
||||
* See: https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate
|
||||
@@ -79,15 +88,24 @@ Select forms with `<DriveFileEntity>`:
|
||||
```
|
||||
gam <UserTypeEntity> update form <DriveFileEntity>
|
||||
[title <String>] [description <String>] [isquiz [Boolean>]] [<JSONData>]
|
||||
[ispublished [<Boolean>] isacceptingresponses [<Boolean>]]
|
||||
```
|
||||
|
||||
The valid combinations of `ispublished` and `isacceptingresponses` are:
|
||||
* `ispublished true isacceptingresponses true`
|
||||
* `ispublished true isacceptingresponses false`
|
||||
* `ispublished false isacceptingresponses false`
|
||||
* `ispublished false` - Sets `isacceptingresponses false`
|
||||
* `isacceptingresponses false` - Sets `ispublished false`
|
||||
* `isacceptingresponses true` - Sets `ispublished true`
|
||||
|
||||
`<JSONData>` is a list of form update requests.
|
||||
|
||||
* See: https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate
|
||||
|
||||
## Extended Example
|
||||
|
||||
This example illustrates the use of JSN data to create and update forms
|
||||
This example illustrates the use of JSON data to create and update forms
|
||||
concerning student classtoom attendance.
|
||||
The form has two items: Absences and Notes.
|
||||
In `Absences`, the teacher can check `All present.` or check individual student absences.
|
||||
|
||||
@@ -72,6 +72,8 @@ This table and other suggestions came from:
|
||||
<EmailAddress> ::= <String>@<DomainName>
|
||||
<UniqueID> ::= id:<String>
|
||||
<GroupItem> ::= <EmailAddress>|<UniqueID>|<String>
|
||||
<LabelID> ::= <String>
|
||||
<LabelIDList> ::= "<LabelID>(,<LabelID)*"
|
||||
<LabelName> ::= <String>
|
||||
<QueryGmail> ::= <String> See: https://support.google.com/mail/answer/7190
|
||||
<Time> ::=
|
||||
@@ -389,6 +391,7 @@ Your command line will have: `embedimage file1.jpg image1` embedimage file2.jpg
|
||||
```
|
||||
gam <UserTypeEntity> archive messages <GroupItem>
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_archive <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
```
|
||||
@@ -400,6 +403,7 @@ Messages are archived to the group specified by `<GroupItem>`.
|
||||
|
||||
### Archive a selected set of messages
|
||||
* `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages
|
||||
* `labelids <LabelIDList>` - Select messages with labels that match all of the specified label IDs.
|
||||
* `max_to_archive` - Limit the number of messages that will be archived; use a value of 0 for no limit
|
||||
* `doit` - No messages are archived unless you specify `doit`. By not specifying `doit`, you can preview the messages selected to verify that the results match your expectations.
|
||||
|
||||
@@ -432,10 +436,14 @@ See below for message selection.
|
||||
Export messages in EML format.
|
||||
```
|
||||
gam <UserTypeEntity> export message|messages
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [max_to_export <Number>])|(ids <MessageIDEntity>)
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [max_to_export <Number>])|(ids <MessageIDEntity>)
|
||||
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
|
||||
gam <UserTypeEntity> export thread|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+ [quick|notquick] [max_to_export <Number>])|(ids <ThreadIDEntity>)
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [max_to_export <Number>])|(ids <MessageIDEntity>)
|
||||
[targetfolder <FilePath>] [targetname <FileName>] [overwrite [<Boolean>]]
|
||||
```
|
||||
|
||||
@@ -459,10 +467,12 @@ See below for message selection.
|
||||
```
|
||||
gam <UserTypeEntity> forward message|messages recipient|to <RecipientEntity>
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_forward <Number>])|(ids <MessageIDEntity>)
|
||||
[subject <String>] [addorigfieldstosubject]
|
||||
gam <UserTypeEntity> forward thread|threads recipient|to <RecipientEntity>
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_forward <Number>])|(ids <ThreadIDEntity>)
|
||||
[subject <String>] [addorigfieldstosubject]
|
||||
```
|
||||
@@ -482,23 +492,28 @@ See below for message selection.
|
||||
```
|
||||
gam <UserTypeEntity> delete messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_delete <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> modify messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_modify <Number>])|(ids <MessageIDEntity>)
|
||||
((addlabel <LabelName>)|(removelabel <LabelName>))+
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> spam messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_spam <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> trash messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_trash <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
gam <UserTypeEntity> untrash messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [doit] [max_to_untrash <Number>])|(ids <MessageIDEntity>)
|
||||
[csv [todrive <ToDriveAttribute>*]]
|
||||
```
|
||||
@@ -522,6 +537,7 @@ user@domain.com,18e9fc58c5491f4c,Deleted,
|
||||
|
||||
### Manage a selected set of messages
|
||||
* `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages
|
||||
* `labelids <LabelIDList>` - Select messages with labels that match all of the specified label IDs.
|
||||
* `max_to_xxx` - Limit the number of messages that will be processed; use a value of 0 for no limit
|
||||
* `doit` - No messages are processed unless you specify `doit`. By not specifying `doit`, you can preview the messages selected to verify that the results match your expectations.
|
||||
|
||||
@@ -570,6 +586,7 @@ gam config auto_batch_min 1 groups_inde EastOffice delete message query "rfc822m
|
||||
```
|
||||
gam <UserTypeEntity> show messages|threads
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [max_to_show <Number>] [includespamtrash])|(ids <MessageIDEntity>)
|
||||
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
|
||||
[countsonly|positivecountsonly] [useronly]
|
||||
@@ -581,6 +598,7 @@ gam <UserTypeEntity> show messages|threads
|
||||
[targetfolder <FilePath>] [overwrite [<Boolean>]]
|
||||
gam <UserTypeEntity> print messages|threads [todrive <ToDriveAttribute>*]
|
||||
(((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])*
|
||||
[labelids <LabelIDList>]
|
||||
[quick|notquick] [max_to_print <Number>] [includespamtrash])|(ids <MessageIDEntity>)
|
||||
[labelmatchpattern <REMatchPattern>] [sendermatchpattern <REMatchPattern>]
|
||||
[countsonly|positivecountsonly] [useronly]
|
||||
@@ -607,6 +625,7 @@ gam user user@domain.com print|show threads maxmessagesperthread 1
|
||||
|
||||
## Display a selected set of messages
|
||||
* `((query <QueryGmail> [querytime<String> <Date>]*) (matchlabel <LabelName>) [or|and])+` - Criteria to select messages
|
||||
* `labelids <LabelIDList>` - Select messages with labels that match all of the specified label IDs.
|
||||
* `max_to_xxx` - Limit the number of messages that will be displayed
|
||||
* `includespamtrash` - Include messages in the Spam and Trash folders
|
||||
* `labelmatchpattern <REMatchPattern>` - Only display messages with some label that matches `<REMatchPattern>`
|
||||
|
||||
@@ -108,7 +108,7 @@ Paul shall send emails from the marketing email address with the name Paul from
|
||||
``` gam user paul add sendas marketing@example.com "Paul from Example" replyto paul```
|
||||
|
||||
## Display sendas
|
||||
### Display the information as an indented list of keys and values.
|
||||
### Display the sendas information as an indented list of keys and values.
|
||||
```
|
||||
gam <UserTypeEntity> info sendas <EmailAddressEntity> [compact|format|html]
|
||||
gam <UserTypeEntity> show sendas [compact|format|html]
|
||||
@@ -126,7 +126,19 @@ By default, all sendas addresses are shown, use these options to limit the displ
|
||||
|
||||
Use the `verifyonly` option to display `True` or `False` in the signature field based on whether the signature is non-blank.
|
||||
|
||||
### Display the information in CSV form.
|
||||
To capture a signature for use as input to GAM, do the following.
|
||||
```
|
||||
gam redirect stdout ./signature.html user user@domain.com show sendas compact
|
||||
```
|
||||
Edit signature.html and remove the following data leaving just the HTML.
|
||||
```
|
||||
SendAs Address: <user@domain.com>
|
||||
IsPrimary: True
|
||||
Default: True
|
||||
Signature:
|
||||
```
|
||||
|
||||
### Display the sendas information in CSV form.
|
||||
```
|
||||
gam <UserTypeEntity> print sendas [compact]
|
||||
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*]
|
||||
@@ -170,7 +182,7 @@ email address signature rather than the alias signature to be set.
|
||||
If you have a current default signature, the API will update that, but if you delete it, it seems that the API will not over-write any of the other signatures, but instead add a new signature called `My signature`. If you rename that signature, the API will keep on updating that same signature, and not touch the other signatures.
|
||||
|
||||
## Display signature
|
||||
### Display the information as an indented list of keys and values.
|
||||
### Display the signature as an indented list of keys and values.
|
||||
```
|
||||
gam <UserTypeEntity> show signature|sig [compact|format|html]
|
||||
[primary|default] [verifyonly]
|
||||
@@ -187,7 +199,19 @@ By default, the signature for `<UserTypeEntity>` is displayed, use these options
|
||||
|
||||
Use the `verifyonly` option to display `True` or `False` in the signature field based on whether the signature is non-blank.
|
||||
|
||||
### Display the information in CSV form.
|
||||
To capture a signature for use as input to GAM, do the following.
|
||||
```
|
||||
gam redirect stdout ./signature.html user user@domain.com show signature compact
|
||||
```
|
||||
Edit signature.html and remove the following data leaving just the HTML.
|
||||
```
|
||||
SendAs Address: <user@domain.com>
|
||||
IsPrimary: True
|
||||
Default: True
|
||||
Signature:
|
||||
```
|
||||
|
||||
### Display the signature in CSV form.
|
||||
```
|
||||
gam <UserTypeEntity> print signature [compact]
|
||||
[primary|default] [verifyonly] [todrive <ToDriveAttribute>*]
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
createdtime|
|
||||
id|
|
||||
name|
|
||||
restrictions|
|
||||
themeid
|
||||
<SharedDriveFieldNameList> ::= "<SharedDriveFieldName>(,<SharedDriveFieldName>)*"
|
||||
|
||||
@@ -180,6 +181,8 @@
|
||||
allowcontentmanagerstosharefolders|
|
||||
copyrequireswriterpermission|
|
||||
domainusersonly|
|
||||
downloadrestrictedforreaders|
|
||||
downloadrestrictedforwriters|
|
||||
drivemembersonly|teammembersonly|
|
||||
sharingfoldersrequiresorganizerpermission
|
||||
|
||||
@@ -318,23 +321,34 @@ gam <UserTypeEntity> show shareddriveinfo <SharedDriveEntity>
|
||||
gam <UserTypeEntity> show shareddrives
|
||||
[matchname <REMatchPattern>] (role|roles <SharedDriveACLRoleList>)*
|
||||
[fields <SharedDriveFieldNameList>]
|
||||
[showwebviewlink text|hyperlink]
|
||||
[guiroles [<Boolean>] [formatjson]
|
||||
```
|
||||
By default, Gam displays all Teams Drives accessible by the user.
|
||||
* `matchname <REMatchPattern>` - Display Shared Drives with names that match a pattern.
|
||||
* `(role|roles <SharedDriveACLRoleList>)*` - Display Shared Drives where the user has one of the specified roles.
|
||||
|
||||
Use option `showwebviewlink` to display the web view link for the Shared Drive.
|
||||
* `showwebviewlink text` - Displays `https://drive.google.com/drive/folders/<SharedDriveID>`
|
||||
* `showwebviewlink hyperlink` - Dsiplays `=HYPERLINK("https://drive.google.com/drive/folders/<SharedDriveID>", "<SharedDriveName>")`
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam <UserTypeEntity> print shareddrives [todrive <ToDriveAttribute>*]
|
||||
[matchname <REMatchPattern>] (role|roles <SharedDriveACLRoleList>)*
|
||||
[fields <SharedDriveFieldNameList>] [formatjson [quotechar <Character>]]
|
||||
[fields <SharedDriveFieldNameList>]
|
||||
[showwebviewlink text|hyperlink]
|
||||
[guiroles [<Boolean>]] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays all Teams Drives accessible by the user.
|
||||
* `matchname <REMatchPattern>` - Display Shared Drives with names that match a pattern.
|
||||
* `(role|roles <SharedDriveACLRoleList>)*` - Display Shared Drives where the user has one of the specified roles.
|
||||
|
||||
Use option `showwebviewlink` to display the web view link for the Shared Drive.
|
||||
* `showwebviewlink text` - Displays `https://drive.google.com/drive/folders/<SharedDriveID>`
|
||||
* `showwebviewlink hyperlink` - Dsiplays `=HYPERLINK("https://drive.google.com/drive/folders/<SharedDriveID>", "<SharedDriveName>")`
|
||||
|
||||
The Google Drive API does not list roles for Shared Drives so GAM generates a role from the capabilities:
|
||||
* `commenter - canComment: True, canEdit: False`
|
||||
* `reader - canComment: False, canEdit: False`
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
- [Update a user's attributes with JSON data](#update-a-users-attributes-with-json-data)
|
||||
- [Update a user's OU based on group membership](#update-a-users-ou-based-on-group-membership)
|
||||
- [Do not update a user's OU if currently in a special purpose OU](#do-not-update-a-users-ou-if-currently-in-a-special-purpose-ou)
|
||||
- [Check a user's suspension status](#check-a-users-suspension-status)
|
||||
- [Delete or suspend users](#delete-or-suspend-users)
|
||||
- [Undelete or unsuspend users](#undelete-or-unsuspend-users)
|
||||
- [Display information about users](#display-information-about-users)
|
||||
@@ -38,7 +39,7 @@
|
||||
- [Print user counts by OrgUnit](#print-user-counts-by-orgunit)
|
||||
- [Print user list](#print-user-list)
|
||||
- [Display user counts](#display-user-counts)
|
||||
- [Verify domain membership]($verify-domain-membership)
|
||||
- [Verify domain membership](#verify-domain-membership)
|
||||
|
||||
## API documentation
|
||||
* [Directory API - Users](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
|
||||
@@ -339,7 +340,7 @@ Here is how that data is represented in GAM:
|
||||
Locations:
|
||||
type: desk
|
||||
area: desk
|
||||
buildingId: Building-ID
|
||||
buildingId: Building id
|
||||
buildingName: Building name
|
||||
floorName: Floor name
|
||||
floorSection: Floor section
|
||||
@@ -359,13 +360,15 @@ External IDs:
|
||||
```
|
||||
These options will set those values:
|
||||
```
|
||||
location type desk area desk buildingid Building-ID floorname "Floor name" floorsection "Floor section" endlocation
|
||||
location type desk area desk buildingid "id:Building id" floorname "Floor name" floorsection "Floor section" endlocation
|
||||
organization customtype "" description "Type of employee" costcenter "Cost center" department "Department" title "Job Title" primary
|
||||
relation manager manageremail@domain.com
|
||||
externalid organization "Employee ID"
|
||||
```
|
||||
When setting `location buildingid <String>` Google expects a validated building ID, you can use a non-validated
|
||||
When setting `location buildingid id:<String>` Google expects a validated building ID, you can use a non-validated
|
||||
building ID by specifying `nv:` at the beginning of `<String>`; e.g., `nv:Building X` sets the building ID to `Building X`.
|
||||
You can also use `buildingid <String>`, i.e., no `'id:` or `nv:` prefix, `<String>` is then interpreted as a building name
|
||||
and GAM validates it to get the building id that is required by the API.
|
||||
|
||||
## Passwords
|
||||
To set a user's password, you specify a `<Password>` string and a hash method that specifies how to interpret the string
|
||||
@@ -896,6 +899,25 @@ gam csv SISdata.csv gam update user "~primaryEmail" suspended off firstname "~Fi
|
||||
ou "~OU" immutableous "'/Students/Lower School/Restricted,'/Students/Middle School/Restricted'"
|
||||
```
|
||||
|
||||
## Check a user's suspension status
|
||||
This command checks the suspension status of a single user
|
||||
and sets the return code to 0 if the user is not suspended or 26 if it is.
|
||||
```
|
||||
gam check suspended <UserItem>
|
||||
```
|
||||
Example.
|
||||
```
|
||||
$ gam check suspended testok@domain.com
|
||||
User: testok@domain.com, Account Suspended: False
|
||||
$ echo $?
|
||||
0
|
||||
|
||||
$ gam check suspended testsusp@domain.com
|
||||
User: testsusp@domain.com, Account Suspended: True, Suspension Reason: ADMIN
|
||||
$ echo $?
|
||||
26
|
||||
```
|
||||
|
||||
## Delete or suspend users
|
||||
These commands operate on a single user.
|
||||
```
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
# Using GAM7 with a delegated admin service account
|
||||
- [Thanks](#thanks)
|
||||
- [Introduction](#introduction)
|
||||
- [Advantages](#advantages)
|
||||
- [Disadvantages](#disadvantages)
|
||||
- [Setup Steps](#setup-steps)
|
||||
|
||||
## Thanks
|
||||
|
||||
Thanks to Jay Lee for the original version of this document.
|
||||
|
||||
## Introduction
|
||||
Delegated admin service accounts (DASA) are regular [GCP service accounts](https://cloud.google.com/iam/docs/service-accounts#what_are_service_accounts) that are granted a Workspace [delegated admin role](https://support.google.com/a/answer/33325). Service accounts have an email address like `gam-project-xuw-sp1-c4b@gam-project-xuw-sp1-c4b.iam.gserviceaccount.com` and are not part of a Workspace or Cloud Identity domain even if they are owned by a project in the domain’s organization. Service accounts cannot login to Google web services interactively, they are only able to call Google APIs.
|
||||
|
||||
GAM7 version 6.50.00 or higher is required.
|
||||
|
||||
## Advantages
|
||||
* DASA accounts don’t require a Workspace or Cloud Identity license.
|
||||
* DASA accounts don’t have a password login that can be phished or captured, they use [RSA private keys](https://en.wikipedia.org/wiki/RSA_(cryptosystem)) to sign authentication requests which makes them very secure. You should however [rotate the key](https://jaylee.us/qwm) on a regular basis and keep it safe and secured!
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAM 7.09.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.12.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 64-bit final
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -15,9 +15,9 @@ 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.09.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.12.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 64-bit final
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -27,9 +27,9 @@ 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.09.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.12.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 64-bit final
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -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.09.00
|
||||
Latest: 7.12.00
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +72,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
7.09.00
|
||||
7.12.00
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -82,9 +82,9 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 7.09.00 - https://github.com/GAM-team/GAM
|
||||
GAM 7.12.00 - https://github.com/GAM-team/GAM
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.4 64-bit final
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
@@ -337,7 +337,7 @@ enforce_expansive_access
|
||||
gam <UserTypeEntity> move drivefile
|
||||
gam <UserTypeEntity> transfer ownership
|
||||
gam <UserTypeEntity> claim ownership
|
||||
Default: False
|
||||
Default: True
|
||||
event_max_results
|
||||
When retrieving lists of Calendar events from API,
|
||||
how many should be retrieved in each API call
|
||||
|
||||
Reference in New Issue
Block a user