Revoking Access¶
Learn how to remove your AI agent's access to documents and manage permissions.
Overview¶
Revoking access in ExtraSuite is straightforward because it uses standard Google Drive sharing. When you remove your service account from a document's sharing settings, access is revoked immediately.
Revoking Access to a Single Document¶
Via Google Sheets¶
- Open the Google Sheet
- Click Share (top right)
- Find your service account email in the list
- Click the dropdown next to their name
- Select Remove
- Click Save
Via Google Drive¶
- Open Google Drive
- Right-click the file
- Select Share > Share
- Find your service account email
- Click the dropdown and select Remove
- Click Save
Revoking Access to Multiple Documents¶
If Documents Are in a Folder¶
- Open Google Drive
- Right-click the shared folder
- Select Share > Share
- Find your service account email
- Click Remove
- All documents in the folder will lose access
Finding All Shared Documents¶
To find all documents shared with your agent:
- Open Google Drive
- In the search bar, type your service account email
- This shows all documents shared with that email
- Remove sharing from each as needed
Search Syntax
You can use to:yourname-domain@project.iam.gserviceaccount.com in Google Drive search to find shared documents.
Revoking All Access¶
If you want to completely remove your AI agent's ability to access any of your documents:
Step 1: Find All Shared Documents¶
Search in Google Drive for your service account email to find all shared documents.
Step 2: Remove from Each Document¶
Remove the service account from each document's sharing settings.
Step 3: Check Shared Folders¶
Also check any folders that might be shared:
- My Drive > Shared folders
- Remove service account from any relevant folders
What Happens After Revoking¶
When you revoke access:
| Action | Result |
|---|---|
| Immediate | Agent loses access to the document |
| API calls | Will fail with "permission denied" |
| Cached data | Agent may remember data from before revocation |
| Version history | Past edits remain in history |
Cached Data
Your AI agent may have cached or discussed the data during your conversation. Revoking access prevents future access but doesn't delete conversation history.
Temporary vs Permanent Access¶
Temporary Access Pattern¶
For one-time tasks:
- Share document with Editor access
- Complete the task with your AI agent
- Immediately revoke access
- Document is protected going forward
Permanent Access Pattern¶
For ongoing workflows:
- Share document with appropriate permissions
- Keep access while workflow is active
- Revoke when project ends or workflow changes
Verifying Revocation¶
Test Access¶
After revoking, ask your AI agent:
You should see an error indicating the document is not accessible.
Use Verification Script¶
~/.claude/skills/gsheets/venv/bin/python ~/.claude/skills/gsheets/verify_access.py <spreadsheet-url>
This should fail if access was properly revoked.
Reverting Unwanted Changes¶
If your AI agent made changes you want to undo:
Use Version History¶
- Open the Google Sheet
- File > Version history > See version history
- Find the version before the unwanted changes
- Click Restore this version
Selective Undo¶
For specific changes:
- View version history
- Click on a previous version
- Copy the cells you want to restore
- Go back to current version
- Paste the old values
Emergency Access Removal¶
If you need to immediately stop all access:
Quick Steps¶
- Go to Google Drive
- Search for your service account email
- Select all matching documents
- Right-click > Share > Remove service account from all
Delete Cached Tokens¶
Remove local token cache:
This prevents the skill from using any existing authentication.
Re-Granting Access¶
If you revoked access by mistake:
- Open the document
- Click Share
- Add your service account email again
- Set the appropriate permission level
Access is restored immediately.
Access Audit¶
Checking Current Permissions¶
For any document:
- Open the document
- Click Share
- Review the list of people with access
Finding Unexpected Access¶
Periodically review:
- Documents shared with your service account
- Folders that might grant transitive access
- Shared drives that include your service account
Best Practices¶
1. Regular Access Review¶
Set a reminder to review shared documents monthly:
- Remove access from completed projects
- Verify only necessary documents are shared
- Check folder-level sharing
2. Document Access in Notes¶
Keep a record of what you've shared:
Project: Q4 Analysis
Shared: https://docs.google.com/spreadsheets/d/abc123
Permission: Editor
Purpose: Automated report generation
Revoke after: 2024-12-31
3. Use Time-Limited Access¶
For sensitive data:
- Share only when actively working
- Revoke immediately after completion
- Don't leave Editor access on important documents
4. Prefer Viewer Access¶
When possible:
- Start with Viewer access for analysis
- Grant Editor only when needed
- Revoke back to Viewer after changes are complete
Related Topics:
- Sharing Documents - How to grant access
- Security - ExtraSuite's security model
- FAQ - Common questions