-
Notifications
You must be signed in to change notification settings - Fork 473
l CalendarExamples
- Modifying and Viewing Calendar Access Control Lists (ACLs)
- Viewing and Modifying a User's List of Calendars
- Deleting Events for a Calendar
- Wiping a User's Primary Calendar
GAM now supports Google Calendar Management with the ability to modify Access Control Lists (ACLs) for calendars and to add, list and remove calendars from a users Google Calendar display. GAM can work with user primary and secondary calendars as well as resource calendars.
All Google Calendars have an email address associated with them. All users who have the Calendar service enabled have a primary calendar identified by their email address. Secondary calendars created by or for the user have a special calendar email address which can be learned with the gam user <username> show calendars
command. Resource Calendars also have a special email address that can be learned with the gam print resources
command.
gam calendar <calendar email> showacl|printacl
Shows the ACLs for the given calendar (showacl) or prints CSV output of the ACLs (printacl). The ACL list will show who has access to the calendar and what level of access they have.
This example displays the Calendar ACLs for [email protected]
gam calendar [email protected] showacl
gam calendar <calendar email> add freebusy|read|editor|owner <user email> [sendnotifications true|false]
Gives user email the desired level of access to the given calendar by adding the user to the ACL. freebusy allows the user to see only times whe n the calendar is busy without showing event details. read gives the user rights to view but not edit the calendar. editor gives read/write access to the calendar but not ACL or settings modification rights. owner gives the user full access to the calendar with the ability to modify the ACL and calendar settings.
Use the optional sendnotifications flag to choose whether to send notifications about the calendar sharing change or not. The default is True.
Note: The special users domain and default cannot be added to a calendar, they can only be updated or deleted by GAM (see below)
Note: giving a user rights to another calendar adds that calendar to their list of calendars automatically. A separate command to add the calendar should not be necessary. Update: this no longer seems to happen as of early 2020. You'll need to add the calendar to the user's list of calendar's separately.
This example gives Bob editor access to Joe's primary calendar.
gam calendar [email protected] add editor [email protected]
gam calendar <calendar email> update freebusy|read|editor|owner <user email>
Update the given user's rights to the given calendar. The user should already have explicit access to the calendar. This command will upgrade (or downgrade) the user's access to the desired level of freebusy, read, editor or owner.
Note: the special users domain and default can be used instead of an actual user email address to modify public sharing of the calendar. domain applies to all users in the Google Apps organization. default applies to anyone with a Google account (even @gmail.com) and is limited to read or freebusy. Note that your Calendar control panel settings may prevent read sharing of calendars outside the domain in which case you'll get an error trying to set default to read.
This example upgrades Bob to be owner of Joe's Calendar:
gam calendar [email protected] update owner [email protected]
This example allows anyone with an account in your domain to edit the given resource calendar (including delete others appointments!).
gam calendar example.com_436d6e646572656e6365526f6f6d732d3239352d3372642d5164616d536d6974682d38@resource.calendar.google.com update editor domain
This example allows anyone with a Google account to view Bob's calendar
gam calendar [email protected] update read default
gam calendar <calendar email> delete [user <user email>] [id <ACL id>]
Removes user email rights to the given calendar. Note that the user may still have some level of rights (freebusy or read) to the calendar based on the default level of access to calendars set within the domain. Specifying the ACL by ID is also supported and takes the id column of the printacl command
Note: deleting the domain and default users disables public sharing of your calendar. domain applies to everyone in your Google Apps domain while default applies to everyone with a Google Account.
This example removes Bob's direct rights to Joe's calendar
gam calendar [email protected] delete user [email protected]
These two examples remove all public sharing of Bob's calendar. Only those with explicit rights will be able to see anything (including freebusy):
gam calendar [email protected] delete user domain
gam calendar [email protected] delete user default
gam user <user>|group <group>|ou <ou>|all users info calendar <calendar email>
Displays the details of the users' specific Calendar.
This example displays a specific calendar that Bob has added to his Google Calendar app
gam user [email protected] info calendar [email protected]
User: [email protected]'s Calendar:
Calendar: test
ID: [email protected]
Access Level: root
Timezone: America/New_York
Hidden: false
Selected: true
Color: #2952A3
gam user <user>|group <group>|ou <ou>|all users show calendars
Displays the details of all of the Calendars the user has listed in their Google Calendar.
This example lists the calendars that Bob has added to his Google Calendar app
gam user [email protected] show calendars
User: [email protected]'s Calendars
Calendar: [email protected]
ID: [email protected]
Access Level: owner
Timezone: America/New_York
Hidden: false
Selected: false
Color: #2F6309
Calendar: test
ID: [email protected]
Access Level: root
Timezone: America/New_York
Hidden: false
Selected: true
Color: #2952A3
Calendar: Canadian Holidays
ID: en.canadian#[email protected]
Access Level: read
Timezone: America/New_York
Hidden: false
Selected: true
Color: #2952A3
gam user <user>|group <group>|ou <ou>|all users print calendars [todrive]
Display or upload to Google Drive a CSV report of all of the users' calendars. The optional todrive
parameter specifies that the results should be uploaded to Google Drive rather than being displayed on screen or piped to a CSV text file.
This example lists the calendars that all users have specified in the Calendar app.
gam all users print calendars
gam user <user>|group <group>|ou <ou>|all users delete calendar <calendar email>
Removes the given calendar from each of the users' list of calendars. Deleting a calendar from a user's calendar list does not change ACLs on the calendar, it simply removes it from the display.
This example removes Joe's calendar from Bob's display of calendars.
gam user [email protected] delete calendar [email protected]
gam user <user>|group <group>|ou <ou>|all users add calendar <calendar email> [selected true|false] [hidden true|false] [reminder email|sms|popup <minutes>] [notification email|sms eventcreation|eventchange|eventcancellation|eventresponse|agenda] [summary <summary>] [colorindex <1-24>] [backgroundcolor <htmlcolor>] [foregroundcolor <htmlcolor>]
Adds the given calendar to each of the users' list of calendars. Adding a calendar to a user's calendar list does not give them any rights to the calendar that they didn't have before. If the user does not have rights to the calendar, use the ACL command above to both grant them rights and add the calendar to their list of calendars.
The optional argument selected
determines if the calendar is selected in the user's list of subscribed calendars by default. The optional argument hidden
determines if the calendar is hidden from the user's list of subscribed calendars. The optional argument reminder
sets the default reminder type and time for calendar events and can be repeated. The optional argument notification
sets the default notification type for calendar events and can be repeated. The optional argument summary
overrides the calendar's default name. The optional argument colorindex
sets the calendar entries colors. Index colors can be viewed here. The optional arguments backgroundcolor
and foregroundcolor
manually set the calendars colors.
The following example adds Bob's calendar to Joe's list of calendars without it being selected in Joe's calendar display.
gam user [email protected] add calendar [email protected] selected false
gam user <user>|group <group>|ou <ou>|all users update calendar <calendar email> [selected true|false] [hidden true|false] [reminder (email|sms|popup <minutes>)|clear] [notification (email|sms eventcreation|eventchange|eventcancellation|eventresponse|agenda)|clear] [summary <summary>] [colorindex <1-24>] [backgroundcolor <htmlcolor>] [foregroundcolor <htmlcolor>]
Update how a given calendar is displayed in a user's list of calendars. The optional argument selected
determines if the calendar is selected in the user's list of subscribed calendars by default. The optional argument hidden
determines if the calendar is hidden from the user's list of subscribed calendars. The optional argument reminder
sets the default reminder type and time for calendar events and can be repeated. The argument reminder clear
clears all reminders from the calendar. The optional argument notification
sets the default notification type for calendar events and can be repeated. The argument notification clear
clears all notifications from the calendar. The optional argument summary
overrides the calendar's default name. The optional argument colorindex
sets the calendar entries colors. Index colors can be viewed here. The optional arguments backgroundcolor
and foregroundcolor
manually set the calendars colors.
The following example updates Bob's view of Joe's calendars, changing the color to green.
gam user [email protected] update calendar [email protected] colorindex 9
gam calendar <email> deleteevent [eventid <id>] [query <query>] [notifyattendees] [doit]
Delete event(s) off the given calendar. You should specify either the single event ID with the eventid argument or a query to perform against the calendar to determine which events should be deleted. Query operates in a similar fashion to Calendar UIs search but you should test results carefully, a bad query can delete more events than you intended. The optional argument notifyattendees will send event attendees an email notification that the event is cancelled, removed. Because this command involves deletion of user data, GAM will not perform the action by default unless the doit argument is supplied.
gam calendar <user email> wipe
Wipe all data from a user's primary calendar. WARNING: This will delete all user events and there is no way to recover them! Email address must be a Google Apps user. It's not possible to wipe resource or secondary calendars.
The following example deletes all data for Joe's Calendar.
gam calendar [email protected] wipe
Need more help? Ask on the GAM Discussion Group
Update History
Installation
- How to Install GAM7
- How to Upgrade GAMADV-XTD3 to GAM7
- How to Upgrade Legacy GAM to GAM7
- How to Update GAM7
- Install GAM as Python Library
- GAM7 on Chrome OS Devices
- GAM7 on Android Devices
- Google Network Addresses
- HTTPS Proxy
- SSL Root CA Certificates
- How to Uninstall GAM7
Configuration
- Authorization
- GAM Configuration
- Running GAM7 securely on a Google Compute Engine
- Using GAM7 with a delegated admin service account
- Using GAM7 with a YubiKey
Notes and Information
- Upgrade Benefits
- Questions? Visit the GAM Discussion Forum
- GAM Public Chat Room
- Scripts
- Other Resources
- Drive REST API v3
- BNF Syntax
- GAM Return Codes
- Python Regular Expressions
- Rclone
Definitions
Command Processing
- Bulk Processing
- Command Line Parsing
- Command Logging and Progress
- Command data from Google Docs/Sheets/Storage
- CSV Special Characters
- CSV Input Filtering
- CSV Output Filtering
- Meta Commands and File Redirection
- Permission matches
- Tag Replace
- Todrive
Collections
Client Access
- Addresses
- Administrators
- Alert Center
- Aliases
- Calendars
- Calendars - Access
- Calendars - Events
- Chrome Auto Update Expiration Counts
- Chrome Browser Cloud Management
- Chrome Device Needs Attention Counts
- Chrome Installed Apps
- Chrome Policies
- Chrome Printers
- Chrome Profile Management
- Chrome Version Counts
- Chrome Version History
- ChromeOS Devices
- Classroom - Courses
- Classroom - Guardians
- Classroom - Invitations
- Classroom - Membership
- Cloud Channel
- Cloud Identity Devices
- Cloud Identity Groups
- Cloud Identity Groups - Membership
- Cloud Identity Policies
- Cloud Storage
- Context Aware Access Levels
- Customer
- Domains
- Domains - Verification
- Domain People - Contacts & Profiles
- Domain Shared Contacts - Global Address List
- Email Audit Monitor
- Find File Owner
- Google Data Transfers
- Groups
- Groups - Membership
- Inbound SSO
- Licenses
- Mobile Devices
- Organizational Units
- Reports
- Reseller
- Resources
- Send Email
- Schemas
- Shared Drives
- Sites
- Users
- Unmanaged Accounts
- Users - Signout and Turn off 2-Step Verification
- Vault - Takeout
- Version and Help
Special Service Account Access
Service Account Access
- Users - Analytics Admin
- Users - Application Specific Passwords
- Users - Backup Verification Codes
- Users - Calendars
- Users - Calendars - Access
- Users - Calendars - Events
- Users - Chat
- Users - Classification Labels
- Users - Classroom - Profile
- Users - Deprovision
- Users - Contacts
- Users - Contacts - Delegates
- Users - Drive - File Selection
- Users - Drive - Activity/Settings
- Users - Drive - Cleanup
- Users - Drive - Comments
- Users - Drive - Copy/Move
- Users - Drive - Files-Display
- Users - Drive - Files-Manage
- Users - Drive - Orphans
- Users - Drive - Ownership
- Users - Drive - Permissions
- Users - Drive - Query
- Users - Drive - Revisions
- Users - Drive - Shortcuts
- Users - Drive - Transfer
- Users - Forms
- Users - Gmail - Client Side Encryption
- Users - Gmail - Delegates
- Users - Gmail - Filters
- Users - Gmail - Forwarding
- Users - Gmail - Labels
- Users - Gmail - Messages/Threads
- Users - Gmail - Profile
- Users - Gmail - S/MIME
- Users - Gmail - SendAs/Signature/Vacation
- Users - Gmail - Settings
- Users - Group Membership
- Users - Keep
- Users - Looker Studio
- Users - Meet
- Users - Classroom - Profile
- Users - People - Contacts & Profiles
- Users - Photo
- Users - Profile Sharing
- Users - Shared Drives
- Users - Spreadsheets
- Users - Tasks
- Users - Tokens
- Users - YouTube
GAM Tutorials
- Account Auditing
- Calendar Settings
- Chat Bot commands
- Chrome Browser Management
- Chrome Policy Settings
- Context Aware Access levels
- Data Transfers
- Domain Verification
- Google Drive Management
- Group Settings
- Inbound SSO Settings
- Managing Admins
- Managing Classroom
- Managing Custom User Schemas
- Managing Devices
- Managing Organizations
- Managing Product Licenses
- Managing Users, Groups, Aliases, Domains, Mobile and Chrome Devices, and Resource Calendars
- OAuth Authentication Related Commands
- Print Users, Groups, Aliases, Mobile and Chrome OS devices, OUs, Licenses and Reports
- Printers
- Unmanaged Users and Invitations
- User Email Settings
- User Security Settings