manage_drive_access
Grant, update, revoke, or transfer ownership of Drive files and folders. Manage permissions for users, groups, domains, or anyone with batch support and optional expiration.
Instructions
Grant, batch-grant, update, revoke, or transfer ownership on a Drive item.
Side effects: all actions mutate permissions; transfer_owner permanently changes the file's owner. Notification emails are sent per send_notification. For read-only inspection use get_drive_file_permissions. Requires the drive.file OAuth scope (or higher for cross-domain transfers).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| file_id | Yes | Drive file or folder ID. | |
| action | Yes | "grant", "grant_batch", "update", "revoke", or "transfer_owner". | |
| share_with | No | For "grant" — recipient email (user/group) or domain name (domain). Omit for share_type="anyone". | |
| role | No | For "grant" (default "reader") and "update": "reader", "commenter", or "writer". | |
| share_type | No | For "grant": "user", "group", "domain", or "anyone". Default "user". | user |
| permission_id | No | Required for "update" and "revoke". Get it from get_drive_file_permissions. | |
| recipients | No | For "grant_batch": list of objects with keys email (or domain for domain shares), role, share_type, expiration_time. | |
| send_notification | No | Send the recipient an email. Default True. Applies to grant/grant_batch user/group shares. | |
| email_message | No | Custom body appended to the notification email. | |
| expiration_time | No | RFC3339 deadline ("2026-06-01T00:00:00Z") after which the permission auto-revokes. Applies to grant/update. | |
| allow_file_discovery | No | For domain/anyone shares, True = indexable in search, False = link-only. | |
| new_owner_email | No | Required for "transfer_owner". Must be inside the same Workspace domain in most cases. | |
| move_to_new_owners_root | No | After transfer, move the file to the new owner's My Drive root. Default False. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |