Google Drive plugin fails to create files: “No permission”

Resolved 💬 13 comments Opened May 23, 2026 by H0rs3man Closed Jun 1, 2026
💡 Likely answer: A maintainer (adaley-openai, contributor) responded on this thread — see the highlighted reply below.

What issue are you seeing?

I am using the Google Drive plugin in the Codex desktop app on Windows 10.

The plugin connects successfully, and MCP appears to be working. However, when I ask Codex to create a new Google Doc in my Google Drive, the action fails with:

No permission

The issue seems to be that the Google OAuth flow does not request write/create permissions for Google Drive or Google Docs. The plugin connects successfully, but it cannot create/alter files afterward.

What steps can reproduce the bug?

  1. Open Codex desktop app on Windows 10.
  2. Connect the Google Drive plugin.
  3. Complete the Google OAuth flow. (This step only permission is granted, no edit or create permission was asked)
  4. Ask Codex to create a simple Google Doc, for example:

Create a Google Doc in my Google Drive named "Codex Drive Write Test" with the content "test".

  1. Codex attempts to use the Google Drive plugin.
  2. The action fails with:

No permission

Reconnecting the Google Drive plugin does not fix the issue. Only see and download permissions were granted.

<img width="632" height="280" alt="Image" src="https://github.com/user-attachments/assets/ff8b4140-368f-47be-85c5-495d7378cc70" />

What is the expected behavior?

The Google Drive plugin should request the required write/create permissions during OAuth.

If the current token does not have the required permissions, Codex should trigger reauthorization and request the missing Google Drive or Google Docs write scope before attempting to create the file.

Additional information

Codex app version: 26.519.41501
Subscription: Plus
Model: gpt-5.5
Platform: Windows 10, Codex desktop app

I am using a personal Plus account, not a workspace or enterprise account.

The plugin connects successfully, but creating a Google Doc fails with "No permission". The OAuth consent screen does not appear to request write/create permissions.

View original on GitHub ↗

13 Comments

jshaofa-ui · 1 month ago

Proposed Solution: Google Drive Plugin "No permission"

Root Cause

MCP tool permission propagation gap. Google Drive MCP server authenticates successfully (OAuth token valid), but Codex Desktop's sandbox/permission layer blocks the actual files.create API call because the Google Drive scope isn't in the allowlist. Error "No permission" is generic — doesn't indicate which permission is missing.

Fix

  1. Propagate MCP server's OAuth scopes to permission check
  2. Map MCP tool to required OAuth scopes
  3. Check both sandbox permissions AND OAuth scopes
  4. Return descriptive error: "Missing OAuth scope: https://www.googleapis.com/auth/drive.file"
const oauthOk = requiredScopes.every(s => oauthScopes.includes(s));
if (!oauthOk) {
  return { allowed: false, reason: 'OAUTH_SCOPE_MISSING', missingScopes: [...], reauthUrl };
}

Full solution: codex-24233-google-drive-plugin-no-permission-fix.md

inputchip · 1 month ago

Facing this same issue. Happened when I tried to switch accounts. Codex on Windows desktop.

H0rs3man · 1 month ago
Facing this same issue. Happened when I tried to switch accounts. Codex on Windows desktop.

Hi, did you cope with that successfully? How did you fix this problem?

inputchip · 1 month ago
> Facing this same issue. Happened when I tried to switch accounts. Codex on Windows desktop. Hi, did you cope with that successfully? How did you fix this problem?

Only workaround I found is connecting to Google Drive via MCP server. Seems to be somewhat finicky though.

smeetChheda · 1 month ago

You can go to your account settings on ChatGPT Web and go to Apps -> Google Drive and then disconnect it and re-connect it. It launched the OAuth screen and worked fine afterwards.

reduced2ash · 1 month ago
You can go to your account settings on ChatGPT Web and go to Apps -> Google Drive and then disconnect it and re-connect it. It launched the OAuth screen and worked fine afterwards.

This does not work for me. Even after wiping the google openai connection in codex, chatgpt web, and deleting it from my google account, trying to connect the google drive app again in the chatgpt website, it only asks google for read permissions and not edit. Same problem with trying to do it in codex.

reduced2ash · 1 month ago

UPDATE: I found a fix! firstly, to be safe and start clean, remove the openai permissions on your google account by going into manage google account < linked apps < find openai then remove permissions. Then go to the chatgpt website (this will fix it for codex too), go to settings < apps and disconnect the google drive app if it's already connected. Then connect it again- when doing so you will probably see that it still only requests permissions from google to view documents and not edit them. The fix? Open up a brand new chat (in chatgpt web app) and simply just type "create a google doc" and then it should automatically prompt a pop up asking to fix update/expired google permissions, clicking that then takes you through the google oauth again, where this time it asks for the edit permissions. This also fixed it in codex for me.

