Join our Newsletter — 33% off our NHI Course
Home› Guides› Gmail Full Access Scope (mail.google.com): Risk and Narrower…
Guide SaaS & OAuth Integrations

Gmail Full Access Scope (mail.google.com): Risk and Narrower Alternatives

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

The OAuth scope https://mail.google.com/ gives an app every right Gmail has to offer, including permanent deletion that bypasses the Trash, and many integrations request it when a far narrower scope would do the job. Once a user or administrator grants it, the app, or anyone who steals its token, can read, send and erase a mailbox without a password or MFA prompt. This guide explains exactly what the full access scope grants, how its risk differs from the other Gmail scopes, which narrower scope fits each common use case, and the Google Workspace admin controls and logs that limit and reveal its use. It is written for Workspace administrators reviewing third-party and internal apps, and for developers building on the Gmail API who want to request the least they need.

This is an independent guide from NHI Mgmt Group, based on Google's public Gmail API and Workspace admin documentation as of November 2026. It is not sponsored or reviewed by Google. Product features change, so confirm settings against Google's current documentation.

Key takeaways

  • Full access is only needed for permanent deletion. Google's scope reference says to request https://mail.google.com/ only if the app must permanently delete threads and messages, bypassing the Trash, and that all other actions can use less permissive scopes.
  • Restricted does not mean rare. Most useful Gmail scopes, including gmail.readonly, gmail.modify and gmail.metadata, are classed as restricted alongside full access; the difference is what each one lets an app do once granted.
  • Verification is the developer control. Public apps that request restricted scopes need restricted-scope verification, and apps that store or transmit restricted-scope data on servers need an annual CASA security assessment.
  • API controls are the admin control. Setting Gmail to Restricted under Manage Google Services stops untrusted apps from obtaining high-risk Gmail scopes; Trusted apps keep them.
  • Tokens are non-human identities. Every grant of full Gmail access is a standing credential held by software, so it needs an owner, a review date and alerting on new grants.

What the scope grants

Google's Gmail API scope reference describes https://mail.google.com/ as the scope to "read, compose, send, and permanently delete all email". It is classed as restricted, the highest of Google's three classifications. Because the scope covers the whole mailbox, it is also the scope used for IMAP, POP and SMTP access with OAuth (XOAUTH2), which is why mail clients and legacy connectors often ask for it.

The table lists every Gmail API scope with Google's own description and classification. Platforms and scope names are as Google documents them.

ScopeWhat Google says it allowsClassification
https://mail.google.com/Read, compose, send and permanently delete all email; only needed for permanent deletion bypassing the TrashRestricted
gmail.modifyRead, compose and send email; does not allow immediate, permanent deletion bypassing the TrashRestricted
gmail.readonlyView email messages and settingsRestricted
gmail.metadataView message metadata such as labels and headers, but not the bodyRestricted
gmail.composeManage drafts and send emailRestricted
gmail.insertAdd email into the mailboxRestricted
gmail.settings.basicView and change email settings and filtersRestricted
gmail.settings.sharingManage sensitive mail settings, including who can manage the user's mail; admin-only, through a service account with domain-wide delegationRestricted
gmail.sendSend email on the user's behalfSensitive
gmail.addons.current.message.readonlyView email messages while the add-on is runningSensitive
gmail.addons.current.message.metadataView message metadata while the add-on is runningSensitive
gmail.labelsView and edit email labelsNon-sensitive
gmail.addons.current.message.actionView email messages when the user interacts with the add-onNon-sensitive
gmail.addons.current.action.composeManage drafts and send email when the user interacts with the add-onNon-sensitive

All scopes other than full access carry the prefix https://www.googleapis.com/auth/. A grant can be made in two ways: a user consents for their own mailbox, or a super administrator lists the scope against a service account under domain-wide delegation, which lets that service account act as any user in the domain. The second case turns one mailbox's worth of risk into the whole tenant's. See the Google Workspace Domain-Wide Delegation Security Guide.

Risk

The risk does not come from a flaw in the scope; it comes from how complete it is. Whoever holds a valid token holds the mailbox.

  • Token theft bypasses sign-in controls: refresh tokens stored by an integration's servers can be stolen and replayed to the API without triggering 2-Step Verification. MITRE ATT&CK tracks this as T1528 Steal Application Access Token and T1550.001 Application Access Token.
  • Bulk collection: read access to every message is the API route to T1114.002 Remote Email Collection, including password reset emails and invoices that enable further fraud.
  • Sending as the user: send rights enable internal phishing and payment fraud from a trusted mailbox.
  • Permanent deletion: the one right unique to full access lets an attacker erase evidence or destroy mail beyond the Trash, which complicates investigation and recovery.
  • Persistence: a consented app survives password changes. Malicious app grants are a persistence route under T1671 Cloud Application Integration, often obtained through consent phishing links (T1566.002). See the Consent Phishing and Illicit OAuth Grants Guide.
  • Over-scoped AI tools: an assistant or agent that only summarises mail but holds full access gives prompt injection a path to send or delete. See AI Agent Email Access Security.

Closely related: gmail.settings.basic lets an app create filters, and filters that forward or hide mail map to T1114.003 Email Forwarding Rule. Review settings scopes with the same care as full access.

Narrower scopes

Google's guidance is to choose the most narrowly focused scope that meets the app's needs, to use non-sensitive scopes where possible, and not to request scopes the app does not require. Users are also more willing to grant limited scopes with clear descriptions.

Use caseNarrowest fitting scopeWhy not full access
Send notifications or transactional mail as the usergmail.send (sensitive)No read access to the mailbox at all
Act on the open message inside a Gmail add-ongmail.addons.current.message.action or .readonly, plus gmail.addons.current.action.compose to replyAccess is limited to the message the user is working with, while the add-on runs
Organise mail with labelsgmail.labels (non-sensitive)Cannot read message bodies
Analytics on volume, senders or routinggmail.metadataHeaders and labels only, no bodies
Archiving, search, summarisation or backupgmail.readonlyCannot send, change or delete
Triage, labelling and replying, moving to Trashgmail.modifySame daily capability without permanent deletion
Draft replies for a human to reviewgmail.composeNo read of the whole mailbox beyond drafts and sending
Import or migrate mail into a mailboxgmail.insertAdds messages without reading existing mail
Retention tooling that must purge mail beyond Trashhttps://mail.google.com/The only documented case that needs full access

Developer steps to narrow an existing app

  1. List the API methods the code calls: map each to the scope Google documents for it, and drop scopes no method needs.
  2. Replace IMAP with the Gmail API where possible: IMAP and SMTP with OAuth need full access, while the Gmail API supports the narrower scopes above.
  3. Request incrementally: ask for an extra scope at the moment a feature needs it, not at first sign-in, using Google's incremental authorisation.
  4. Test in a staging project: confirm every feature works with the reduced scopes before changing the production consent screen.
  5. Re-verify: changing restricted scopes may trigger verification or reassessment; plan for it.
  6. Roll back safely: keep the old scope set available behind a configuration flag until users have re-consented, so a missed method does not break the app.

Restricted scope verification

Google requires apps that request restricted scopes to complete restricted-scope verification before requesting them from any Google Account, unless an exception applies. Exceptions include personal use by a few known people, internal apps whose project is owned by the organisation with the OAuth consent screen set to the Internal user type, development and testing projects, and service accounts that access only their own data. Domain-wide installation exempts an app from brand verification only, not app verification. Apps that access restricted-scope data from or through a third-party server must also pass a security assessment by a Google-empanelled assessor under the App Defense Alliance CASA framework, and must be reverified and reassessed at least every 12 months from the Letter of Assessment approval date. Adding a new restricted scope may require reassessment, and the privacy policy must meet Google's Limited Use requirements. See the Google CASA Security Assessment Guide.

ClassificationVerificationExample Gmail scopes
Non-sensitiveBasic OAuth verificationgmail.labels, gmail.addons.current.message.action
SensitiveAdditional OAuth verificationgmail.send, gmail.addons.current.message.readonly
RestrictedRestricted-scope verification; security assessment where data is stored or transmitted on servershttps://mail.google.com/, gmail.readonly, gmail.modify

Admin controls

Workspace administrators control which apps can obtain Gmail scopes in the Admin console under Security, Access and data control, API controls. The settings below are the customer-side controls.

  • Restrict Gmail: under Manage Google Services, set Gmail to Restricted so that only Trusted apps can obtain its high-risk scopes. Google maintains the list of which Gmail scopes count as high-risk for this setting. Restricting a service revokes tokens held by untrusted apps, so announce the change and pilot it on an organisational unit first.
  • Set an access level per app: Trusted (all services, including restricted ones), Limited (unrestricted services only), Specific Google data (offered when approving from the pending review list) or Blocked. Reserve Trusted for apps with a named owner and a documented need for full or restricted Gmail access.
  • Default for unconfigured apps: choose either "Don't allow users to access any third-party apps" or "Allow users to access third-party apps that only ask for Google sign-in info", and turn on the request flow so users ask through Apps pending review instead of working around the block.
  • Internal apps: decide deliberately whether to tick Trust internal apps. Staff-built apps can request full access too and should be inventoried like third-party apps.
  • Domain-wide delegation: review every service account client ID listed under Manage Domain Wide Delegation and remove https://mail.google.com/ wherever a narrower scope works. See How to audit Google Workspace domain-wide delegation grants.
  • Revoke what should not exist: the Directory API tokens resource lists each user's grants by client ID and scope, and deleting a token removes that user's grant to the client. See How to revoke a malicious or risky OAuth app across Google Workspace and block it.

