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
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:
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)
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.
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.
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!
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.
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.
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.
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
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?