mdemoret-nv · 1 month ago

@reduced2ash Thank you! This worked for me too. Just asking "create a google doc" in the browser triggers the permissions refresh with write access.

H0rs3man · 1 month ago
UPDATE: I found a fix! firstly, to be safe and start clean, remove the openai permissions on your google account by going into manage google account < linked apps < find openai then remove permissions. Then go to the _chatgpt website_ (this will fix it for codex too), go to settings < apps and disconnect the google drive app if it's already connected. Then connect it again- when doing so you will probably see that it still only requests permissions from google to view documents and not edit them. The fix? Open up a brand new chat (in chatgpt web app) and simply just type "create a google doc" and then it should automatically prompt a pop up asking to fix update/expired google permissions, clicking that then takes you through the google oauth again, where this time it asks for the edit permissions. This also fixed it in codex for me.

Thanks a lot! This works for me as well

seany · 1 month ago
UPDATE: I found a fix! firstly, to be safe and start clean, remove the openai permissions on your google account by going into manage google account < linked apps < find openai then remove permissions. Then go to the _chatgpt website_ (this will fix it for codex too), go to settings < apps and disconnect the google drive app if it's already connected. Then connect it again- when doing so you will probably see that it still only requests permissions from google to view documents and not edit them. The fix? Open up a brand new chat (in chatgpt web app) and simply just type "create a google doc" and then it should automatically prompt a pop up asking to fix update/expired google permissions, clicking that then takes you through the google oauth again, where this time it asks for the edit permissions. This also fixed it in codex for me.

This fix worked for me too! Note that you need to explicitly select Google Drive and then say "create a google doc" and then it'll prompt to reconnect a "stale connection"

<img width="834" height="310" alt="Image" src="https://github.com/user-attachments/assets/abb07895-e510-484a-b8b5-74269b29a756" />

KeKeDou810 · 1 month ago
UPDATE: I found a fix! firstly, to be safe and start clean, remove the openai permissions on your google account by going into manage google account < linked apps < find openai then remove permissions. Then go to the _chatgpt website_ (this will fix it for codex too), go to settings < apps and disconnect the google drive app if it's already connected. Then connect it again- when doing so you will probably see that it still only requests permissions from google to view documents and not edit them. The fix? Open up a brand new chat (in chatgpt web app) and simply just type "create a google doc" and then it should automatically prompt a pop up asking to fix update/expired google permissions, clicking that then takes you through the google oauth again, where this time it asks for the edit permissions. This also fixed it in codex for me.

It works, THANK YOU SO MUCH BRO!!!!

mkahng · 1 month ago

I hit a related Google Drive connector auth/scope failure on macOS, with an additional stale-connection state after trying to force a clean reconnect.

Environment:

  • Product: Codex Desktop
  • Platform: macOS 26.3.1 (25D2128)
  • Codex app: 26.527.31326 (3390)
  • Plugin/connector: google-drive@openai-curated

Observed sequence:

  1. Google Drive connector appeared connected in Codex and _get_profile initially worked.
  2. A tiny write test using the exposed Google Drive create-file tool failed:
Current action failed because this app connection is missing permissions or scopes required for this action. Reauthenticate to grant the missing access; other actions on this app may still work.
  1. Reconnecting Google Drive from Codex did not show a Google OAuth consent prompt.
  2. I then removed the OpenAI entries from Google Account -> Linked apps. After removal, the Google Account linked apps list no longer showed OpenAI.
  3. After that, Google Drive connector calls from Codex correctly failed at the API layer with:
401 UNAUTHENTICATED
Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential.
  1. However, the Codex UI still showed Google Drive as connected. The user disconnected/reconnected and restarted Codex, but reconnect still did not trigger a Google consent screen.

Expected behavior:

  • If the connector token lacks write scopes, Codex should offer an in-product reauthorization/upgrade flow that requests the required Drive/Docs/Sheets/Slides write scopes.
  • If the Google-side grant has been revoked, Codex should not keep showing the connector as connected; reconnect should force a fresh OAuth consent flow.

So this seems like both a write-scope upgrade problem and a stale connector-state problem: the live connector returns 401, while the Codex UI still believes Google Drive is connected and does not launch OAuth again.

adaley-openai contributor · 1 month ago

Hi folks - we identified a configuration issue on our end and resolved it. This should no longer be an issue.