Introduction
In this article, you will learn how to automate the deletion of Google Workspace users who have been suspended for 6 months. Managing suspended user accounts can be a tedious task, especially when organizations have a large number of inactive users. Keeping suspended accounts for extended periods may increase security risks, complicate user management, and incur unnecessary user license fees.
Let’s take an example: A company has an internal policy to automatically delete user accounts that have been suspended for 6 months to improve security and keep the system organized. Manually checking and deleting suspended accounts is time-consuming and prone to errors. With the automated user deletion feature in xFanatical Foresight, IT admins can ensure that all users who have been suspended for 6 months or more are automatically removed, saving time and reducing potential security vulnerabilities.
Illustration showcasing how xFanatical Foresight automates the deletion of Google Workspace users suspended for 6 months.
Introducing xFanatical Foresight Automation
xFanatical Foresight is a powerful automation platform designed specifically for Google Workspace. It helps administrators efficiently manage and automate the deletion of Google Workspace users who have been suspended for 6 months. With xFanatical Foresight, admins can save time and effort while ensuring that inactive accounts are removed promptly, enhancing security, reducing clutter, and maintaining compliance with organizational policies.
Automation Setup Instructions
In this section, we guide you through the automation setup in xFanatical Foresight. We have 2 ways to set up automation rules, Set up automation from a template and Set up automation from scratch. After completing the automation rule, verify whether the automation meets your requirements.
Set Up Automation From a Template
Supported plans: xFanatical Foresight Elite plan.
The template is designed with two rules to automate and streamline the process of deleting Google Workspace users who have been suspended for 6 months:
- Rule 1: This rule automatically creates a calendar event in the admin’s Google Calendar, scheduled exactly 6 months after a user is suspended. The event title includes the suspended user’s primary email, and the delay period is configurable based on the organization’s policy.
- Rule 2: This rule automates the deletion of suspended users once the calendar event from Rule 1 starts. This ensures inactive accounts are efficiently removed, maintaining security and compliance without manual intervention.
Rule 1: Auto create user deletion calendar event
- Sign into xFanatical Foresight with your Google Admin account.
- Go to the Templates page.
- Search Auto delete users suspended for 6 months and click on it.
- In the Templates > Auto delete users suspended for 6 months page, click Copy Rule 1.
- For the first time use of the template rule, an dialog Action needed will display requesting necessary permissions required to copy the rule. Click Connect with Google and authorize the permissions.
- Upon authorization, a dialog titled Copy of auto create user deletion calendar event will display.
- Click Next.
- In the Edit actions > Convert datetime screen,
- In the Time change steps field, set the number of months after which you want to delete users who have been suspended.
- Click Review.
- In the Review screen,
- In Rule name, customize the automation rule name.
- Click Create.
- The rule is created in the Rules page.
xFanatical Foresight rule graph for automating the creation of user deletion calendar events in Google Calendar.
Rule 2: Auto delete users suspended for 6 months
- In the Templates > Auto delete users suspended for 6 months page, click Copy Rule 2.
- Click Next. No configuration is required.
- Click Review.
- In the Review screen,
- In Rule name, customize the automation rule name.
- Click Create.
- The rule is created in the Rules page.
xFanatical Foresight rule graph for automating the deletion of users who have been suspended for 6 months in Google Workspace.
Set Up Automation From Scratch
Supported plans: xFanatical Foresight Elite and Professional (Legacy).
Rule 1: Auto create user deletion calendar event
- Sign into xFanatical Foresight with your Google Admin account.
- Go to the Rules page, and click
button.
- In the Select a trigger screen, select User suspended trigger.
- Click Next. No configurations required.
- In the Select an action screen, select the Convert datetime action.
- In the Edit actions > Convert datetime screen,
- In the Source datetime field, select the Current datetime variable from the dropdown.
- In the Time change steps field, set the number of days in advance you want the calendar event to be created.
- In the Variable name field, enter the name for the variable.
- Click on Add next action.
- In the Select an action screen, select the Create calendar event action.
- In the Edit actions > Create calendar event screen,
- In the Calendar field, select the Primary calendar variable from the dropdown.
- In the Event title field, enter the event title according to your requirement.
- In the Start time field, select the User deletion time variable from Convert datetime action.
- Click Review.
- In the Review screen,
- In Rule name, customize the automation rule name.
- Click Create.
- The rule is created in the Rules page.
xFanatical Foresight rule graph for automating the creation of user deletion calendar events in Google Calendar.
Rule 2: Auto delete users suspended for 6 months
Next, configure a second rule to automatically delete the users who have been suspended for 6 months.
- Click the New Rule
button.
- In the Select a trigger screen, select the Calendar event started trigger.
- In the Edit trigger > Calendar event started trigger screen,
- In the Calendars field, select the Primary calendar variable from the dropdown.
- In the Event title field, enter the calendar event title keywords. This must match with part of Rule 1‘s calendar event title.
- Click Next.
- In the Select an action screen, select the Get calendar event info action.
- In the Edit actions > Get calendar event info action screen,
- In the Calendar field, select the Calendar id variable from the Calendar event started trigger.
- In the Event field, select the Calendar event id variable from the Calendar event started trigger.
- Click Add next action.
- In the Select an action screen, select the Extract data from text action.
- In the Edit actions > Extract data from text action screen,
- In the Source text field, select the Event title variable from the Get calendar event info trigger.
- In the Data type to extract field, select the EMAIL variable from the dropdown.
- In the Variable name field, enter a descriptive name for the variable.
- Click Add next action.
- In the Select an action screen, select the Delete user action.
- In the Edit actions > Delete user action screen,
- In Primary email, select the Variable from the Extract data from text action.
- Click Review.
- In the Review screen,
- In Rule name, enter a rule name.
- Click Create.
- The automation rule is created.
xFanatical Foresight rule graph for automating the deletion of users who have been suspended for 6 months in Google Workspace.
Verify Automation
To ensure that your rule setup automates as expected, it’s essential to conduct a simple test. The following instructions demonstrate how xFanatical Foresight automates the deletion of Google Workspace users suspended for 6 months, ensuring streamlined account management and compliance.
Note: For demonstration purposes, set the Time Change Steps field in the Convert datetime action of Rule 1 to 15 minutes instead of 6 months to see the automation in action sooner.
- Sign in to your Google Admin Console.
- Suspend the user to trigger Rule 1 in xFanatical Foresight. Learn more about suspending a user in Google Admin.
- Go to the Rules page.
- Wait for the notification in the top-right corner indicating that Rule 1 has been executed. In the notification message, click View log.
- In the Logs > Log details page, the Rule history section explains the automation history and confirms the results of Rule 1.
- Go to your Google Calendar, and verify that the calendar event was successfully created as a result of Rule 1.
- Wait until the calendar event’s time.
- Once the scheduled calendar event begins, Rule 2 will automatically trigger.
- Wait for the notification in the top-right corner confirming the execution of Rule 2. In the notification message, click View log.
- In the Logs > Log details page, the Rule history section explains the automation history and confirms the results of Rule 2.
- Verify that the suspended user has been successfully deleted in the Google Admin Console.
Notes
- Once the automation rule is established, xFanatical Foresight will begin monitoring for newly suspended users. Only users who are newly suspended will trigger Rule 1, and their accounts will be automatically deleted based on the configured schedule.
- Before suspending a user, ensure that any critical data associated with the user accounts has been backed up or transferred.
- Once deleted, user data is retained in the Recently deleted users section for 20 days, during which recovery is possible. Learn more about restoring users from Google’s support.
- At each time a rule is executed, you will receive a notification in the app telling you how it has happened to your rules and whether rules executed successfully or not.
- The event title in Rule 2's trigger must match with a part of the Rule 1's calendar event title. Otherwise, Rule 2 cannot find the event and trigger the automation.
- To cancel or reschedule the auto deletion for particular users, simply move the calendar events created by the Rule 1.
Conclusion
In conclusion, automating the deletion of Google Workspace users who have been suspended for six months with xFanatical Foresight helps organizations maintain a clean and compliant user directory. By eliminating inactive accounts, admins can enhance security, reduce unnecessary license costs, and streamline user management. This automation ensures efficiency and consistency, allowing IT teams to focus on more critical tasks while keeping the workspace organized.
Try a 14-day free trial with xFanatical Foresight and manage your tasks.
Related Articles
For more article please visit our website: Articles