-
Notifications
You must be signed in to change notification settings - Fork 473
CalendarExamples
(TODO: Add table of contents.)
Comments have been turned off for these help pages, please post your questions and comments to the Mailing List
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
Prints the ACLs for the given calendar. 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>
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.
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.
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 Bog 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>
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.
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> show calendars
Lists 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
[email protected]'s Calendar List
Name: [email protected]
ID: [email protected]
Access Level: owner
Timezone: America/New_York
Hidden: false
Selected: false
Color: #2F6309
Name: test
ID: [email protected]
m
Access Level: root
Timezone: America/New_York
Hidden: false
Selected: true
Color: #2952A3
Name: 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 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] [color #XXXXXX]
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 color determine's the HTML color of the calendar. Color must be one of the HTML codes listed in the Google Calendar API reference page.
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] [color #XXXXXX]
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 color determine's the HTML color of the calendar. Color must be one of the HTML codes listed in the Google Calendar API reference page.
The following example updates Bob's view of Joe's calendars, changing the color to green.
gam user [email protected] update calendar [email protected] color #0D7813
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.
Note: You cannot use an anonymous OAuth client ID and secret with this command. You'll need to follow the OAuth console key instructions except that instead of turning on the Groups Settings API, the Google Calendar API should be turned on (which does not require a request and manual Google approval).
Note: If you used a version of GAM earlier than 2.51 to create the OAuth authorization you are using (oauth.txt), you'll need to re-authorize since the wipe command requires an additional scope. If you're seeing 403 Forbidden errors, this is probably the reason why. Just run gam oauth revoke and then re-run the wipe command to re-authorize.
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
- 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 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
- Managing Users, Groups, Aliases, Domains, Mobile and Chrome Devices, and Resource Calendars
- Group Settings
- Data Transfers
- Print Users, Groups, Aliases, Mobile and Chrome OS devices, OUs, Licenses and Reports
- Managing Custom User Schemas
- User Email Settings
- User Security Settings
- Managing Classroom
- Managing Devices
- Chrome Policy Settings
- Chrome Browser Management
- Calendar Settings
- Unmanaged Users and Invitations
- Google Drive Management
- Inbound SSO Settings
- Managing Admins
- Domain Verification
- Printers