List Shared Drive Members
Definition
The List Shared Drive Members action retrieves a list of members with access to a specified Shared Drive in Google Drive. It provides details such as user names, email addresses, roles, and permissions. This action helps in monitoring and managing Shared Drive access efficiently.
Example Use Cases
-
Audit Shared Drive Access
Retrieve a list of all users with access to a specific Shared Drive to ensure proper access control. -
Identify Unauthorized Users
Check if any unauthorized users have access to a Shared Drive and take necessary actions. -
Manage Drive Permissions
Get a list of users and their roles to update or revoke permissions as needed. -
Generate Access Reports
Automate reporting on Shared Drive memberships for compliance and security reviews.
Inputs
-
Connection
The connection to your Google Drive account. This field allows the action to authenticate and interact with your Google Drive.
Requirement: A valid Google Drive connection that is authorized with the necessary permissions.
-
Drive Id
The unique identifier for the Shared Drive you want to list members from. This ID is necessary to specify which Shared Drive the action will interact with.
How to Find: You can find the Shared Drive ID from the URL of the drive (e.g., "https://drive.google.com/drive/u/0/shared-drives/[SharedDriveID]").
-
Execute as Domain Admin
If set to
true
, the request is executed as a domain administrator. This allows access to all drives where the requester is a domain administrator.Purpose: Helps to manage permissions at the domain level, giving the user more control.
-
Max Results
Specifies the maximum number of members to return in the results.
Range: Must be between 1 and 20,000. This setting helps control the number of results and improves the performance of the query.
-
Page Token
Used to fetch the next page of data when there are more members than the specified "Max Results."
Purpose: Helps paginate large datasets by using the token from previous results to continue fetching data from where the last request ended.
Outputs
-
Result Count
The number of shared drive members returned in this result.
Purpose: Indicates how many members are included in the current set of results. If the
Next Page Token
is not empty, it suggests that more members are available on subsequent pages. -
Members Collection
A collection of objects that contains details about each member in the shared drive. Each object includes the following fields:
- Id: A unique identifier for the member (e.g., user ID or group ID).
- Display Name: The full name of the user or the group, depending on the member type.
- Type: The type of grantee (valid values:
user
,group
,domain
,anyone
). - Email Address: The email address associated with the member (user or group).
- Domain: The domain associated with the member. It refers to the specific level of access, such as owner, organizer, file organizer, writer, commenter, or reader.
- Role: The role assigned to the member (e.g.,
Manager
,Writer
,Commenter
). - Deleted: Indicates if the account associated with the member has been deleted (relevant only for user and group permissions).
-
Next Page Token
A token that indicates the presence of additional pages of members.
Purpose: If the result set is too large to return all at once, the token allows for fetching additional pages of members. If there are no more pages, the token will be absent.
These outputs help to manage the members of the shared drive efficiently and track pagination when handling large datasets.
Example of Using
Scenario:
You are the administrator of a shared drive that contains project-related documents for your team. You need to check the list of all members who have access to the shared drive, ensure that the permissions are correctly set for each member, and verify that no deleted accounts are still listed.
Step-by-Step Guide:
-
Connection Setup:
You first need to connect your Google Drive account using the Connection field. Ensure that you're logged in with an account that has administrative privileges for the shared drive. -
Enter Shared Drive ID:
Input the Drive Id of the shared drive you want to check. This ID can be found in the URL of your Google Drive, following the structurehttps://drive.google.com/drive/u/0/shared-drives/{DriveID}
. -
Set "Execute as Domain Admin":
Choose whether to issue the request as a domain administrator by selecting Execute as Domain Admin. If set totrue
, the action will list members across all drives where you are an admin, not just the specific one. -
Configure Pagination:
Set Max Results to define how many members you want to retrieve in one request (e.g., 100). If the number of members exceeds this limit, pagination will be used. If you want to see more than 100 members, leave Page Token empty for the first call. For subsequent requests, input the Next Page Token from the previous response to continue fetching members. -
Run the Action:
After configuring the input fields, run the action to retrieve the members of the shared drive. -
Review the Results:
The output will provide details of each member, such as their role (e.g.,Manager
,Writer
), email address, domain, and whether their account has been deleted. Use this information to ensure that all members are correctly listed and have the right permissions. -
Pagination Handling:
If the result includes a Next Page Token, run the action again with that token to retrieve additional members.
By following these steps, you can efficiently review and manage the members of your shared drive, ensuring that all team members have the correct access and that any removed accounts are no longer listed.
Updated 6 days ago