List User's Shared Drives

Definition

The "List User's Shared Drives" action in the Google Workspace category retrieves a list of shared drives that a specified user has access to within your domain. This includes shared drives the user is a member of, or drives they can access as a result of domain-level or group sharing settings. The action provides detailed metadata for each drive, such as sharing configuration, visibility, and associated users or domains.

This action is particularly useful for IT administrators, compliance officers, or automation flows that need to audit or report on shared drive access for individual users. It also supports domain-level execution when enabled, allowing you to query all relevant drives accessible by a domain admin across the organization.

Key capabilities include:

  • Listing shared drives for a specific user or across the domain (when executed as a domain admin).
  • Filtering results using advanced query parameters.
  • Paginating large sets of shared drive results for scalable audits.
  • Providing metadata such as who the drive is shared with, how it’s shared, and organizational context.


Example Use Cases:


Access Audit

Quickly review all shared drives a user has access to, helping IT teams ensure appropriate permissions and data security.

Compliance Reporting

Generate reports on shared drive memberships for compliance audits or internal policy enforcement.

Offboarding Automation

Automate the process of identifying all shared drives a departing employee has access to, ensuring proper access revocation.

Domain-wide Drive Management

For domain administrators, monitor shared drives across the organization to manage sharing settings and identify potential security risks.

User Support and Troubleshooting

Help support teams verify which shared drives a user can access when addressing access-related issues.


Input field of the "List User's Shared Drives" action:


Connection

This field requires a Google Workspace Administration connection. It uses credentials from a service account with domain-wide delegation, enabling the action to securely query shared drive data within your Google Workspace domain.

User Email

Enter the primary email address of the user whose shared drives you want to list. This is the main email the user uses to sign in to Google Workspace, ensuring the action targets the correct account.

Execute as Domain Admin

Set this to true to run the action with domain administrator privileges. This enables access to all shared drives where the requester has admin rights, expanding visibility beyond the user’s personal drives.

Query

(Optional) Provide a query string to filter the shared drives returned. You can use search operators to narrow down results based on criteria such as drive name or sharing properties. For more info and examples, see Google’s Shared Drives search guide.

Max Results

Specify the maximum number of shared drives to return in the response. The value must be between 1 and 20,000. Limiting results helps manage performance and pagination.

Page Token

If the number of shared drives exceeds the Max Results limit, use this token to retrieve subsequent pages of results. Leave empty to fetch the first page.


Outputs:


Result Count

Indicates the total number of shared drives returned in the current response. This helps you understand the volume of data retrieved and whether additional pages of results exist.

Drives

A detailed list of shared drives accessible by the specified user. Each drive item includes:

  • Id: The unique identifier of the shared drive, used for referencing or further API operations.
  • Name: The display name of the shared drive, helping you quickly identify it.
  • Hidden: A boolean value indicating if the drive is hidden from standard views.
  • Created Time: Timestamp showing when the shared drive was created, useful for auditing or sorting.
  • Org Unit Id: The organizational unit within your domain that the drive belongs to, aiding in governance and access management.
  • Sharing Type: Describes how the drive is shared (e.g., internally within the domain or externally), providing insight into data exposure.
  • Shared to Domain: Lists any external domains the drive is shared with, highlighting external collaboration.
  • Shared to Email Address: Shows specific external email addresses with whom the drive is shared, helping track precise access.

Next Page Token

If the full set of shared drives exceeds the current page’s limit, this token is provided to retrieve the next batch of results. Use this to paginate through large result sets.


This output structure gives admins and users comprehensive visibility into a user’s shared drive landscape, supporting security reviews, compliance checks, and access audits.

Example Scenario: Auditing a User’s Shared Drives for Security Review

Imagine you are a Google Workspace admin responsible for ensuring data security and compliance within your organization. You need to review all the shared drives that a particular employee has access to, especially those shared externally outside your company domain. This helps you identify any potential data exposure risks and verify appropriate sharing settings.

How to set it up:

  1. Connection: First, configure the Google Workspace Administration connection with the appropriate service account credentials to allow admin-level access.

  2. User Email: Enter the employee’s primary email address whose shared drives you want to audit (e.g., [email protected]).

  3. Execute as Domain Admin: Set this to true to ensure you retrieve all shared drives accessible by this user, including those where you have domain-wide administrative privileges.

  4. Query: Optionally, you can use query filters to narrow down results, for example, only drives shared externally or created after a specific date.

  5. Max Results: Define how many drives you want to retrieve per call, say 100, to manage response size.

  6. Page Token: Leave empty initially; if results exceed the max results, use this token to paginate through the remaining drives.

When the flow runs, it returns a comprehensive list of shared drives the user has access to, including details about external sharing and creation times. You can then analyze this data to ensure compliance, adjust sharing permissions if necessary, or export the information for reporting purposes.