Categories
Work Better with Google Workspace

Learn how to manage orphaned events

Learn what to do if you’ve deleted a user from Google Workspace but the event (or events!) that they created remain active on other people’s calendars.

In this scenario Harriet  has recently resigned, and so I’ve deleted her account but for some reason I didn’t transfer any of her data before I deleted her account. And now I’ve got people like Mickey complaining that they’re still seeing events that she organised on their calendar

Screenshot of an event Harriet created and is now on Mickey calendar
Watch the video version, or keep reading if that’s your preference!

So there’s actually two solutions here.

Solution 1: User deletes the event(s)

The first one (and probably the easiest) is to ask everyone to just delete the event from their calendar. And in fact, if people external to your organisation have been invited to this event, that’s what they’ll need to do – manually delete the event. This is also the only option if you use Google Workspace Business Starter.

Solution 2: Administrator deletes events using Google Calendar API

The second option is to use the Calendar API – which is basically a way for you to ‘talk’ to the backend of Google Calendar. To use this option you need to have two browser tabs open:

Admin Console

Developer API

Step 1: Find the events in Admin Console

Then, in your Admin Console go to Reporting / Audit and Investigation / Calendar Log Events (click here for a direct link)

Path to calendar log in Admin console

Click Add a filter and select Actor.

Then type in the email address of the person who organised the event, and whose account you’ve deleted. In this case, it’s Harriet.

Selecting Harriet as the organiser 1

Now I’m not sure just how many events she’d created so I’m going to add another filter – this one is Event.

Then click on the drop down arrow, scroll down and click on Event Created.

Filter for created events

Then click on Search.

You’ll now see all the events that this person has created including everyone that has been invited to that event. This is going to be important very soon! 

List of events

Step 2: Export the list of events

Click on Export All, give the document an name and select Google sheets for export.

Then click on Export.

Export the events

Scroll down the page and click on the Export title – the Google sheet will open in a new tab. 

Step 3: Use the API to delete the event

Now copy the calendarID from the first row and go to the Developer API tab.

In the right hand side of the window click on ‘Try it’ and paste the calendarID into the calendarID field.

Go back to the Google Sheet, copy the event ID and paste that into the eventID field.

Scroll down and click on Execute

Execute API

You’ll probably be asked to give permission to Google to change this, say yes to everything.

You’ll then see a green box titled 204 which indicates that the event has been deleted from that particular calendar.

success

You can check this by going back to the admin tab and amending your previous search. 

Clear the filters and this time search for:

Filter: Event is deleted.

Filter EventID and paste the EventID.

Then click on Search

Checked deletion

You’ll see that the event has been deleted from that particular calendarID.

Step ??: Rinse and repeat

Now, if there’s more than one guest you’ll need to repeat the API steps for each calendarID associated with that event. And if there’s more than one event you’ll need to do these steps for every guest associated with that event!

Have fun, and I hope this article was of use to you if you’re trying to manage orphan events after deleting a user from Google Workspace


Want more personalised help?

I hope this article was of assistance to you, but if you want more personalised help with your Google Workspace issue then why not get in touch?

Leave a Reply

Your email address will not be published. Required fields are marked *