[gamadv-x] How to get a calendar entry's eventID

2,121 views
Skip to first unread message

Danie de Jager

unread,
Aug 21, 2018, 7:11:05 AM8/21/18
to GAM for G Suite
A user created a repeating calendar entry to all the recipients within our instance of Google which I need to delete for everyone.

I printed the user's calendar to CSV and found the IDs to delete but when I search for the calendar using my own account I can still find them.

1. What is the best way to get the eventID to delete a recurring event?
2. Once I have the ID and deleted the event is it deleted or did it go to Trash and will show up when search for?

Danie de Jager

unread,
Aug 21, 2018, 7:42:16 AM8/21/18
to GAM for G Suite
After running

gam calendar $emailadress deleteevent eventid $eventid doit notifyattendees

I can confirm that the events were not deleted and no notifications sent:

  Calendar: $emailadress, Event: f0raf82boc31m0u3tij9hf0tqc, Deleted
Calendar: $emailadress, Delete 1 Event
  Calendar: $emailadress, Event: rhkq9mfu55ivil7c4s49u3sqes, Deleted
Calendar: $emailadress, Delete 1 Event
  Calendar: $emailadress, Event: 9q8h56goa3fqh1r8qrfn3hbjc8, Deleted
Calendar: $emailadress, Delete 1 Event
  Calendar: $emailadress, Event: 919e8e1epnq2qmqfous4st89jg, Deleted
Calendar: $emailadress, Delete 1 Event
  Calendar: $emailadress, Event: fmmokn5rjs63g8gmmvbsvv5e6c, Deleted
Calendar: $emailadress, Delete 1 Event
  Calendar: $emailadress, Event: 7ki7lk4f2fado2dm85a8jj2tj0, Deleted
Calendar: $emailadress, Delete 1 Event
  Calendar: $emailadress, Event: 7ufhuf1opfuue7n5lu2fpud6qs, Deleted
Calendar: $emailadress, Delete 1 Event
  Calendar: $emailadress, Event: 2jcblu6pq4sd96rhsuihkcjsb4, Deleted
Calendar: $emailadress, Delete 1 Event
  Calendar: $emailadress, Event: 3rcdis2jblr5jfs87nsqv35d0h, Deleted

Danie de Jager

unread,
Aug 21, 2018, 7:44:06 AM8/21/18
to GAM for G Suite
I can still view the entries in my calendar.

Ross Scroggs

unread,
Aug 21, 2018, 10:43:06 AM8/21/18
to google-ap...@googlegroups.com
Danie,

Do: gam calendar $emailaddress info event event f0raf82boc31m0u3tij9hf0tqc

What is the status?

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/d32407f7-2e69-4573-9b98-917a836fd6f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Ross Scroggs

unread,
Aug 21, 2018, 10:52:00 AM8/21/18
to google-ap...@googlegroups.com
Danie,

I don't see any API support for emptying a calendar's trash but you can if logged on as $emailaddress.
Hit the gear icon at the top right, select Trash, delete the events of interest.

Ross
--

Danie de Jager

unread,
Aug 21, 2018, 10:57:37 AM8/21/18
to google-ap...@googlegroups.com
It is "status: cancelled" but everyone she sent the invite still sees the meeting. The people who cancelled the invite sees it as a cancelled meeting. When new users join they automatically get the entry in their calendar. When I search for it I can still find it. It does not seem to want to go away. :-)

W
hat I'll do is create an unique entry and replicate my steps there to see if I'm missing some step in understanding this.

You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/GtxQ9m8BEos/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Ross Scroggs

unread,
Aug 21, 2018, 11:02:51 AM8/21/18
to google-ap...@googlegroups.com
Danie,

Did you empty $emailaddress calendar trash?

Ross


For more options, visit https://groups.google.com/d/optout.


--

Danie de Jager

unread,
Aug 21, 2018, 11:05:13 AM8/21/18
to google-ap...@googlegroups.com

The user left for the day. Will update you tomorrow.


Ross Scroggs

unread,
Aug 21, 2018, 11:07:51 AM8/21/18
to google-ap...@googlegroups.com

Ross Scroggs

unread,
Aug 21, 2018, 2:17:58 PM8/21/18
to google-ap...@googlegroups.com
Danie,

Here is the template of how to permanently delete a list of events.

gam <UserTypeEntity> create calendar summary TempTrash

Note the TempTrash Calendar address

gam <UserTypeEntity> move events primary events <comma separated list of event IDs here> to <TempTrash Calendar address>

gam <UserTypeEntity> remove calendar <TempTrash Calendar address>


Ross
--

Ross Scroggs

unread,
Aug 23, 2018, 11:51:54 PM8/23/18
to google-ap...@googlegroups.com
Danie,

Here's the solution for next time.

4.60.10

When events are deleted from a calendar, they are moved to the calendar's trash and are only permanently deleted (purged) after 30 days.
A user signed in to Google Calendar can empty the calendar trash but there is no direct API support for this operation. Following a suggestion
calendar events. This is achieved by creating a temporary calendar, deleting the events, moving the deleted events to the temporary calendar
and then deleting the temporary calendar.

gam calendar|calendars <CalendarEntity> purge events <EventEntity> [doit] [notifyattendees]
gam <UserTypeEntity> purge events <CalendarManageEntity> <EventEntity> [doit] [notifyattendees]

Commands have been added to empty the calendar trash. This is achieved by creating a temporary calendar,
moving the deleted events to the temporary calendar and then deleting the temporary calendar.

gam calendar|calendars <CalendarEntity> empty calendartrash
gam <UserTypeEntity> empty calendartrash <CalendarEntity>

Ross
Reply all
Reply to author
Forward
0 new messages