Manage sharing & permissions
manage_permissionsControl who can access a Google Drive file by listing current permissions, granting or updating access for users, groups, domains, or link sharing, and revoking access when needed.
Instructions
Manages who can access a file. action=list shows the grants (id, type, role, emailAddress/domain, expirationTime, pendingOwner). action=share grants access: type=user/group (needs email_address), domain (needs domain), or anyone (link sharing; allow_file_discovery=true also makes it searchable); role=reader, commenter, writer, fileOrganizer/organizer (shared drives only) or owner. Sharing with a user emails them by default — send_notification_email=false suppresses it (not allowed for ownership transfers); email_message adds a note. action=update changes an existing grant's role (needs permission_id from list); action=remove revokes it. Ownership transfer: role=owner with transfer_ownership=true — between personal accounts this only INVITES the new owner (pendingOwner until they accept). Changes are live immediately; removing your own access to someone else's file is irreversible from your side. role=owner/organizer grants full control including permanent deletion — prefer writer or less.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | share/update: the access level. fileOrganizer/organizer exist only on shared drives; owner transfers ownership. | |
| type | No | share only: who the grant is for. user/group need email_address; domain needs domain; anyone = link sharing. | |
| action | Yes | What to do with the file's permissions. | |
| domain | No | share with type=domain: the Workspace domain, e.g. example.com. | |
| file_id | Yes | The file id — the long id from the Drive URL (drive.google.com/file/d/<fileId> or docs.google.com/.../d/<fileId>/edit) or from search_files/get_file output. Folders and shared-drive items are files too. | |
| page_token | No | list: nextPageToken from the previous page. | |
| email_address | No | share with type=user/group: the grantee's email address. | |
| email_message | No | share: a custom note for the notification email. | |
| permission_id | No | update/remove: the permission id from action=list. | |
| expiration_time | No | update: RFC3339 expiry for the grant, e.g. 2026-12-31T00:00:00Z (not available for owners). | |
| transfer_ownership | No | share with role=owner: confirm the ownership transfer (required by the API for role=owner). | |
| allow_file_discovery | No | share with type=domain/anyone: whether the file can be FOUND by search (default false = link only). | |
| send_notification_email | No | share with type=user/group: send the notification email (API default true; must stay true for ownership transfer). |