Skip to content

Conversation

@ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Aug 25, 2025

Example query results

Results
> select * from googleworkspace_drive_my_file
+----------------------------------------------+-------------------------------------------------------+-----------------------------------------+--------->
| id                                           | name                                                  | mime_type                               | drive_id>
+----------------------------------------------+-------------------------------------------------------+-----------------------------------------+--------->
| 11iXfj-RHpFsil7_hNK-oQjCqmBLlDfCvju2AOF-ieb4 | Google Sheets Plugin - Sample School Data             | application/vnd.google-apps.spreadsheet | <null>  >
|                                              |                                                       |                                         |         >
| 1bHXUEanSoL4iWdnyOQpp3_mscWfKj_h4Sm1kV8j1gT8 | Copy of Sample School Data                            | application/vnd.google-apps.spreadsheet | <null>  >

 select * from googleworkspace_activity_report where application_name = 'admin'
+---------------------------+---------------------+------------+------------------------------------------------------------------------------------------->
| time                      | actor_email         | event_name | event_names                                                                               >
+---------------------------+---------------------+------------+------------------------------------------------------------------------------------------->
| 2025-07-15T21:28:36+05:30 | [email protected] | <null>     | ["SECURITY_INVESTIGATION_QUERY"]                                                          >
| 2025-06-04T14:15:50+05:30 | [email protected] | <null>     | ["AUTHORIZE_API_CLIENT_ACCESS"]                                                           >
| 2025-07-15T21:20:49+05:30 | [email protected] | <null>     | ["ALERT_CENTER_VIEW"]                                                                     >
| 2025-07-15T21:43:00+05:30 | [email protected] | <null>     | ["AUTHORIZE_API_CLIENT_ACCESS"]         

@ParthaI ParthaI requested a review from Copilot August 25, 2025 08:24
@ParthaI ParthaI self-assigned this Aug 25, 2025
@ParthaI ParthaI linked an issue Aug 25, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors Google Workspace authentication to set OAuth scopes per service/table instead of using a global scope configuration. The change allows for more granular permission requests based on the specific Google service being accessed.

  • Modified service creation functions to pass service-specific OAuth scopes
  • Updated authentication functions to accept and use dynamic scopes instead of hardcoded global scopes
  • Enhanced token source caching to use scope-based cache keys for better isolation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ParthaI ParthaI changed the title Refactor authentication to set scope per table instead of globally Closes #93 Refactor authentication to set scope per API call instead of globally Closes #93 Aug 26, 2025
@misraved misraved self-requested a review September 8, 2025 06:46
@misraved misraved merged commit b9128d6 into main Oct 27, 2025
1 check passed
@misraved misraved deleted the issue-93 branch October 27, 2025 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requested OAuth2 scopes should match the invoked APIs per table

3 participants