mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-04 06:11:39 +00:00
Compare commits
112 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b708bfeea | ||
|
|
fedb49ca9d | ||
|
|
87b4917fb0 | ||
|
|
5a9486c08a | ||
|
|
e7074cb0bc | ||
|
|
f894e5ffd7 | ||
|
|
5d1379e830 | ||
|
|
aa1b373245 | ||
|
|
1bed2383ff | ||
|
|
332d6c0761 | ||
|
|
597bbe2db9 | ||
|
|
fcb50e1e93 | ||
|
|
048d88c7a0 | ||
|
|
bd4208607b | ||
|
|
7b510075e6 | ||
|
|
882d7b5833 | ||
|
|
d4f5495909 | ||
|
|
b132e789f7 | ||
|
|
701824d984 | ||
|
|
4c63de65a5 | ||
|
|
d1d1040ec3 | ||
|
|
fe4268230e | ||
|
|
bda51867c8 | ||
|
|
a913c8f128 | ||
|
|
89ac556933 | ||
|
|
48c23c2f98 | ||
|
|
3f2a261a99 | ||
|
|
beb76c5879 | ||
|
|
bd22dc1b8b | ||
|
|
2258cd69a5 | ||
|
|
a523f9c0f7 | ||
|
|
ea41cf52de | ||
|
|
aec92f19ae | ||
|
|
df99e6ea8e | ||
|
|
d16166ffac | ||
|
|
1bd75c31ae | ||
|
|
8830da9908 | ||
|
|
fdc6c34c91 | ||
|
|
c6be86946e | ||
|
|
920c9a344a | ||
|
|
ec9f3b9e79 | ||
|
|
326e83a05d | ||
|
|
61c2b06021 | ||
|
|
60093404c1 | ||
|
|
228d3bba95 | ||
|
|
9f5dfc1a0a | ||
|
|
2b5c4561d1 | ||
|
|
4bdce171af | ||
|
|
1f68c8db00 | ||
|
|
963cbebba0 | ||
|
|
c0edbfe596 | ||
|
|
47617c2823 | ||
|
|
11e0f1c760 | ||
|
|
6c4b481eb1 | ||
|
|
c0cbddc93d | ||
|
|
b50d92404f | ||
|
|
19408f8f4c | ||
|
|
0dd8e099c5 | ||
|
|
5738cf5435 | ||
|
|
0739bdc642 | ||
|
|
ddd1924c2c | ||
|
|
a6fb1d7c0f | ||
|
|
6aeed76e70 | ||
|
|
83f94c8122 | ||
|
|
056f23c6cb | ||
|
|
7b1619f95d | ||
|
|
fe4ea3fe41 | ||
|
|
f5edd6bf81 | ||
|
|
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 |
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -126,7 +126,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
cache.tar.xz
|
||||
key: gam-${{ matrix.jid }}-20250611
|
||||
key: gam-${{ matrix.jid }}-20250701
|
||||
|
||||
- name: Untar Cache archive
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||
@@ -292,10 +292,10 @@ jobs:
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd "${OPENSSL_SOURCE_PATH}"
|
||||
if ([ "$RUNNER_OS" == "Windows" ] && [ "$RUNNER_ARCH" == "ARM64" ]); then
|
||||
#if ([ "$RUNNER_OS" == "Windows" ] && [ "$RUNNER_ARCH" == "ARM64" ]); then
|
||||
# https://github.com/openssl/openssl/issues/26239
|
||||
export CFLAGS=-DNO_INTERLOCKEDOR64
|
||||
fi
|
||||
#fi
|
||||
# --libdir=lib is needed so Python can find OpenSSL libraries
|
||||
"${PERL}" ./Configure --libdir=lib --prefix="${OPENSSL_INSTALL_PATH}" $OPENSSL_CONFIG_OPTS
|
||||
|
||||
@@ -457,16 +457,12 @@ 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"
|
||||
"$PYTHON" -m pip install cryptography*.whl
|
||||
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
#- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
|
||||
# - name: Compile cryptography from source (no legacy)
|
||||
# if: runner.os != 'Windows' || runner.arch != 'ARM64'
|
||||
@@ -477,8 +473,7 @@ jobs:
|
||||
run: |
|
||||
echo "before anything..."
|
||||
"$PYTHON" -m pip list
|
||||
"$PYTHON" -m pip install --upgrade -r requirements.txt
|
||||
echo "after requirements..."
|
||||
"$PYTHON" -m pip install --upgrade ..[yubikey]
|
||||
"$PYTHON" -m pip list
|
||||
#"$PYTHON" -m pip install --force-reinstall --no-deps --upgrade cryptography
|
||||
echo "after everything..."
|
||||
@@ -810,7 +805,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 +852,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 +915,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
|
||||
|
||||
@@ -7,7 +7,8 @@ authors = [
|
||||
{ name="Jay Lee", email="jay0lee@gmail.com" },
|
||||
{ name="Ross Scroggs", email="Ross.Scroggs@gmail.com" },
|
||||
]
|
||||
# # The following files should be edited to match: setup.cfg, requirements.txt
|
||||
# notice that yubikey-manager remains optional further down since it is less command and adds
|
||||
#significant compile dependencies.
|
||||
dependencies = [
|
||||
"chardet>=5.2.0",
|
||||
"cryptography>=44.0.2",
|
||||
@@ -22,7 +23,6 @@ dependencies = [
|
||||
"passlib>=1.7.4",
|
||||
"pathvalidate>=3.2.3",
|
||||
"python-dateutil",
|
||||
"yubikey-manager>=5.6.1",
|
||||
]
|
||||
description = "CLI tool to manage Google Workspace"
|
||||
readme = "README.md"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
his document describes the GAM command line syntax in modified BNF, see https://en.wikipedia.org/wiki/Backus-Naur_Form
|
||||
This document describes the GAM command line syntax in modified BNF, see https://en.wikipedia.org/wiki/Backus-Naur_Form
|
||||
Skip the History section and start reading at Introduction.
|
||||
|
||||
Items on the command line are space separated, when an actual space character is required, it will be indicated by <Space>.
|
||||
@@ -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,12 +381,15 @@ If an item contains spaces, it should be surrounded by ".
|
||||
domain:<DomainName>|domain|default
|
||||
<CalendarItem> ::= <EmailAddress>
|
||||
<ChannelCustomerID> ::= <String>
|
||||
<ChatEmojiName> ::= :<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>
|
||||
<ChatThread> ::= spaces/<String>/threads/<String>
|
||||
<ChromeProfilePermanentID> ::= <String>
|
||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
||||
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
|
||||
<GIGroupAlias> ::= <EmailAddress>
|
||||
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
|
||||
<CIGroupMemberType> ::= cbcmbrowser|chromeosdevice|customer|group|other|serviceaccount|user
|
||||
@@ -404,6 +408,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>
|
||||
@@ -613,6 +622,14 @@ If an item contains spaces, it should be surrounded by ".
|
||||
gs://<StorageBucketName>/<StorageObjectName>|
|
||||
<StorageBucketName>/<StorageObjectName>
|
||||
<Tag> ::= <String>
|
||||
<TagManagerAccountID> ::= <String>
|
||||
<TagManagerAccountPath> ::= accounts/<TagManagerAccountID>
|
||||
<TagManagerContainerID> ::= <String>
|
||||
<TagManagerContainerPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>
|
||||
<TagManagerWorkspaceID> ::= <String>
|
||||
<TagManagerWorkspacePath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>
|
||||
<TagManagerTagID> ::= <String>
|
||||
<TagManagerTagPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>/tags/<TagManagerTagID>
|
||||
<TakeoutBucketName> ::= takeout-export-[a-f,0-9,-]*
|
||||
<TaskID> ::= <String>
|
||||
<TaskListID> ::= <String>
|
||||
@@ -675,9 +692,16 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<CalendarACLScopeList> ::= "<CalendarACLScope>(,<CalendarACLScope>)*"
|
||||
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
|
||||
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||
<ChromeProfileCommandNameList> ::= "<ChromeProfileCommandName>(,<ChromeProfileCommandName>)*"
|
||||
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
||||
<CIGroupMemberTypeList> ::= "<CIGroupMemberType>(,<CIGroupMemberType>)*"
|
||||
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
||||
<ClassificationLabelIDList> ::= "<ClassificationLabelID>(,<ClassificationLabelID>)*"
|
||||
<ClassificationLabelNameList> ::= "<ClassificationLabelName>(,<ClassificationLabelName>)*"
|
||||
<ClassificationLabelPermissionNameList> ::= "<ClassificationLabelPermissionName>(,<ClassificationLabelPermissionName>)*"
|
||||
<ClassificationLabelFieldIDList> ::= "<ClassificationLabelFieldID>(,<ClassificationLabelFieldID>)*"
|
||||
<ClassificationLabelSelectionIDList> ::= "<ClassificationLabelSelectionID>(,<ClassificationLabelSelectionID>)*"
|
||||
<ClassroomInvitationIDList> ::= "<ClassroomInvitationID>(,<ClassroomInvitationID>)*"
|
||||
<ContactGroupList> ::= "<ContactGroupItem>(,<ContactGroupItem>)*"
|
||||
<ContactIDList> ::= "<ContactID>(,<ContactID>)*"
|
||||
@@ -755,6 +779,9 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<SharedDriveACLRoleList> ::= "<SharedDriveACLRole>(,<SharedDriveACLRole>)*"
|
||||
<SharedDriveIDList> ::= "<SharedDriveID>(,<SharedDriveID>)*"
|
||||
<StringList> ::= "<String>(,<String>)*"
|
||||
<TagManagerAccountPathList> ::= "<TagManagerAccountPath>(,<TagManagerAccountPath>)*"
|
||||
<TagManagerContainerPathList> ::= "<TagManagerContainerPath>(,<TagManagerContainerPath>)*"
|
||||
<TagManagerWorkspacePathList> ::= "<TagManagerWorkspacePath>(,<TagManagerWorkspacePath>)*"
|
||||
<TasklistIDList> ::= "<TasklistID>(,<TasklistID>)*"
|
||||
<TasklistTitleList> ::= "'<TasklistTitle>'(,'<TasklistTitle>')*"
|
||||
<TasklistIDTaskIDList> ::= "<TasklistIDTaskID>(,<TasklistIDTaskID>)*"
|
||||
@@ -1009,6 +1036,11 @@ Specify a collection of items by directly specifying them; the item type is dete
|
||||
<CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<CalendarEntity> ::=
|
||||
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<ChromeProfileNameEntity> ::=
|
||||
<ChromeProfileNameList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||
<CIPolicyNameEntity> ::=
|
||||
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
||||
<ClassificationLabelNameEntity> ::=
|
||||
@@ -1211,6 +1243,15 @@ Specify a collection of items by directly specifying them; the item type is dete
|
||||
<SiteACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<SiteEntity> ::=
|
||||
<SiteList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<TagManagerAccountPathEntity> ::=
|
||||
<TagManagerAccountPathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
<TagManagerContainerPathEntity> ::=
|
||||
<TagManagerContainerPathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
<TagManagerWorkspacePathEntity> ::=
|
||||
<TagManagerWorkspacePathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
<TasklistEntity> ::=
|
||||
<TasklistIDList> | <TaskListTitleList> | <FileSelector> | <CSVFileSelector>
|
||||
<TasklistIDTaskIDEntity> ::=
|
||||
@@ -2209,6 +2250,17 @@ gam show chromeneedsattn
|
||||
|
||||
# Chrome Profile Management
|
||||
|
||||
<ChromeProfilePermanentID> ::= <String>
|
||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
|
||||
<ChromeProfileCommandNameList> ::= "<ChromeProfileCommandName>(,<ChromeProfileCommandName>)*"
|
||||
<ChromeProfileNameEntity> ::=
|
||||
<ChromeProfileNameList> |
|
||||
(select <ChromeProfileNameList>|<FileSelector>|<CSVFileSelector>) |
|
||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||
|
||||
<ChromeProfileFieldName> ::=
|
||||
affiliationstate|
|
||||
annotatedlocation|
|
||||
@@ -2259,15 +2311,27 @@ gam delete chromeprofile <ChromeProfileName>
|
||||
gam info chromeprofile <ChromeProfileName>
|
||||
<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]
|
||||
gam show chromeprofiles
|
||||
[filtertime.* <Time>] [filter <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[orderby <ChromeProfileOrderByFieldName> [ascending|descending]]
|
||||
<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]
|
||||
[formatjson]
|
||||
gam print chromeprofiles [todrive <ToDriveAttribute>*]
|
||||
[filtertime.* <Time>] [filter <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[orderby <ChromeProfileOrderByFieldName> [ascending|descending]]
|
||||
<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]
|
||||
[[formatjson [quotechar <Character>]]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam create chromeprofilecommand <ChromeProfileNameEntity>
|
||||
[clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
||||
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]
|
||||
|
||||
gam info chromeprofilecommand <ChromeProfileCommandName>
|
||||
[formatjson]
|
||||
|
||||
gam show chromeprofilecommands <ChromeProfileNameEntity>
|
||||
[formatjson]
|
||||
gam print chromeprofilecommands <ChromeProfileNameEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
# Chrome Versions Counts
|
||||
|
||||
@@ -3119,8 +3183,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>
|
||||
@@ -3132,8 +3209,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>
|
||||
@@ -3386,8 +3470,7 @@ gam print|show transferapps
|
||||
|
||||
<DataTransferService> ::=
|
||||
calendar|
|
||||
currents|
|
||||
datastudio|lookerstudio|"google data studio"|
|
||||
datastudio|lookerstudio|"looker studio"|
|
||||
googledrive|gdrive|drive|"drive and docs"
|
||||
<DataTransferServiceList> ::= "<DataTransferService>(,<DataTransferService>)*"
|
||||
|
||||
@@ -4124,6 +4207,7 @@ gam print devices [todrive <ToDriveAttribute>*]
|
||||
[orderby <DeviceOrderByFieldName> [ascending|descending]]
|
||||
[all|company|personal|nocompanydevices|nopersonaldevices]
|
||||
[nodeviceusers|oneuserperrow]
|
||||
[clientstates]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[showitemcountonly]
|
||||
|
||||
@@ -4464,7 +4548,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.<String> <Time>] [filter|filters <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[event|events <EventNameList>] [ip <String>]
|
||||
[groupidfilter <String>]
|
||||
[maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
||||
@@ -4511,7 +4595,7 @@ gam report users|user [todrive <ToDriveAttribute>*]
|
||||
[(date <Date>)|(range <Date> <Date>)|
|
||||
yesterday|today|thismonth|(previousmonths <Integer>)]
|
||||
[(nodatechange | limitdatechanges <Integer>) | (fulldatarequired all|<UserServiceNameList>)]
|
||||
[filtertime.* <Time>] [filter|filters <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[(fields|parameters <String>)|(services <UserServiceNameList>)]
|
||||
[aggregatebydate|aggregatebyuser [Boolean]]
|
||||
[maxresults <Number>]
|
||||
@@ -4537,7 +4621,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|
|
||||
@@ -4630,10 +4714,10 @@ gam delete building <BuildingID>
|
||||
gam info building <BuildingID>
|
||||
[formatjson]
|
||||
gam show buildings
|
||||
[allfields|<BuildingFildName>*|(fields <BuildingFieldNameList>)]
|
||||
[allfields|<BuildingFieldName>*|(fields <BuildingFieldNameList>)]
|
||||
[formatjson]
|
||||
gam print buildings [todrive <ToDriveAttribute>*]
|
||||
[allfields|<BuildingFildName>*|(fields <BuildingFieldNameList>)]
|
||||
[allfields|<BuildingFieldName>*|(fields <BuildingFieldNameList>)]
|
||||
[delimiter <Character>] [formatjson [quotechar <Character>]]
|
||||
|
||||
gam create|add feature name <Name>
|
||||
@@ -4776,6 +4860,8 @@ gam <UserTypeEntity> sendemail from <EmailAddress>
|
||||
allowcontentmanagerstosharefolders|
|
||||
copyrequireswriterpermission|
|
||||
domainusersonly|
|
||||
downloadrestrictedforreaders|
|
||||
downloadrestrictedforwriters|
|
||||
drivemembersonly|teammembersonly|
|
||||
sharingfoldersrequiresorganizerpermission
|
||||
|
||||
@@ -4815,11 +4901,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>*]
|
||||
@@ -4900,12 +4988,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> ::=
|
||||
@@ -5608,6 +5698,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>]
|
||||
@@ -6924,6 +7015,7 @@ gam <UserTypeEntity> collect orphans
|
||||
capabilities.canchangecopyrequireswriterpermission|
|
||||
capabilities.canchangecopyrequireswriterpermissionrestriction|
|
||||
capabilities.canchangedomainusersonlyrestriction|
|
||||
capabilities.canchangedownloadrestriction|
|
||||
capabilities.canchangedrivebackground|
|
||||
capabilities.canchangedrivemembersonlyrestriction|
|
||||
capabilities.canchangesecurityupdateenabled|
|
||||
@@ -7431,10 +7523,10 @@ gam <UserTypeEntity> show forms <DriveFileEntity>
|
||||
|
||||
gam <UserTypeEntity> print formresponses <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[filtertime.* <Time>] [filter <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[countsonly|(formatjson [quotechar <Character>])]
|
||||
gam <UserTypeEntity> show formresponses <DriveFileEntity>
|
||||
[filtertime.* <Time>] [filter <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[countsonly|formatjson]
|
||||
|
||||
# Users - Gmail - Forwarding
|
||||
@@ -8268,6 +8360,59 @@ gam <UserTypeEntity> profile share|shared|unshare|unshared
|
||||
|
||||
gam <UserTypeEntity> show profile
|
||||
|
||||
# Users - Tag Manager
|
||||
|
||||
<TagManagerAccountID> ::= <String>
|
||||
<TagManagerAccountPath> ::= accounts/<TagManagerAccountID>
|
||||
<TagManagerAccountPathList> ::= "<TagManagerAccountPath>(,<TagManagerAccountPath>)*"
|
||||
<TagManagerAccountPathEntity> ::=
|
||||
<TagManagerAccountPathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
|
||||
<TagManagerContainerID> ::= <String>
|
||||
<TagManagerContainerPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>
|
||||
<TagManagerContainerPathList> ::= "<TagManagerContainerPath>(,<TagManagerContainerPath>)*"
|
||||
<TagManagerContainerPathEntity> ::=
|
||||
<TagManagerContainerPathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
|
||||
<TagManagerWorkspaceID> ::= <String>
|
||||
<TagManagerWorkspacePath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>
|
||||
<TagManagerWorkspacePathList> ::= "<TagManagerWorkspacePath>(,<TagManagerWorkspacePath>)*"
|
||||
<TagManagerWorkspacePathEntity> ::=
|
||||
<TagManagerWorkspacePathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
|
||||
<TagManagerTagID> ::= <String>
|
||||
<TagManagerTagPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>/tags/<TagManagerTagID>
|
||||
|
||||
gam <UserTypeEntity> show tagmanageraccounts
|
||||
[includegoogletags [<Boolean>]]
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print tagmanagerccounts [todrive <ToDriveAttribute>*]
|
||||
[includegoogletags [<Boolean>]]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> show tagmanagercontainers <TagManagerAccountPathEntity>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print tagmanagercontainers <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> show tagmanagerworkspaces <TagManagerContainerPathEntity>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print tagmanagerworkspaces <TagManagerContainerPathEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> show tagmanagertags <TagManagerWorkspacePathEntity>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print tagmanagertags <TagManagerWorkspacePathEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
gam <UserTypeEntity> show tagmanagerpermissions <TagManagerAccountPathEntity>
|
||||
[formatjson]
|
||||
gam <UserTypeEntity> print tagmanagerpermissions <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
|
||||
# Users - Tasks
|
||||
|
||||
<TaskAttribute> ::=
|
||||
@@ -8330,6 +8475,8 @@ gam <UserTypeEntity> print tasklists [todrive <ToDriveAttribute>*]
|
||||
allowcontentmanagerstosharefolders|
|
||||
copyrequireswriterpermission|
|
||||
domainusersonly|
|
||||
downloadrestrictedforreaders|
|
||||
downloadrestrictedforwriters|
|
||||
drivemembersonly|teammembersonly|
|
||||
sharingfoldersrequiresorganizerpermission
|
||||
|
||||
|
||||
@@ -1,6 +1,179 @@
|
||||
7.15.00
|
||||
|
||||
Updated `gam print shareddriveorganizers` to make `shownoorganizerdrives` default to `True`
|
||||
as documented; it was defaulting to `False`.
|
||||
|
||||
Cleaned up code for processing Python dictionary structures; this should have no noticable effect.
|
||||
|
||||
7.14.04
|
||||
|
||||
Fixed bug in `gam print|show cigroups cimember <UserItem>` that generated the following error:
|
||||
```
|
||||
ERROR: Cloud Identity Group: groups/-, Print Failed: Error(4013): Insufficient permissions to retrieve memberships.
|
||||
```
|
||||
|
||||
Updated `gam <UserTypeEntity> update user suspended off` and `gam <UserTypeEntity> unsuspend users`
|
||||
to handle the following error that occurs when trying to unsuspend a user that has been suspended for abuse.
|
||||
```
|
||||
ERROR: 412: adminCannotUnsuspend - Cannot restore a user suspended for abuse.
|
||||
```
|
||||
|
||||
* See: https://support.google.com/a/answer/1110339
|
||||
|
||||
7.14.03
|
||||
|
||||
Fixed bug in `gam print cigroup-members includederivedmembership` that caused a trap.
|
||||
|
||||
7.14.02
|
||||
|
||||
Fixed bug in `gam print|show cigroups|cigroups-members cimember <UserItem>` that generated the following error:
|
||||
```
|
||||
Cloud Identity Group Print Failed: Request contains an invalid argument.
|
||||
```
|
||||
|
||||
7.14.01
|
||||
|
||||
Don't install yubikey library via pip by default. To install with yubikey support use pip install gam7[yubikey]
|
||||
|
||||
7.14.00
|
||||
|
||||
Added commands to display Google Tag Manager accounts, containers, workspaces, tags and user permissions.
|
||||
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Users-Tag-Manager
|
||||
|
||||
7.13.03
|
||||
|
||||
Added option `csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]`
|
||||
to `gam create chromeprofilecommand` so that command details are displayed in CSV format.
|
||||
|
||||
Added option `commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>` to `<ChromeProfileNameEntity>`
|
||||
so that `gam print|show chromeprofilecommands` can directly display the commands generated by
|
||||
`gam create chromeprofilecommand` with the `csv` option.
|
||||
|
||||
7.13.02
|
||||
|
||||
Fixed bug in `gam create chromeprofilecommand` where `select|filter` were not recognized.
|
||||
|
||||
Updated `gam create datatransfer <OldOwnerID> datastudio <NewOwnerID>` that generated the following
|
||||
error due to an unhandled API change.
|
||||
```
|
||||
ERROR: Invalid choice (google data studio): Expected <calendar|looker studio|drive and docs>
|
||||
```
|
||||
|
||||
7.13.01
|
||||
|
||||
Enhanced `gam create|print|show chromeprofilecommand` to allow specification
|
||||
of multiple Chrome browser profiles rather than just one.
|
||||
```
|
||||
<ChromeProfilePermanentID> ::= <String>
|
||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||
<ChromeProfileNameEntity> ::=
|
||||
<ChromeProfileNameList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
|
||||
|
||||
gam create|print_show chromeprofilecommand <ChromeProfileNameEntity>
|
||||
```
|
||||
|
||||
7.13.00
|
||||
|
||||
Added commands that send remote commands to Chrome browser profiles and display the results;
|
||||
at the moment, these commands can clear the browser cache and cookies.
|
||||
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Chrome-Profile-Management#create-a-chrome-profile-command
|
||||
|
||||
7.12.02
|
||||
|
||||
Updated `gam print users` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable
|
||||
```
|
||||
|
||||
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.
|
||||
Google renamed an error: `cannotModifyInheritedTeamDrivePermission` became `cannotModifyInheritedPermission`.
|
||||
GAM will now handle the new error.
|
||||
|
||||
7.10.04
|
||||
@@ -12712,7 +12885,7 @@ gam <UserTypeEntity> update teamdrive <TeamDriveEntity> [adminaccess|asadmin] [n
|
||||
Updated gam report users to support new orgUnitID argument in Reports API.
|
||||
|
||||
gam report users|user [todrive <ToDriveAttribute>*] [date <Date>] [nodatechange | (fulldatarequired all|<ReportsAppList>)]
|
||||
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath>)|(select <UserTypeEntity>)] (filtertime.* <Time>)* [filter|filters <String>] [fields|parameters <String>]
|
||||
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath>)|(select <UserTypeEntity>)] (filtertime<String> <Time>)* [filter|filters <String>] [fields|parameters <String>]
|
||||
[maxactivities <Number>] [maxresults <Number>]
|
||||
|
||||
Select the users for whom information is desired.
|
||||
@@ -13303,15 +13476,15 @@ gam print cros query "sync:#querytime1#.." querytime1 -30d
|
||||
For example, to print information about CrOS devices synced between 45 days ago and 30 days ago:
|
||||
gam print cros query "sync:#querytime1#..#querytime2#" querytime1 -45d querytime2 -30d
|
||||
|
||||
Added filtertime.* <Time> option to gam report to allow times, usually relative, to be substituted into the filter <String> option.
|
||||
The filtertime.* value replaces the string #filtertime.*# in the filter <String>.
|
||||
Added filtertime<String> <Time> option to gam report to allow times, usually relative, to be substituted into the filter <String> option.
|
||||
The filtertime<String> value replaces the string #filtertime<String># in the filter <String>.
|
||||
The characters following filtertime can be any combination of lowercase letters and numbers.
|
||||
gam report users|user [todrive <ToDriveAttribute>*] [date <Date>] [nodatechange | (fulldatarequired all|<ReportsAppList>)]
|
||||
[(user all|<UserItem>)|(select <UserTypeEntity>)] (filtertime.* <Time>)* [filter|filters <String>] [fields|parameters <String>]
|
||||
[(user all|<UserItem>)|(select <UserTypeEntity>)] (filtertime<String> <Time>)* [filter|filters <String>] [fields|parameters <String>]
|
||||
[maxactivities <Number>] [maxresults <Number>]
|
||||
gam report admin|calendar|calendars|drive|docs|doc|gplus|groups|group|logins|login|mobile|rules|tokens|token [todrive <ToDriveAttribute>*] [maxresults <Number>] [maxactivities <Number>]
|
||||
[([start <Time>] [end <Time>])|yesterday] [(user all|<UserItem>)|(select <UserTypeEntity>)]
|
||||
[event <String>] (filtertime.* <Time>)* [filter|filters <String>] [ip <String>] [countsonly] [summary]
|
||||
[event <String>] (filtertime<String> <Time>)* [filter|filters <String>] [ip <String>] [countsonly] [summary]
|
||||
|
||||
For example, this command reports on the users that haven't logged in in the last 5 years.
|
||||
gam report users parameters accounts:last_login_time filters "accounts:last_login_time<#filtertime#" filtertime -5y
|
||||
@@ -13467,21 +13640,21 @@ Added units of years to <Date>, <DateTime> and <Time>; a year is 365 days. Added
|
||||
never|
|
||||
now|today
|
||||
|
||||
Added filtertime <Time> option to gam report to allow times, usually relative, to be substituted into the filter <String> option.
|
||||
If both filtertime and filter are specified, the filtertime value replaces the string #filtertime# in the filter <String>.
|
||||
Added filtertime<String> <Time> option to gam report to allow times, usually relative, to be substituted into the filter <String> option.
|
||||
If both filtertime<String> and filter are specified, the filtertime value replaces the string #filtertime<String># in the filter <String>.
|
||||
|
||||
gam report users|user [todrive <ToDriveAttribute>*] [date <Date>] [nodatechange | (fulldatarequired all|<ReportsAppList>)]
|
||||
[(user all|<UserItem>)|(select <UserTypeEntity>)] [filtertime <Time>] [filter|filters <String>] [fields|parameters <String>]
|
||||
[(user all|<UserItem>)|(select <UserTypeEntity>)] [filtertime<String> <Time>] [filter|filters <String>] [fields|parameters <String>]
|
||||
[maxactivities <Number>] [maxresults <Number>]
|
||||
gam report admin|calendar|calendars|drive|docs|doc|gplus|groups|group|logins|login|mobile|rules|tokens|token [todrive <ToDriveAttribute>*] [maxresults <Number>] [maxactivities <Number>]
|
||||
[([start <Time>] [end <Time>])|yesterday] [(user all|<UserItem>)|(select <UserTypeEntity>)]
|
||||
[event <String>] [filtertime <Time>] [filter|filters <String>] [ip <String>] [countsonly] [summary]
|
||||
[event <String>] [filtertime<String> <Time>] [filter|filters <String>] [ip <String>] [countsonly] [summary]
|
||||
|
||||
For example, this command reports on the users that haven't logged in in the last 5 years.
|
||||
gam report users parameters accounts:last_login_time filters "accounts:last_login_time<#filtertime#" filtertime -5y
|
||||
gam report users parameters accounts:last_login_time filters "accounts:last_login_time<#filtertime5y#" filtertime5y -5y
|
||||
|
||||
For example, this command reports on the users that haven't ever logged in.
|
||||
gam report users parameters accounts:last_login_time filters "accounts:last_login_time==#filtertime#" filtertime never
|
||||
gam report users parameters accounts:last_login_time filters "accounts:last_login_time==#filtertimeNever#" filtertimeNever never
|
||||
|
||||
4.60.14
|
||||
|
||||
|
||||
1
src/README.md
Symbolic link
1
src/README.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../README.md
|
||||
1895
src/gam/__init__.py
1895
src/gam/__init__.py
File diff suppressed because it is too large
Load Diff
@@ -94,6 +94,8 @@ SITEVERIFICATION = 'siteVerification'
|
||||
STORAGE = 'storage'
|
||||
STORAGEREAD = 'storageread'
|
||||
STORAGEWRITE = 'storagewrite'
|
||||
TAGMANAGER = 'tagmanager'
|
||||
TAGMANAGER_USERS = 'tagmanagerusers'
|
||||
TASKS = 'tasks'
|
||||
VAULT = 'vault'
|
||||
YOUTUBE = 'youtube'
|
||||
@@ -199,6 +201,7 @@ PROJECT_APIS = [
|
||||
'sheets.googleapis.com',
|
||||
'siteverification.googleapis.com',
|
||||
'storage-api.googleapis.com',
|
||||
'tagmanager.googleapis.com',
|
||||
'tasks.googleapis.com',
|
||||
'vault.googleapis.com',
|
||||
'youtube.googleapis.com',
|
||||
@@ -226,15 +229,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},
|
||||
@@ -258,13 +261,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},
|
||||
@@ -277,6 +280,8 @@ _INFO = {
|
||||
STORAGE: {'name': 'Cloud Storage API', 'version': 'v1', 'v2discovery': True},
|
||||
STORAGEREAD: {'name': 'Cloud Storage API - Read', 'version': 'v1', 'v2discovery': True, 'mappedAPI': STORAGE},
|
||||
STORAGEWRITE: {'name': 'Cloud Storage API - Write', 'version': 'v1', 'v2discovery': True, 'mappedAPI': STORAGE},
|
||||
TAGMANAGER: {'name': 'Tag Manager API - Accounts, Containers, Workspaces, Tags', 'version': 'v2', 'v2discovery': True},
|
||||
TAGMANAGER_USERS: {'name': 'Tag Manager API - Users', 'version': 'v2', 'v2discovery': True, 'mappedAPI': TAGMANAGER},
|
||||
TASKS: {'name': 'Tasks API', 'version': 'v1', 'v2discovery': True},
|
||||
VAULT: {'name': 'Vault API', 'version': 'v1', 'v2discovery': True},
|
||||
YOUTUBE: {'name': 'Youtube API', 'version': 'v3', 'v2discovery': True},
|
||||
@@ -362,29 +367,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'},
|
||||
@@ -696,6 +701,16 @@ _SVCACCT_SCOPES = [
|
||||
'api': SHEETS,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/spreadsheets'},
|
||||
{'name': 'Tag Manager API - Accounts, Containers, Workspaces, Tags - read only',
|
||||
'api': TAGMANAGER,
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/tagmanager.readonly'},
|
||||
{'name': 'Tag Manager API - Users',
|
||||
'api': TAGMANAGER_USERS,
|
||||
'subscopes': [],
|
||||
'offByDefault': True,
|
||||
'scope': 'https://www.googleapis.com/auth/tagmanager.manage.users'},
|
||||
{'name': 'Tasks API',
|
||||
'api': TASKS,
|
||||
'subscopes': READONLY,
|
||||
@@ -833,3 +848,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)
|
||||
|
||||
|
||||
@@ -485,6 +485,8 @@ class GamCLArgs():
|
||||
ARG_CHROMEPOLICIES = 'chromepolicies'
|
||||
ARG_CHROMEPROFILE = 'chromeprofile'
|
||||
ARG_CHROMEPROFILES = 'chromeprofiles'
|
||||
ARG_CHROMEPROFILECOMMAND = 'chromeprofilecommand'
|
||||
ARG_CHROMEPROFILECOMMANDS = 'chromeprofilecommands'
|
||||
ARG_CHROMESCHEMA = 'chromeschema'
|
||||
ARG_CHROMESCHEMAS = 'chromeschemas'
|
||||
ARG_CHROMESNVALIDITY = 'chromesnvalidity'
|
||||
@@ -777,8 +779,19 @@ class GamCLArgs():
|
||||
ARG_STORAGEBUCKETS = 'storagebuckets'
|
||||
ARG_STORAGEFILE = 'storagefile'
|
||||
ARG_STORAGEFILES = 'storagefiles'
|
||||
ARG_SUSPENDED = 'suspended'
|
||||
ARG_SVCACCT = 'svcacct'
|
||||
ARG_SVCACCTS = 'svcaccts'
|
||||
ARG_TAGMANAGERACCOUNT = 'tagmanageraccount'
|
||||
ARG_TAGMANAGERACCOUNTS = 'tagmanageraccounts'
|
||||
ARG_TAGMANAGERCONTAINER = 'tagmanagercontainer'
|
||||
ARG_TAGMANAGERCONTAINERS = 'tagmanagercontainers'
|
||||
ARG_TAGMANAGERPERMISSION = 'tagmanagerpermission'
|
||||
ARG_TAGMANAGERPERMISSIONS = 'tagmanagerpermissions'
|
||||
ARG_TAGMANAGERTAG = 'tagmanagertag'
|
||||
ARG_TAGMANAGERTAGS = 'tagmanagertags'
|
||||
ARG_TAGMANAGERWORKSPACE = 'tagmanagerworkspace'
|
||||
ARG_TAGMANAGERWORKSPACES = 'tagmanagerworkspaces'
|
||||
ARG_TASK = 'task'
|
||||
ARG_TASKS = 'tasks'
|
||||
ARG_TASKLIST = 'tasklist'
|
||||
@@ -854,7 +867,10 @@ class GamCLArgs():
|
||||
OB_CHAT_SPACE = 'ChatSpace'
|
||||
OB_CHAT_SPACE_LIST = 'ChatSpaceList'
|
||||
OB_CHAT_THREAD = 'ChatThread'
|
||||
OB_CHROMEPROFILE_ID = 'ChromeProfileId'
|
||||
OB_CHROMEPROFILE_NAME = 'ChromeProfileName'
|
||||
OB_CHROMEPROFILE_NAME_LIST = 'ChromeProfileNameList'
|
||||
OB_CHROMEPROFILE_COMMAND_NAME = 'ChromeProfileCommandName'
|
||||
OB_CHROMEPROFILE_COMMAND_NAME_LIST = 'ChromeProfileNameCommandList'
|
||||
OB_CHROME_VERSION = 'ChromeVersion'
|
||||
OB_CIDR_NETMASK = 'CIDRnetmask'
|
||||
OB_CIGROUP_ALIAS_LIST = "CIGroupAliasList"
|
||||
@@ -875,8 +891,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'
|
||||
@@ -1030,6 +1049,7 @@ class GamCLArgs():
|
||||
OB_STRING_LIST = 'StringList'
|
||||
OB_STUDENT_ITEM = 'StudentItem'
|
||||
OB_TAG = 'Tag'
|
||||
OB_TAGMANAGER_PATH_LIST = 'TagManagerPathList'
|
||||
OB_TASK_ID = 'TaskID'
|
||||
OB_TASKLIST_ID = 'TaskListID'
|
||||
OB_TASKLIST_ID_ENTITY = 'TaskListIDEntity'
|
||||
|
||||
@@ -111,6 +111,7 @@ class GamEntity():
|
||||
CHROME_POLICY_IMAGE = 'cpim'
|
||||
CHROME_POLICY_SCHEMA = 'cpsc'
|
||||
CHROME_PROFILE = 'cpro'
|
||||
CHROME_PROFILE_COMMAND = 'cpcm'
|
||||
CHROME_RELEASE = 'crel'
|
||||
CHROME_VERSION = 'cver'
|
||||
CLASSIFICATION_LABEL = 'dlab'
|
||||
@@ -357,7 +358,12 @@ class GamEntity():
|
||||
SUBSCRIPTION = 'subs'
|
||||
SVCACCT = 'svac'
|
||||
SVCACCT_KEY = 'svky'
|
||||
TARGET_USER = 'tgt'
|
||||
TAGMANAGER_ACCOUNT = 'tmac'
|
||||
TAGMANAGER_CONTAINER = 'tmco'
|
||||
TAGMANAGER_PERMISSION = 'tmpm'
|
||||
TAGMANAGER_TAG = 'tmtg'
|
||||
TAGMANAGER_WORKSPACE = 'tmws'
|
||||
TARGET_USER = 'tgt '
|
||||
TASK = 'task'
|
||||
TASKLIST = 'tali'
|
||||
TEACHER = 'teac'
|
||||
@@ -462,6 +468,7 @@ class GamEntity():
|
||||
CHROME_POLICY_IMAGE: ['Chrome Policy Images', 'Chrome Policy Image'],
|
||||
CHROME_POLICY_SCHEMA: ['Chrome Policy Schemas', 'Chrome Policy Schema'],
|
||||
CHROME_PROFILE: ['Chrome Profiles', 'Chrome Profile'],
|
||||
CHROME_PROFILE_COMMAND: ['Chrome Profile Commands', 'Chrome Profile Command'],
|
||||
CHROME_RELEASE: ['Chrome Releases', 'Chrome Release'],
|
||||
CHROME_VERSION: ['Chrome Versions', 'Chrome Version'],
|
||||
CLASSIFICATION_LABEL: ['Classification Labels', 'Classification Label'],
|
||||
@@ -708,6 +715,11 @@ class GamEntity():
|
||||
SUBSCRIPTION: ['Subscriptions', 'Subscription'],
|
||||
SVCACCT: ['Service Accounts', 'Service Account'],
|
||||
SVCACCT_KEY: ['Service Account Keys', 'Service Account Key'],
|
||||
TAGMANAGER_ACCOUNT: ['Tag Manager Accounts', 'Tag Manager Account'],
|
||||
TAGMANAGER_CONTAINER: ['Tag Manager Containers', 'Tag Manager Container'],
|
||||
TAGMANAGER_PERMISSION: ['Tag Manager Permissions', 'Tag Manager Permission'],
|
||||
TAGMANAGER_TAG: ['Tag Manager Tags', 'Tag Manager Tag'],
|
||||
TAGMANAGER_WORKSPACE: ['Tag Manager Workspaces', 'Tag Manager Workspace'],
|
||||
TARGET_USER: ['Target Users', 'Target User'],
|
||||
TASK: ['Tasks', 'Task'],
|
||||
TASKLIST: ['Tasklists', 'Tasklist'],
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
ABORTED = 'aborted'
|
||||
ABUSIVE_CONTENT_RESTRICTION = 'abusiveContentRestriction'
|
||||
ACCESS_NOT_CONFIGURED = 'accessNotConfigured'
|
||||
ADMIN_CANNOT_UNSUSPEND = 'adminCannotUnsuspend'
|
||||
ALREADY_EXISTS = 'alreadyExists'
|
||||
APPLY_LABEL_FORBIDDEN = 'applyLabelForbidden'
|
||||
AUTH_ERROR = 'authError'
|
||||
@@ -134,6 +135,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'
|
||||
@@ -229,6 +231,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,
|
||||
@@ -274,17 +277,18 @@ 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]
|
||||
RESELLER_THROW_REASONS = [BAD_REQUEST, RESOURCE_NOT_FOUND, FORBIDDEN, INVALID]
|
||||
SHEETS_ACCESS_THROW_REASONS = DRIVE_USER_THROW_REASONS+[NOT_FOUND, PERMISSION_DENIED, FORBIDDEN, INTERNAL_ERROR, INSUFFICIENT_FILE_PERMISSIONS,
|
||||
BAD_REQUEST, INVALID, INVALID_ARGUMENT, FAILED_PRECONDITION]
|
||||
TAGMANAGER_THROW_REASONS = [BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
|
||||
TASK_THROW_REASONS = [BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
|
||||
TASKLIST_THROW_REASONS = [BAD_REQUEST, PERMISSION_DENIED, INVALID, NOT_FOUND, ACCESS_NOT_CONFIGURED]
|
||||
USER_GET_THROW_REASONS = [USER_NOT_FOUND, DOMAIN_NOT_FOUND, DOMAIN_CANNOT_USE_APIS, FORBIDDEN, BAD_REQUEST, SYSTEM_ERROR]
|
||||
@@ -365,6 +369,8 @@ class abusiveContentRestriction(Exception):
|
||||
pass
|
||||
class accessNotConfigured(Exception):
|
||||
pass
|
||||
class adminCannotUnsuspend(Exception):
|
||||
pass
|
||||
class alreadyExists(Exception):
|
||||
pass
|
||||
class applyLabelForbidden(Exception):
|
||||
@@ -577,6 +583,8 @@ class organizerOnNonTeamDriveItemNotSupported(Exception):
|
||||
pass
|
||||
class orgunitNotFound(Exception):
|
||||
pass
|
||||
class outsideDomainMemberCannotChangeTeamDriveRestrictions(Exception):
|
||||
pass
|
||||
class ownerOnTeamDriveItemNotSupported(Exception):
|
||||
pass
|
||||
class ownershipChangeAcrossDomainNotPermitted(Exception):
|
||||
@@ -684,6 +692,7 @@ REASON_EXCEPTION_MAP = {
|
||||
ABORTED: aborted,
|
||||
ABUSIVE_CONTENT_RESTRICTION: abusiveContentRestriction,
|
||||
ACCESS_NOT_CONFIGURED: accessNotConfigured,
|
||||
ADMIN_CANNOT_UNSUSPEND: adminCannotUnsuspend,
|
||||
ALREADY_EXISTS: alreadyExists,
|
||||
APPLY_LABEL_FORBIDDEN: applyLabelForbidden,
|
||||
AUTH_ERROR: authError,
|
||||
@@ -790,6 +799,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'
|
||||
@@ -425,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}'
|
||||
|
||||
@@ -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,14 +0,0 @@
|
||||
chardet>=5.2.0
|
||||
cryptography>=44.0.2
|
||||
distro; sys_platform=='linux'
|
||||
filelock>=3.18.0
|
||||
google-api-python-client>=2.167.0
|
||||
google-auth-httplib2>=0.2.0
|
||||
google-auth-oauthlib>=1.2.2
|
||||
google-auth>=2.39.0
|
||||
httplib2>=0.22.0
|
||||
lxml>=5.4.0
|
||||
passlib>=1.7.4
|
||||
pathvalidate>=3.2.3
|
||||
python-dateutil
|
||||
yubikey-manager>=5.6.1
|
||||
@@ -1,55 +0,0 @@
|
||||
[metadata]
|
||||
name = GAM for Google Workspace
|
||||
version = attr: gam.var.GAM_VERSION
|
||||
description = Command line management for Google Workspaces
|
||||
long_description = file: readme.md
|
||||
long_description_content_type = text/markdown
|
||||
url = https://github.com/GAM-team/GAM
|
||||
author = GAM Team
|
||||
author_email = google-apps-manager@googlegroups.com
|
||||
license = Apache
|
||||
license_files = LICENSE
|
||||
keywords = google, oauth2, gsuite, google-apps, google-admin-sdk, google-drive, google-cloud, google-calendar, gam, google-api, oauth2-client, google-workspace
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
Programming Language :: Python :: 3.13
|
||||
License :: OSI Approved :: Apache License
|
||||
|
||||
[options]
|
||||
packages = find:
|
||||
python_requires = >= 3.9
|
||||
# The following files should be edited to match: pyproject.toml, requirements.txt
|
||||
install_requires =
|
||||
chardet >= 5.2.0
|
||||
cryptography >= 44.0.2
|
||||
distro; sys_platform == 'linux'
|
||||
filelock >= 3.18.0
|
||||
google-api-python-client >= 2.167.0
|
||||
google-auth-httplib2 >= 0.2.0
|
||||
google-auth-oauthlib >= 1.2.2
|
||||
google-auth >= 2.39.0
|
||||
httplib2 >= 0.22.0
|
||||
lxml >= 5.4.0
|
||||
passlib >= 1.7.4
|
||||
pathvalidate >= 3.2.3
|
||||
python-dateutil
|
||||
yubikey-manager >= 5.6.1
|
||||
|
||||
[options.package_data]
|
||||
* = *.pem
|
||||
|
||||
# used during pip install .[test]
|
||||
[options.extras_require]
|
||||
test = pre-commit
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
gam = gam.__main__:main
|
||||
|
||||
[bdist_wheel]
|
||||
universal = True
|
||||
@@ -1,3 +0,0 @@
|
||||
from setuptools import setup
|
||||
|
||||
setup()
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -284,6 +284,9 @@
|
||||
<ChatMessage> ::= spaces/<String>/messages/<String>
|
||||
<ChatSpace> ::= spaces/<String> | space <String> | space spaces/<String>
|
||||
<ChatThread> ::= spaces/<String>/threads/<String>
|
||||
<ChromeProfilePermanentID> ::= <String>
|
||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
||||
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
|
||||
<GIGroupAlias> ::= <EmailAddress>
|
||||
<GIGroupItem> ::= <EmailAddress>|<UniqueID>|groups/<String>
|
||||
<CIGroupMemberType> ::= cbcmbrowser|chromeosdevice|customer|group|other|serviceaccount|user
|
||||
@@ -302,6 +305,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>
|
||||
@@ -511,6 +519,14 @@
|
||||
gs://<StorageBucketName>/<StorageObjectName>|
|
||||
<StorageBucketName>/<StorageObjectName>
|
||||
<Tag> ::= <String>
|
||||
<TagManagerAccountID> ::= <String>
|
||||
<TagManagerAccountPath> ::= accounts/<TagManagerAccountID>
|
||||
<TagManagerContainerID> ::= <String>
|
||||
<TagManagerContainerPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>
|
||||
<TagManagerWorkspaceID> ::= <String>
|
||||
<TagManagerWorkspacePath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>
|
||||
<TagManagerTagID> ::= <String>
|
||||
<TagManagerTagPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>/tags/<TagManagerTagID>
|
||||
<TakeoutBucketName> ::= takeout-export-[a-f,0-9,-]*
|
||||
<TaskID> ::= <String>
|
||||
<TaskListID> ::= <String>
|
||||
|
||||
@@ -40,6 +40,7 @@ GAM is capable of acting as a Chat Bot and sending messages to Chat Rooms or dir
|
||||
Even if you're not going to use GAM as a Chat Bot, you have to configure a Chat Bot as it is required by the Chat API in [Users - Chat](Users-Chat).
|
||||
|
||||
* Run the command `gam setup chat`; it will point you to a URL to configure your Chat Bot.
|
||||
* Uncheck "Build this Chat app as a Workspace add-on."
|
||||
* Enter an App name and Description of your choosing.
|
||||
* For the Avatar URL you can use `https://dummyimage.com/384x256/4d4d4d/0011ff.png&text=+GAM` or a public URL to an image of your own choosing.
|
||||
* In Functionality, uncheck both "Receive 1:1 messages" and "Join spaces and group conversations"
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
- [API documentation](#api-documentation)
|
||||
- [Introduction](#introduction)
|
||||
- [Definitions](#definitions)
|
||||
- [Delete Chrome profiles](#delete-chrome-profiles)
|
||||
- [Display Chrome profiles](#display-chrome-profiles)
|
||||
- [Delete Chrome Profiles](#delete-chrome-profiles)
|
||||
- [Display Chrome Profiles](#display-chrome-profiles)
|
||||
- [Profile Query Searchable Fields](#profile-query-searchable-fields)
|
||||
- [Collections of Chrome Profile names for commands](#collections-of-chrome-profile-names-for-commands)
|
||||
- [Create a Chrome Profile command](#create-a-chrome-profile-command)
|
||||
- [Display Chrome Profile commands](#display-chrome-profile-commands)
|
||||
|
||||
## Introduction
|
||||
These features were added in version 7.01.00.
|
||||
@@ -21,13 +24,24 @@ Follow instructions at: Turn on managed profile reporting
|
||||
|
||||
## API documentation
|
||||
* [Chrome Management API - Profiles](https://developers.google.com/chrome/management/reference/rest/v1/customers.profiles)
|
||||
* [Chrome Management API - Profile Commands](https://developers.google.com/chrome/management/reference/rest/v1/customers.profiles.commands)
|
||||
* [Turn on Chrome Browser and Profile Reporting](https://support.google.com/chrome/a/answer/9301421)
|
||||
|
||||
## Definitions
|
||||
* [`<FileSelector> | <CSVFileSelector>`](Collections-of-Items)
|
||||
|
||||
```
|
||||
<CustomerID> ::= <String>
|
||||
<ChromeProfilePermanentID> ::= <String>
|
||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID>
|
||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||
<ChromeProfileCommandName> ::= <ChomeProfileName>/commands/<String>
|
||||
<ChromeProfileCommandNameList> ::= "<ChromeProfileCommandName>(,<ChromeProfileCommandName>)*"
|
||||
<ChromeProfileNameEntity> ::=
|
||||
<ChromeProfileNameList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||
|
||||
<ChromeProfileFieldName> ::=
|
||||
affiliationstate|
|
||||
@@ -89,11 +103,11 @@ Select the fields to be displayed:
|
||||
* `<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]` - Display a selected list of fields
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values:
|
||||
- `formatjson` - Display the fields in JSON format.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam show chromeprofiles
|
||||
[filtertime.* <Time>] [filter <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[orderby <ChromeProfileOrderByFieldName> [ascending|descending]]
|
||||
<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]
|
||||
[formatjson]
|
||||
@@ -106,18 +120,18 @@ Select the fields to be displayed:
|
||||
* `<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]` - Display a selected list of fields
|
||||
|
||||
Use the `filtertime<String> <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
|
||||
The `filtertime<String> <Time>` value replaces the string `#fiktertime<String>#` in the `filter <String>`.
|
||||
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in the `filter <String>`.
|
||||
The characters following `filtertime` can be any combination of lowercase letters and numbers.
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values:
|
||||
- `formatjson` - Display the fields in JSON format.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
```
|
||||
gam print chromeprofiles [todrive <ToDriveAttribute>*]
|
||||
[filtertime.* <Time>] [filter <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[orderby <ChromeProfileOrderByFieldName> [ascending|descending]]
|
||||
<ChromeProfileFieldName>* [fields <ChromeProfileFieldNameList>]
|
||||
[[formatjson [quotechar <Character>]]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
|
||||
Use these options to select Chrome profiles; if none are chosen, all Chrome profiles in the account are selected:
|
||||
@@ -192,4 +206,111 @@ gam print chromeprofiles filter "lastPolicySyncTime >= \"#filtertime1#\" lastPol
|
||||
Print information about Chrome profiles on Windows.
|
||||
```
|
||||
gam print chromeprofiles filter "osPlatformType=WINDOWS"
|
||||
```
|
||||
```
|
||||
## Collections of Chrome Profile names for commands
|
||||
```
|
||||
<ChromeProfileNameEntity> ::=
|
||||
<ChromeProfileNameList> |
|
||||
(select <ChromeProfileNameList>|<FileSelector>|<CSVFileSelector>) |
|
||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||
```
|
||||
* `<ChromeProfileNameList>` - A list of Chrome profile names
|
||||
* `select <ChromeProfileNameList>` - A list of Chrome profile names
|
||||
* `select <FileSelector>|<CSVFileSelector>` - A flat or CSV file containing Chrome profile names
|
||||
* `filter <String> (filtertime<String> <Time>)*` - A filter to select Chrome profiles
|
||||
* `commands <ChromeProfileCommandNameList>` - A list of Chrome profile command names
|
||||
* `commands <FileSelector>|<CSVFileSelector>` - A flat or CSV file containing Chrome profile command names
|
||||
|
||||
Use the `filtertime<String> <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
|
||||
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in the `filter <String>`.
|
||||
The characters following `filtertime` can be any combination of lowercase letters and numbers.
|
||||
|
||||
## Create a Chrome Profile command
|
||||
Clear a Chrome Browser profile cache and/or cookies.
|
||||
```
|
||||
gam create chromeprofilecommand <ChromeProfileNameEntity>
|
||||
[clearcache [<Boolean>]] [clearcookies [<Boolean>]]
|
||||
[csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]
|
||||
```
|
||||
By default, when a Chrome profile command is created, GAM outputs details of the command as indented keywords and values.
|
||||
* `formatjson` - Display the details in JSON format.
|
||||
* `csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]` - Output the details in CSV format.
|
||||
|
||||
## Display Chrome Profile commands
|
||||
Display the status of a specific Chrome Browser profile command.
|
||||
```
|
||||
gam info chromeprofilecommand <ChromeProfileCommandName>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
|
||||
Display the status of selected Chrome Browser profile commands.
|
||||
```
|
||||
gam show chromeprofilecommands <ChromeProfileNameEntity>
|
||||
[formatjson]
|
||||
```
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values:
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam print chromeprofilecommands <ChromeProfileNameEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
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.
|
||||
|
||||
### Examples
|
||||
|
||||
For Windows PowerShell, replace `\"` with ``` `" ```.
|
||||
|
||||
Clear cache and cookies for two specific Chrome profiles:
|
||||
```
|
||||
gam create chromeprofilecommand 4c6c0a9f-de78-4285-be86-713fca8cffff,aa03151c-7c1d-41fe-b793-5753e167ffff clearcache clearcookies
|
||||
```
|
||||
|
||||
Display the command status for those Chrome profiles:
|
||||
```
|
||||
gam show chromeprofilecommand 4c6c0a9f-de78-4285-be86-713fca8cffff,aa03151c-7c1d-41fe-b793-5753e167ffff
|
||||
gam print chromeprofilecommand 4c6c0a9f-de78-4285-be86-713fca8cffff,aa03151c-7c1d-41fe-b793-5753e167ffff
|
||||
```
|
||||
|
||||
Clear cache and cookies for Chrome profiles in a CSV file named `ChromeProfiles.csv` with a column `name`:
|
||||
```
|
||||
gam create chromeprofilecommand select csvfile ChromeProfiles.csv:name clearcache clearcookies
|
||||
```
|
||||
|
||||
Display the command status for those Chrome profiles:
|
||||
```
|
||||
gam show chromeprofilecommand select csvfile ChromeProfiles.csv:name
|
||||
gam print chromeprofilecommand select csvfile ChromeProfiles.csv:name
|
||||
```
|
||||
|
||||
Clear cache and cookies for Chrome profiles with last activity more that 60 days ago:
|
||||
```
|
||||
gam create chromeprofilecommand filter "lastActivityTime < \"#filtertime1#\"" filtertime1 -60d clearcache clearcookies
|
||||
```
|
||||
|
||||
Display the command status for those Chrome profiles:
|
||||
```
|
||||
gam show chromeprofilecommand filter "lastActivityTime < \"#filtertime1#\"" filtertime1 -60d
|
||||
gam print chromeprofilecommand filter "lastActivityTime < \"#filtertime1#\"" filtertime1 -60d
|
||||
```
|
||||
|
||||
Clear cache and cookies for Chrome profiles with last activity more that 60 days ago:
|
||||
```
|
||||
gam redirect csv ./ChromeProfileCmds.csv create chromeprofilecommand filter "lastActivityTime < \"#filtertime1#\"" filtertime1 -60d clearcache clearcookies csv
|
||||
```
|
||||
|
||||
Display the command status for those Chrome profile commands
|
||||
```
|
||||
gam show chromeprofilecommand commands ChromeProfileCmds.csv:name
|
||||
gam print chromeprofilecommand commands ChromeProfileCmds.csv:name
|
||||
```
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Cloud Identity Groups - Membership
|
||||
- [API documentation](#api-documentation)
|
||||
- [Query documentation](#query-documentation)
|
||||
- [Python Regular Expressions](Python-Regular-Expressions) Match function
|
||||
- [Definitions](#definitions)
|
||||
- [Notes](#Notes)
|
||||
@@ -22,10 +21,6 @@
|
||||
* [Cloud Identity Groups](https://gsuiteupdates.googleblog.com/2020/08/new-api-cloud-identity-groups-google.html)
|
||||
* [Security Groups](https://gsuiteupdates.googleblog.com/2020/09/security-groups-beta.html)
|
||||
|
||||
## 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)
|
||||
|
||||
## Notes
|
||||
|
||||
In the Admin Directory API a group has the following characteristics:
|
||||
@@ -45,7 +40,7 @@ Dynamic Groups require Cloud Identity Premium accounts.
|
||||
* https://cloud.google.com/identity/docs/how-to/create-dynamic-groups
|
||||
|
||||
The `cimember <UserItem>` option of `gam print|show cigroup-members` requires a Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education;
|
||||
and Cloud Identity Premium accounts. Unfortunately, even if you have the required account, the API call that supports the query doesn't work.
|
||||
and Cloud Identity Premium accounts.
|
||||
|
||||
* https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/searchTransitiveGroups
|
||||
|
||||
|
||||
@@ -19,8 +19,10 @@
|
||||
* [Security Groups](https://gsuiteupdates.googleblog.com/2020/09/security-groups-beta.html)
|
||||
|
||||
## 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)
|
||||
* [Cloud Identity Groups API - Search](https://cloud.google.com/identity/docs/reference/rest/v1/groups/search)
|
||||
* [Cloud Identity Groups API - Dynamic Group Query](https://cloud.google.com/identity/docs/reference/rest/v1/groups#dynamicgroupquery)
|
||||
* [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
|
||||
|
||||
@@ -50,7 +52,7 @@ Dynamic Groups require Cloud Identity Premium accounts.
|
||||
* https://cloud.google.com/identity/docs/how-to/create-dynamic-groups
|
||||
|
||||
The `cimember <UserItem>` option of `gam print cigroups` requires a Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education;
|
||||
and Cloud Identity Premium accounts. Unfortunately, even if you have the required account, the API call that supports the query doesn't work.
|
||||
and Cloud Identity Premium accounts.
|
||||
|
||||
* https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships/searchTransitiveGroups
|
||||
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
@@ -144,6 +144,11 @@ Data fields identified in a `csvkmd` argument.
|
||||
<CalendarACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<CalendarEntity> ::=
|
||||
<CalendarList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<ChromeProfileNameEntity> ::=
|
||||
<ChromeProfileNameList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]]) |
|
||||
(commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>)
|
||||
<CIPolicyNameEntity> ::=
|
||||
<CIPolicyNameList> | <FileSelector> | <CSVFileSelector>
|
||||
<ClassificationLabelNameEntity> ::=
|
||||
@@ -206,6 +211,7 @@ Data fields identified in a `csvkmd` argument.
|
||||
all_shortcuts |
|
||||
all_3p_shortcuts |
|
||||
all_items |
|
||||
my_commentable_items |
|
||||
my_docs |
|
||||
my_files |
|
||||
my_folders |
|
||||
@@ -231,6 +237,7 @@ Data fields identified in a `csvkmd` argument.
|
||||
others_3p_shortcuts |
|
||||
others_items |
|
||||
writable_files
|
||||
|
||||
<DriveFileEntityShortcut> ::=
|
||||
alldrives |
|
||||
mydrive_any |
|
||||
@@ -246,6 +253,7 @@ Data fields identified in a `csvkmd` argument.
|
||||
sharedwithme_all |
|
||||
sharedwithme_mydrive |
|
||||
sharedwithme_notmydrive
|
||||
|
||||
<DriveFileEntity> ::=
|
||||
<DriveFileIDEntity> |
|
||||
<DriveFileNameEntity> |
|
||||
@@ -343,6 +351,15 @@ Data fields identified in a `csvkmd` argument.
|
||||
<SiteACLScopeList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<SiteEntity> ::=
|
||||
<SiteList> | <FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVDataSelector>
|
||||
<TagManagerAccountPathEntity> ::=
|
||||
<TagManagerAccountPathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
<TagManagerContainerPathEntity> ::=
|
||||
<TagManagerContainerPathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
<TagManagerWorkspacePathEntity> ::=
|
||||
<TagManagerWorkspacePathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
<TasklistEntity> ::=
|
||||
<TasklistIDList> | <TaskListTitleList> | <FileSelector> | <CSVFileSelector>
|
||||
<TasklistIDTaskIDEntity> ::=
|
||||
|
||||
@@ -308,12 +308,3 @@ the quote character itself, the column delimiter (comma by default) and new-line
|
||||
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
|
||||
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
|
||||
`quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.
|
||||
|
||||
## Display global address list
|
||||
As of mid-October 2024, Google deprecated the API that retrieved the Global Address List.
|
||||
|
||||
These commands are a work-around.
|
||||
```
|
||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" redirect csv ./UserGAL.csv print users fields name,gal
|
||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" batch_size 25 redirect csv ./GroupGAL.csv print groups fields name,gal
|
||||
```
|
||||
|
||||
@@ -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,178 @@ 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.14.04
|
||||
|
||||
Fixed bug in `gam print|show cigroups cimember <UserItem>` that generated the following error:
|
||||
```
|
||||
ERROR: Cloud Identity Group: groups/-, Print Failed: Error(4013): Insufficient permissions to retrieve memberships.
|
||||
```
|
||||
|
||||
Updated `gam <UserTypeEntity> update user suspended off` and `gam <UserTypeEntity> unsuspend users`
|
||||
to handle the following error that occurs when trying to unsuspend a user that has been suspended for abuse.
|
||||
```
|
||||
ERROR: 412: adminCannotUnsuspend - Cannot restore a user suspended for abuse.
|
||||
```
|
||||
|
||||
* See: https://support.google.com/a/answer/1110339
|
||||
|
||||
### 7.14.03
|
||||
|
||||
Fixed bug in `gam print cigroup-members includederivedmembership` that caused a trap.
|
||||
|
||||
### 7.14.02
|
||||
|
||||
Fixed bug in `gam print|show cigroups|cigroups-members cimember <UserItem>` that generated the following error:
|
||||
```
|
||||
Cloud Identity Group Print Failed: Request contains an invalid argument.
|
||||
```
|
||||
|
||||
### 7.14.01
|
||||
|
||||
Don't install yubikey library via pip by default. To install with yubikey support use pip install gam7[yubikey]
|
||||
|
||||
### 7.14.00
|
||||
|
||||
Added commands to display Google Tag Manager accounts, containers, workspaces, tags and user permissions.
|
||||
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Users-Tag-Manager
|
||||
|
||||
### 7.13.03
|
||||
|
||||
Added option `csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]`
|
||||
to `gam create chromeprofilecommand` so that command details are displayed in CSV format.
|
||||
|
||||
Added option `commands <ChromeProfileCommandNameList>|<FileSelector>|<CSVFileSelector>` to `<ChromeProfileNameEntity>`
|
||||
so that `gam print|show chromeprofilecommands` can directly display the commands generated by
|
||||
`gam create chromeprofilecommand` with the `csv` option.
|
||||
|
||||
### 7.13.02
|
||||
|
||||
Fixed bug in `gam create chromeprofilecommand` where `select|filter` were not recognized.
|
||||
|
||||
Updated `gam create datatransfer <OldOwnerID> datastudio <NewOwnerID>` that generated the following
|
||||
error due to an unhandled API change.
|
||||
```
|
||||
ERROR: Invalid choice (google data studio): Expected <calendar|looker studio|drive and docs>
|
||||
```
|
||||
|
||||
### 7.13.01
|
||||
|
||||
Enhanced `gam create|print|show chromeprofilecommand` to allow specification
|
||||
of multiple Chrome browser profiles rather than just one.
|
||||
```
|
||||
<ChromeProfilePermanentID> ::= <String>
|
||||
<ChromeProfileName> ::= customers/<CustomerID>/profiles/<ChromeProfilePermanentID> | <ChromeProfilePermanentID>
|
||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||
<ChromeProfileNameEntity> ::=
|
||||
<ChromeProfileNameEntity> ::=
|
||||
<ChromeProfileNameList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
(filter <String> (filtertime<String> <Time>)* [orderby <ChromeProfileOrderByFieldName> [ascending|descending]])
|
||||
|
||||
gam create|print_show chromeprofilecommand <ChromeProfileNameEntity>
|
||||
```
|
||||
|
||||
### 7.13.00
|
||||
|
||||
Added commands that send remote commands to Chrome browser profiles and display the results;
|
||||
at the moment, these commands can clear the browser cache and cookies.
|
||||
|
||||
* See: https://github.com/GAM-team/GAM/wiki/Chrome-Profile-Management#create-a-chrome-profile-command
|
||||
|
||||
### 7.12.02
|
||||
|
||||
Updated `gam print users` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
17
wiki/Global-Address-List.md
Normal file
17
wiki/Global-Address-List.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Global Address List
|
||||
|
||||
As of mid-October 2024, Google deprecated the API that retrieved the Global Address List.
|
||||
|
||||
These commands are a work-around.
|
||||
|
||||
Display users/groups in GAL.
|
||||
```
|
||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" redirect csv ./UserGAL.csv print users fields name,gal
|
||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:true" batch_size 25 redirect csv ./GroupGAL.csv print groups fields name,gal
|
||||
```
|
||||
|
||||
Display users/groups not in GAL.
|
||||
```
|
||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:false" redirect csv ./UserNotGAL.csv print users fields name,gal
|
||||
gam config csv_output_row_filter "includeInGlobalAddressList:boolean:false" batch_size 25 redirect csv ./GroupNotGAL.csv print groups fields name,gal
|
||||
```
|
||||
@@ -13,8 +13,7 @@
|
||||
```
|
||||
<DataTransferService> ::=
|
||||
calendar|
|
||||
currents|
|
||||
datastudio|lookerstudio|"google data studio"|
|
||||
datastudio|lookerstudio|"looker studio"|
|
||||
drive|gdrive|googledrive|"drive and docs"
|
||||
<DataTransferServiceList> ::= "<DataTransferService>(,<DataTransferService>)*"
|
||||
|
||||
@@ -38,7 +37,7 @@ gam create|add datatransfer|transfer <OldOwnerID> <DataTransferServiceList> <New
|
||||
(<ParameterKey> <ParameterValue>)*
|
||||
[wait <Integer> <Integer>]
|
||||
```
|
||||
For`datastudio` and `drive`, there are options to control the privacy level of the files to be transferred.
|
||||
For`lookerstudio` and `drive`, there are options to control the privacy level of the files to be transferred.
|
||||
* `private` or `privacy_level private` - Transfer files that are not shared with anyone
|
||||
* `shared` or `privacy_level shared` - Transfer files shared with at least one other user; this is the **default**
|
||||
* `all` or `privacy_level private,shared` - Transfer all files
|
||||
|
||||
@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin$ gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAM 7.10.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.14.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
@@ -989,7 +989,7 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\>del C:\GAMConfig\oauth2.txt
|
||||
C:\>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAM 7.10.04 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM 7.14.04 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
# Install GAM as Python Library
|
||||
|
||||
Thanks to Jay Lee for showing me how to do this.
|
||||
|
||||
On Windows, you need to install Git to use the pip command.
|
||||
* See: https://pythoninoffice.com/python-pip-install-from-github/
|
||||
|
||||
Scroll down to Install Git
|
||||
|
||||
You can install GAM as a Python library with pip.
|
||||
```
|
||||
pip install git+https://github.com/GAM-team/GAM.git#subdirectory=src
|
||||
pip install gam7
|
||||
```
|
||||
|
||||
Or as a PEP 508 Requirement Specifier, e.g. in requirements.txt file:
|
||||
```
|
||||
advanced-gam-for-google-workspace @ git+https://github.com/GAM-team/GAM.git#subdirectory=src
|
||||
gam7
|
||||
```
|
||||
|
||||
Or a pyproject.toml file:
|
||||
@@ -23,13 +17,13 @@ Or a pyproject.toml file:
|
||||
name = "your-project"
|
||||
# ...
|
||||
dependencies = [
|
||||
"advanced-gam-for-google-workspace @ git+https://github.com/GAM-team/GAM.git#subdirectory=src"
|
||||
"gam7"
|
||||
]
|
||||
```
|
||||
|
||||
Target a specific revision or tag:
|
||||
Target a specific version:
|
||||
```
|
||||
advanced-gam-for-google-workspace @ git+https://github.com/GAM-team/GAM.git@v6.76.01#subdirectory=src
|
||||
gam7==/7.13.3
|
||||
```
|
||||
|
||||
## Using the library
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<CalendarACLScopeList> ::= "<CalendarACLScope>(,<CalendarACLScope>)*"
|
||||
<CalendarList> ::= "<CalendarItem>(,<CalendarItem>)*"
|
||||
<ChatSpaceList> ::= "<ChatSpace>(,<ChatSpace>)*"
|
||||
<ChromeProfileNameList> ::= "<ChromeProfileName>(,<ChromeProfileName>)*"
|
||||
<ChromeProfileCommandNameList> ::= "<ChromeProfileCommandName>(,<ChromeProfileCommandName>)*"
|
||||
<CIGroupAliasList> ::= "<CIGroupAlias>(,<CIGroupAlias>)*"
|
||||
<CIGroupMemberTypeList> ::= "<CIGroupMemberType>(,<CIGroupMemberType>)*"
|
||||
<CIPolicyNameList> ::= "<CIPolicyName>(,<CIPolicyName>)*"
|
||||
@@ -96,6 +98,9 @@
|
||||
<SharedDriveACLRoleList> ::= "<SharedDriveACLRole>(,<SharedDriveACLRole>)*"
|
||||
<SharedDriveIDList> ::= "<SharedDriveID>(,<SharedDriveID>)*"
|
||||
<StringList> ::= "<String>(,<String>)*"
|
||||
<TagManagerAccountPathList> ::= "<TagManagerAccountPath>(,<TagManagerAccountPath>)*"
|
||||
<TagManagerContainerPathList> ::= "<TagManagerContainerPath>(,<TagManagerContainerPath>)*"
|
||||
<TagManagerWorkspacePathList> ::= "<TagManagerWorkspacePath>(,<TagManagerWorkspacePath>)*"
|
||||
<TasklistIDList> ::= "<TasklistID>(,<TasklistID>)*"
|
||||
<TasklistTitleList> ::= "'<TasklistTitle>'(,'<TasklistTitle>')*"
|
||||
<TasklistIDTaskIDList> ::= "<TasklistIDTaskID>(,<TasklistIDTaskID>)*"
|
||||
|
||||
@@ -68,7 +68,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<String> <Time>] [filter|filters <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[event|events <EventNameList>] [ip <String>]
|
||||
[groupidfilter <String>]
|
||||
[maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
||||
@@ -363,7 +363,7 @@ gam report users|user [todrive <ToDriveAttribute>*]
|
||||
[(date <Date>)|(range <Date> <Date>)|
|
||||
yesterday|today|thismonth|(previousmonths <Integer>)]
|
||||
[(nodatechange | limitdatechanges <Integer>) | (fulldatarequired all|<UserServiceNameList>)]
|
||||
[filtertime<String> <Time>] [filter|filters <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[(fields|parameters <String>)|(services <UserServiceNameList>)]
|
||||
[aggregatebydate|aggregatebyuser [Boolean]]
|
||||
[maxresults <Number>]
|
||||
@@ -413,7 +413,7 @@ where you can specify a relative date without having to change the script.
|
||||
|
||||
For example, filter for last logins more that 60 days ago.
|
||||
```
|
||||
filtertime60d -60d filters "accounts:last_login_time<#filtertime60d#"
|
||||
filters "accounts:last_login_time<#filtertime60d#" filtertime60d -60d
|
||||
```
|
||||
|
||||
Select the fields/parameters to display.
|
||||
|
||||
@@ -135,7 +135,7 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
## Manage Resold Subscriptions
|
||||
```
|
||||
gam create resoldsubscription <CustomerID> (sku <SKUID>)
|
||||
(plan annual_monthly_pay|annual_yearly_pay|flexible|trial)
|
||||
(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>
|
||||
|
||||
@@ -390,14 +390,14 @@ gam delete building <BuildingID>
|
||||
gam info building <BuildingID>
|
||||
[formatjson]
|
||||
gam show buildings
|
||||
[allfields|<BuildingFildName>*|(fields <BuildingFieldNameList>)]
|
||||
[allfields|<BuildingFieldName>*|(fields <BuildingFieldNameList>)]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the fields in JSON format.
|
||||
```
|
||||
gam print buildings [todrive <ToDriveAttribute>*]
|
||||
[allfields|<BuildingFildName>*|(fields <BuildingFieldNameList>)]
|
||||
[allfields|<BuildingFieldName>*|(fields <BuildingFieldNameList>)]
|
||||
[delimiter <Character>] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format,
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
* [Shared Drives Search](https://developers.google.com/drive/api/guides/search-shareddrives)
|
||||
|
||||
## Definitions
|
||||
* [`<FileSelector> | <CSVFileSelector>`](Collections-of-Items)
|
||||
|
||||
```
|
||||
<ColorHex> ::= "#<Hex><Hex><Hex><Hex><Hex><Hex>"
|
||||
<ColorNameGoogle> ::=
|
||||
@@ -180,6 +182,7 @@
|
||||
createdtime|
|
||||
id|
|
||||
name|
|
||||
restrictions|
|
||||
themeid
|
||||
<SharedDriveFieldNameList> ::= "<SharedDriveFieldName>(,<SharedDriveFieldName>)*"
|
||||
|
||||
@@ -200,6 +203,8 @@
|
||||
allowcontentmanagerstosharefolders|
|
||||
copyrequireswriterpermission|
|
||||
domainusersonly|
|
||||
downloadrestrictedforreaders|
|
||||
downloadrestrictedforwriters|
|
||||
drivemembersonly|teammembersonly|
|
||||
sharingfoldersrequiresorganizerpermission
|
||||
|
||||
@@ -372,26 +377,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.
|
||||
|
||||
|
||||
@@ -1723,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
|
||||
|
||||
@@ -214,6 +214,12 @@ The option `updatesheetprotectedranges` only applies to items in `<DriveFileEnti
|
||||
* ACLs with role reader or commenter will be removed from existing protected ranges
|
||||
* ACLs with role writer or higher will be added to existing protected ranges
|
||||
|
||||
`
|
||||
`enforceexpansiveaccess` defaults to the value of `gam.cfg/enforce_expansive_access` that controls
|
||||
the ability to update inherited ACLs.
|
||||
* False - Inherited ACLs can be updated
|
||||
* True = Inherited ACLs can not be updated
|
||||
|
||||
By default, the file ID is displayed in the output; to see the file name, use the `showtitles`
|
||||
option; this requires an additional API call per file.
|
||||
|
||||
@@ -234,6 +240,11 @@ The option `updatesheetprotectedranges` only applies to items in `<DriveFileEnti
|
||||
* Sheet Protected Ranges are updated to reflect the deleted ACL; additional API calls are required.
|
||||
* ACLs with any role will be removed from existing protected ranges
|
||||
|
||||
`enforceexpansiveaccess` defaults to the value of `gam.cfg/enforce_expansive_access` that controls
|
||||
the ability to delete delete inherited ACLs.
|
||||
* False - Inherited ACLs can be deleted
|
||||
* True = Inherited ACLs can not be deleted
|
||||
|
||||
By default, the file ID is displayed in the output; to see the file name, use the `showtitles`
|
||||
option; this requires an additional API call per file.
|
||||
|
||||
@@ -266,6 +277,11 @@ gam <UserTypeEntity> delete permissions <DriveFileEntity> <DriveFilePermissionID
|
||||
<PermissionMatch>* [<PermissionMatchAction>]
|
||||
[enforceexpansiveaccess [<Boolean>]]
|
||||
```
|
||||
`enforceexpansiveaccess` defaults to the value of `gam.cfg/enforce_expansive_access` that controls
|
||||
the ability to delete delete inherited ACLs.
|
||||
* False - Inherited ACLs can be deleted
|
||||
* True = Inherited ACLs can not be deleted
|
||||
|
||||
When deleting permissions from JSON data, permissions with role `owner` true are never processed.
|
||||
|
||||
## Display file permissions/sharing
|
||||
|
||||
@@ -290,7 +290,7 @@ Select forms with `<DriveFileEntity>`:
|
||||
* `my_forms` - Display responses for all forms owned by the user
|
||||
```
|
||||
gam <UserTypeEntity> show formresponses <DriveFileEntity>
|
||||
[filtertime.* <Time>] [filter <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[countsonly|formatjson]
|
||||
```
|
||||
By default, GAM displays form response details, use the `countsonly` option to get the number of responses but no response details.
|
||||
@@ -302,11 +302,12 @@ By default, GAM displays all form responses, you can filter by response time:
|
||||
For example, to get the form responses submitted since the beginning of the year:
|
||||
* `filter timestamp >= 2022-01-01T00:00:00Z`
|
||||
|
||||
Use the `filtertime.* <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
|
||||
Use the `filtertime<String <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
|
||||
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in any filters..
|
||||
The characters following `filtertime` can be any combination of lowercase letters and numbers.
|
||||
|
||||
For example, to get the responses subnitted in the last four hours:
|
||||
* `filtertime4h -4h filter "timestamp >= #filtertime4h#`
|
||||
For example, to get the responses submitted in the last four hours:
|
||||
* `filter "timestamp >= #filtertime4h#" filtertime4h -4h`
|
||||
|
||||
By default, Gam displays the information as an indented list of keys and values.
|
||||
* `formatjson` - Display the form response in JSON format
|
||||
@@ -314,7 +315,7 @@ By default, Gam displays the information as an indented list of keys and values.
|
||||
```
|
||||
gam <UserTypeEntity> print formresponses <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[filtertime.* <Time>] [filter <String>]
|
||||
[filter <String> (filtertime<String> <Time>)*]
|
||||
[countsonly|(formatjson [quotechar <Character>])]
|
||||
```
|
||||
By default, GAM displays form response details, use the `countsonly` option to get the number of responses but no response details.
|
||||
@@ -328,11 +329,12 @@ By default, GAM displays all form responses, you can filter by response time:
|
||||
For example, to get the form responses submitted since the beginning of the year:
|
||||
* `filter timestamp >= 2022-01-01T00:00:00Z`
|
||||
|
||||
Use the `filtertime.* <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
|
||||
Use the `filtertime<String> <Time>` option to allow times, usually relative, to be substituted into the `filter <String>` option.
|
||||
The `filtertime<String> <Time>` value replaces the string `#filtertime<String>#` in any filters..
|
||||
The characters following `filtertime` can be any combination of lowercase letters and numbers.
|
||||
|
||||
For example, to get the responses subnitted in the last four hours:
|
||||
* `filtertime4h -4h filter "timestamp >= #filtertime4h#`
|
||||
* `filter "timestamp >= #filtertime4h#" filtertime4h -4h`
|
||||
|
||||
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.
|
||||
|
||||
@@ -80,8 +80,8 @@ All `<FilterAction>s` except `forward <EmailAddress>` involve adding/removing la
|
||||
* `label <LabelName>` - Add the user label `<LabelName>`; only one user label can be specified. It will be created if necessary.
|
||||
|
||||
In Gmail, you can have a multi-level label like `Top/Middle/Bottom`; you can also have a single-level label like `Top/Middle/Bottom`,
|
||||
* If `buildpath` is omitted or `<Boolean>` is set to False, a <labelName>` containing `/` will be created as single-level.
|
||||
* If `buildpath` is present and `<Boolean>` is omitted or set to True, a <labelName>` containing `/` will be created as multi-level;
|
||||
* If `buildpath` is omitted or `<Boolean>` is set to False, a `<labelName>` containing `/` will be created as single-level.
|
||||
* If `buildpath` is present and `<Boolean>` is omitted or set to True, a `<labelName>` containing `/` will be created as multi-level;
|
||||
all parent labels are created as necessary.
|
||||
|
||||
If `forward <EmailAddress>` is specified, the filter creation will fail if the user has not defined `<EmailAddress>` as a forwarding address.
|
||||
|
||||
@@ -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`
|
||||
|
||||
213
wiki/Users-Tag-Manager.md
Normal file
213
wiki/Users-Tag-Manager.md
Normal file
@@ -0,0 +1,213 @@
|
||||
# Users - Tag Manager
|
||||
- [API documentation](#api-documentation)
|
||||
- [Notes](#notes)
|
||||
- [Definitions](#definitions)
|
||||
- [Display Tag Manager Accounts](#display-tag-manager-accounts)
|
||||
- [Display Tag Manager Containers](#display-tag-manager-containers)
|
||||
- [Display Tag Manager Workspaces](#display-tag-manager-workspaces)
|
||||
- [Display Tag Manager Tags](#display-tag-manager-tags)
|
||||
- [Display Tag Manager User Permissions](#display-tag-manager-user-permissions)
|
||||
- [Examples](#examples)
|
||||
|
||||
## API documentation
|
||||
* [Tag Manager API](https://developers.google.com/tag-manager/reference/rest)
|
||||
|
||||
## Notes
|
||||
To use these commands you must add the 'Tag Manager API' to your project and update your service account authorization.
|
||||
```
|
||||
gam update project
|
||||
gam user user@domain.com update serviceaccount
|
||||
|
||||
[*] 41) Tag Manager API - Accounts, Containers, Workspaces, Tags - read only
|
||||
[*] 42) Tag Manager API - Users
|
||||
|
||||
```
|
||||
|
||||
## Definitions
|
||||
* [`<UserTypeEntity>`](Collections-of-Users)
|
||||
* [`<FileSelector> | <CSVFileSelector>`](Collections-of-Items)
|
||||
```
|
||||
<TagManagerAccountID> ::= <String>
|
||||
<TagManagerAccountPath> ::= accounts/<TagManagerAccountID>
|
||||
<TagManagerAccountPathList> ::= "<TagManagerAccountPath>(,<TagManagerAccountPath>)*"
|
||||
<TagManagerAccountPathEntity> ::=
|
||||
<TagManagerAccountPathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
|
||||
<TagManagerContainerID> ::= <String>
|
||||
<TagManagerContainerPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>
|
||||
<TagManagerContainerPathList> ::= "<TagManagerContainerPath>(,<TagManagerContainerPath>)*"
|
||||
<TagManagerContainerPathEntity> ::=
|
||||
<TagManagerContainerPathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
|
||||
<TagManagerWorkspaceID> ::= <String>
|
||||
<TagManagerWorkspacePath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>
|
||||
<TagManagerWorkspacePathList> ::= "<TagManagerWorkspacePath>(,<TagManagerWorkspacePath>)*"
|
||||
<TagManagerWorkspacePathEntity> ::=
|
||||
<TagManagerWorkspacePathList> |
|
||||
(select <FileSelector>|<CSVFileSelector>) |
|
||||
|
||||
<TagManagerTagID> ::= <String>
|
||||
<TagManagerTagPath> ::= accounts/<TagManagerAccountID>/containers/<TagManagerContainerID>/workspaces/<TagManagerWorkspaceID>/tags/<TagManagerTagID>
|
||||
```
|
||||
## Display Tag Manager Accounts
|
||||
```
|
||||
gam <UserTypeEntity> show tagmanageraccounts
|
||||
[includegoogletags [<Boolean>]]
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the accounts as an indented list of keys and values.
|
||||
* `formatjson` - Display the account in JSON format
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print tagmanagerccounts [todrive <ToDriveAttribute>*]
|
||||
[includegoogletags [<Boolean>]]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the accounts 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.
|
||||
|
||||
## Display Tag Manager Containers
|
||||
```
|
||||
gam <UserTypeEntity> show tagmanagercontainers <TagManagerAccountPathEntity>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the containers as an indented list of keys and values.
|
||||
* `formatjson` - Display the container in JSON format
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print tagmanagercontainers <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the containers 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.
|
||||
|
||||
## Display Tag Manager Workspaces
|
||||
```
|
||||
gam <UserTypeEntity> show tagmanagerworkspaces <TagManagerContainerPathEntity>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the workspaces as an indented list of keys and values.
|
||||
* `formatjson` - Display the workspace in JSON format
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print tagmanagerworkspaces <TagManagerContainerPathEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the workspaces 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.
|
||||
|
||||
## Display Tag Manager Tags
|
||||
```
|
||||
gam <UserTypeEntity> show tagmanagertags <TagManagerWorkspacePathEntity>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the tags as an indented list of keys and values.
|
||||
* `formatjson` - Display the tag in JSON format
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print tagmanagertags <TagManagerWorkspacePathEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the tags 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.
|
||||
|
||||
## Display Tag Manager User Permissions
|
||||
```
|
||||
gam <UserTypeEntity> show tagmanagerpermissions <TagManagerAccountPathEntity>
|
||||
[formatjson]
|
||||
```
|
||||
By default, Gam displays the permissions as an indented list of keys and values.
|
||||
* `formatjson` - Display the permission in JSON format
|
||||
|
||||
```
|
||||
gam <UserTypeEntity> print tagmanagerpermissions <TagManagerAccountPathEntity> [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
By default, Gam displays the permissions 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.
|
||||
|
||||
### Examples
|
||||
Single user - Get CSV data.
|
||||
```
|
||||
$ gam redirect csv ./tmaccounts.csv user taguser@domain.com print tagmanageraccounts
|
||||
|
||||
$ gam redirect csv ./tmcontainers.csv user taguser@domain.com print tagmanagercontainers select csvfile tmaccounts.csv:path
|
||||
|
||||
$ gam redirect csv ./tmworkspaces.csv user taguser@domain.com print tagmanagerworkspaces select csvfile tmcontainers.csv:path
|
||||
|
||||
$ gam redirect csv ./tmtags.csv user taguser@domain.com print tagmanagertags select csvfile tmworkspaces.csv:path
|
||||
|
||||
$ gam redirect csv ./tmpermissions.csv user taguser@domain.com print tagmanagerpermissions select csvfile tmaccounts.csv:path
|
||||
```
|
||||
|
||||
Single user - Get indented keys and values data from CSV data.
|
||||
```
|
||||
$ gam redirect stdout ./tmaccounts.txt user taguser@domain.com show tagmanageraccounts
|
||||
|
||||
$ gam redirect stdout ./tmcontainers.txt user taguser@domain.com show tagmanagercontainers select csvfile tmaccounts.csv:path
|
||||
|
||||
$ gam redirect stdout ./tmworkspaces.txt user taguser@domain.com show tagmanagerworkspaces select csvfile tmcontainers.csv:path
|
||||
|
||||
$ gam redirect stdout ./tmtags.txt user taguser@domain.com show tagmanagertags select csvfile tmworkspaces.csv:path
|
||||
|
||||
$ gam redirect stdout ./tmpermissions.txt user taguser@domain.com show tagmanagerpermissions select csvfile tmaccounts.csv:path
|
||||
```
|
||||
|
||||
Multiple users - Get CSV data.
|
||||
```
|
||||
$ gam redirect csv ./tmaccounts.csv multiprocess redirect stderr - multiprocess csv Users.csv gam user "~User" print tagmanageraccounts
|
||||
|
||||
$ gam redirect csv ./tmcontainers.csv multiprocess redirect stderr - multiprocess csv tmaccounts.csv gam user "~User" print tagmanagercontainers "~path"
|
||||
|
||||
$ gam redirect csv ./tmworkspaces.csv multiprocess redirect stderr - multiprocess csv tmcontainers.csv gam user "~User" print tagmanagerworkspaces "~path"
|
||||
|
||||
$ gam redirect csv ./tmtags.csv multiprocess redirect stderr - multiprocess csv tmworkspaces.csv gam user "~User" print tagmanagertags "~path"
|
||||
|
||||
$ gam redirect csv ./tmpermissions.csv multiprocess redirect stderr - multiprocess csv tmaccounts.csv gam user "~User" print tagmanagerpermissions "~path"
|
||||
```
|
||||
|
||||
Multiple users - Get indented keys and values data from CSV data.
|
||||
```
|
||||
$ gam redirect stdout ./tmaccounts.txt multiprocess redirect stderr - multiprocess csv Users.csv gam user "~User" show tagmanageraccounts
|
||||
|
||||
$ gam redirect stdout ./tmcontainers.txt multiprocess redirect stderr - multiprocess csv tmaccounts.csv gam user "~User" show tagmanagercontainers "~path"
|
||||
|
||||
$ gam redirect stdout ./tmworkspaces.txt multiprocess redirect stderr - multiprocess csv tmcontainers.csv gam user "~User" show tagmanagerworkspaces "~path"
|
||||
|
||||
$ gam redirect stdout ./tmtags.txt multiprocess redirect stderr - multiprocess csv tmworkspaces.csv gam user "~User" show tagmanagertags "~path"
|
||||
|
||||
$ gam redirect stdout ./tmpermissions.txt multiprocess redirect stderr - multiprocess csv tmaccounts.csv gam user "~User" show tagmanagerpermissions "~path"
|
||||
|
||||
```
|
||||
@@ -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!
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
k
|
||||
# Version and Help
|
||||
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAM 7.10.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.14.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
@@ -15,7 +16,7 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAM 7.10.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.14.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
@@ -27,7 +28,7 @@ Your system time differs from www.googleapis.com by less than 1 second
|
||||
Print the current version of Gam with extended details and SSL information
|
||||
```
|
||||
gam version extended
|
||||
GAM 7.10.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.14.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
@@ -64,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 7.10.04
|
||||
Latest: 7.14.04
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +73,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
7.10.04
|
||||
7.14.04
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -82,7 +83,7 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 7.10.04 - https://github.com/GAM-team/GAM
|
||||
GAM 7.14.04 - https://github.com/GAM-team/GAM
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.5 64-bit final
|
||||
MacOS Sequoia 15.5 x86_64
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
oUpdate History
|
||||
Update History
|
||||
* [GAM Updates](GamUpdates)
|
||||
|
||||
Installation
|
||||
@@ -97,6 +97,7 @@ Client Access
|
||||
* [Domain Shared Contacts](Domain-SharedContacts)
|
||||
* [Email Audit Monitor](Email-Audit-Monitor)
|
||||
* [Find File Owner](Find-File-Owner)
|
||||
* [Global Address List](Global-Address-List)
|
||||
* [Google Data Transfers](Google-Data-Transfers)
|
||||
* [Groups](Groups)
|
||||
* [Groups - Membership](Groups-Membership)
|
||||
@@ -170,6 +171,7 @@ Service Account Access
|
||||
* [Users - Profile Photo](Users-Profile-Photo)
|
||||
* [Users - Shared Drives](Users-Shared-Drives)
|
||||
* [Users - Spreadsheets](Users-Spreadsheets)
|
||||
* [Users - Tag Manager](Users-Tag-Manager)
|
||||
* [Users - Tasks](Users-Tasks)
|
||||
* [Users - YouTube](Users-YouTube)
|
||||
|
||||
|
||||
@@ -994,6 +994,7 @@ gam update project
|
||||
gam oauth create
|
||||
gam info domain
|
||||
gam config customer_id <CustomerID> save
|
||||
gam user user@xxx.com update serviceaccount
|
||||
```
|
||||
|
||||
### New clients
|
||||
@@ -1015,7 +1016,7 @@ gam create project
|
||||
gam oauth create
|
||||
gam info domain
|
||||
gam config customer_id <CustomerID> save
|
||||
gam user user@foo.com check serviceaccount
|
||||
gam user user@foo.com update serviceaccount
|
||||
```
|
||||
|
||||
To get information about a client, select a section.
|
||||
|
||||
Reference in New Issue
Block a user