Access setting changes can take up to 24 hours to apply. Revoked tokens cannot be restored; users must consent again, so tell app owners before bulk revocation.

Choosing a posture

SituationPostureTrade-off
Small organisation, few integrationsGmail Restricted, sign-in only for unconfigured apps, short Trusted listSome user friction, very little upkeep
Large organisation with many organisational unitsBlock unconfigured apps, approve through Apps pending review, Trusted per organisational unitNeeds an owner for the request queue
Business need for full access (retention, migration)Trusted only for the unit that needs it, named owner, quarterly review, alerting on activityAccepts concentrated risk for a defined purpose
Unverified or anonymous client asking for full accessBlock and revoke, then ask users what it was forMay break a personal workflow

Detection

OAuth token events are available in the Admin console under Reporting, Audit and investigation, OAuth log events, and through the Reports API with applicationName=token. Google keeps these events for six months, so export them continuously to a SIEM or BigQuery.

SignalSourceWhy it matters
authorize event that includes https://mail.google.com/OAuth log eventsNew full mailbox grant; alert if the client ID is not in your register
Same client ID granted by many users in a short windowOAuth log eventsPossible consent phishing campaign
Grant by an administrator or executive accountOAuth log events joined with directory rolesHighest impact if the token is stolen
activity events with high response bytes for Gmail APIOAuth log events (activity, on editions that log it)Bulk mailbox reads by an app
New service account scope under domain-wide delegationAdmin log eventsTenant-wide mail access added
New mail filters or forwarding by an appGmail and admin audit logsHidden forwarding or rule-based collection

OAuth activity events, which show whether an app is still calling APIs, are available only on certain editions. On other editions you see grants and revocations, not usage. The Google Workspace Audit Log Detection Guide covers alert design, and How to Inventory third party oauth apps in google workspace covers building the register.

Metrics

  • Full access holders: number of client IDs holding https://mail.google.com/, trending down.
  • Owned and reviewed: percentage of those apps with a named owner and a review in the last 90 days.
  • Delegation exposure: number of domain-wide delegation clients with full Gmail access.
  • Unregistered grants: full access grants to client IDs not in the register in the last 30 days, target zero.
  • Developer narrowing: for your own apps, the share of releases that request no restricted scope beyond what the code calls.

Framework mapping

FrameworkReferenceApplies to
NIST SP 800-53 Rev. 5AC-6 Least Privilege; CM-7 Least FunctionalityChoosing narrow scopes; restricting Gmail
NIST SP 800-53 Rev. 5SA-9 External System Services; AU-6 Audit Record Review, Analysis, and ReportingThird-party app approval; OAuth log review
NIST CSF 2.0PR.AA-05; DE.CM-03Enforced access settings; monitoring app activity
MITRE ATT&CK v20T1528; T1550.001; T1114.002; T1114.003; T1671; T1566.002Token theft and use, mail collection, forwarding rules, malicious app integrations, consent phishing

Practitioner checklist

  • Export every client ID that holds https://mail.google.com/, from API controls and the Directory API tokens resource.
  • Give each one a named owner and a documented reason that needs permanent deletion; otherwise move it to a narrower scope.
  • Set Gmail to Restricted under Manage Google Services after a pilot and an announcement.
  • Block or limit unconfigured apps to sign-in information and turn on the access request flow.
  • Remove full Gmail access from domain-wide delegation clients unless the need is documented.
  • Alert on any new grant of https://mail.google.com/ and on grants by administrators.
  • Export OAuth log events continuously beyond the six-month retention.
  • For your own apps, map API methods to scopes, request incrementally and plan for restricted-scope verification and CASA reassessment.
  • Record every full access grant as a non-human identity with a review date.

Standards and references

Related NHI Mgmt Group resources: Google Workspace Security Guide · SaaS and OAuth App Governance Guide · OAuth Scope Design Guide · Google Workspace Less Secure Apps Retirement

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.