List Recently Deleted Users
Definition
The "List Recently Deleted Users" action allows administrators to retrieve a list of users who have been deleted from the Google Directory in the past 20 days. This action helps administrators track user deletions and manage potential errors, recovery processes, or auditing activities related to account removals. The action provides a snapshot of user deletions, ensuring the admin is aware of the users who have been removed, and enables them to handle any further operations such as account recovery or investigation.
Key Capabilities:
- Retrieve a list of deleted users within the last 20 days.
- Filter and paginate through the list based on the maximum number of results.
- Track the number of deleted users and retrieve more results if necessary using pagination tokens.
- Essential for account management, auditing, and restoring deleted users where needed.
Example Use Cases
1. User Recovery Auditing
Administrators can use this action to review a list of recently deleted users within a specific period (up to 20 days). This helps in auditing deletion activities and ensuring that no unintended deletions occurred.
2. User Account Restoration
If an account was accidentally deleted, this action helps administrators identify the deleted users and potentially restore them by accessing their information and taking necessary steps in the Google Admin console.
3. Compliance and Security Auditing
For compliance and security reasons, administrators can regularly check for deleted users and ensure all deletions align with organizational policies. This helps maintain a record of user deletion activities and can be important for internal audits.
4. Reporting Deleted Users for HR or IT Coordination
HR or IT departments can use this action to gather a list of users who were deleted over the past 20 days. This could be useful for reviewing employee departures or coordinating with other departments about account management.
5. Managing User Quotas and Licenses
Administrators can track deleted users to determine if licenses or quotas were being utilized efficiently. If a user was mistakenly deleted, this action can help verify that resources are being correctly freed up.
Inputs
-
Connection
This field represents the connection that links the action to your Google Directory. It is required to authenticate and establish a link between the service performing the action and the Google Directory system. Essentially, this connects your instance to Google Admin services to access and retrieve data. -
Customer Id
This is a unique identifier for the customer within the Google Admin console. It helps the action retrieve the correct set of user data for the specified customer account. If you're working with a multi-domain account, theCustomer Id
allows you to target the correct customer under the umbrella of your organization's domains. Example:C00000000
Note: You can also use the aliasmy_customer
to represent your current account'sCustomer Id
. -
Max Results
This field allows you to define the maximum number of user records to retrieve in a single query. The maximum allowed value for this field is 10,000. If the number of deleted users exceeds the set limit, pagination is used to fetch the next set of records. Example: If you set the value to 1000, it will return up to 1000 deleted users in one call. -
Next Page Token
TheNext Page Token
is a token provided by the Google Admin API when the list of results spans multiple pages. If the result set exceeds theMax Results
limit, this token will be used to fetch the next set of data (i.e., the next page of results). If there are no more results to fetch, this token will be empty. Example: If the previous request returned more users than the specifiedMax Results
, the next page can be fetched by using the token from the previous response. Note: If not specified, the first page of results will be returned by default.
Outputs
-
Number of Users
This field provides the total number of deleted users that have been retrieved in the result. It reflects how many users were found that were deleted within the last 20 days, based on the query parameters you provided (such asCustomer Id
,Max Results
, etc.). Example:Number of users: 50
– This would mean that there were 50 deleted users in the specified range of time. -
Users
This field contains a list of user objects that represent the individual users who were deleted. Each user object includes detailed information about the deleted user, such as theiruserId
,email
, and other relevant properties, including when the account was deleted, and any associated metadata about the deletion. -
Next Page Token
If there are more results than theMax Results
field allows (for example, more than 10,000 results), this token will allow you to fetch the next page of results. The token ensures you can paginate through large sets of data to retrieve all the deleted users. If there are no more pages, this token will be empty. Example:"nextPageToken": "abc123xyz456"
If there are additional deleted users beyond the initial page of results, this token is used to fetch the next set. If the list is exhausted, the token will be empty.
Example of Using
Scenario: A company wants to ensure that all deleted users in the last 20 days have been properly reviewed and archived before being permanently removed from the Google Workspace system. The administrator is tasked with retrieving a list of recently deleted users to confirm if any important accounts were mistakenly deleted and require restoration.
Steps:
-
Administrator Initiates the Action: The system administrator, logged into the management platform, enters the
Customer Id
for the organization (e.g.,C00000001
) and sets aMax Results
value of100
to retrieve up to 100 deleted users from the past 20 days. -
Retrieve Data: The action is executed, and the administrator receives a list of deleted users, including their user IDs, primary email addresses, and the exact time they were deleted.
-
Review Results: The system administrator reviews the data, identifying that a few important users have been mistakenly deleted and need to be restored.
-
Paginate If Needed: If the number of deleted users exceeds 100, the action provides a
Next Page Token
. The administrator uses this token to fetch the next set of results, ensuring all recently deleted users are accounted for.
Outcome: The administrator is able to ensure no critical accounts were lost and can take action, such as restoring users or investigating further, based on the retrieved information.
Updated about 8 hours ago