AegisAI Perspectives · 154

Gmail API scopes and Microsoft Graph permissions an email security tool asks for: what each one allows

Each Gmail API OAuth scope and Microsoft Graph mail permission an email security tool asks for, what it lets the tool do, and how an admin revokes it.

TL;DR
Answer
Gmail API scopes and Microsoft Graph mail permissions each set a ceiling on what an email security tool can do, from seeing headers only to reading, changing, sending or deleting mail.
Who it's for
If you run IT for a small business of 20 to 500 people on Google Workspace or Microsoft 365, with a small IT or security team and no SOC.
Watch out for
An unscoped Mail.Read grant in Entra ID cancels any mailbox scope you set in Exchange Online, so check the Admin consent tab after scoping.
What AegisAI does
A pilot runs read-only: the app can list users and read mail for classification, nothing more. Quarantine mode adds a single permission to move malicious messages.
Book a demo

See it on your own Google Workspace or Microsoft 365 tenant. No MX change.

Or get the Q3 2026 State of the AI Attack report (free, instant download)

Not ready for a demo? Check your domain.

Gmail API scopes and Microsoft Graph permissions an email security tool asks for: what each one allows

It is safer when each scope is read before approval and the change scopes come later. AegisAI works post-delivery through the Microsoft 365 or Google Workspace API21. Gmail API scopes and Microsoft Graph mail permissions each set a ceiling on what an email security tool can do, from seeing headers only to reading, changing, sending or deleting mail2.

If you run IT for a small business of 20 to 500 people on Google Workspace or Microsoft 365, with a small IT or security team and no SOC, use the reference table on this page to read a consent screen line by line. How the product reads and removes mail is on the inbound email security page. Whether to grant API access at all is answered in is it safe to give an email security vendor API access to our mailboxes. What AegisAI's AI agents read and keep is in how the AI agents are secured.

Key takeaways

  • Google lists gmail.readonly as a restricted scope, and the modify and full mail scopes as well1.
  • Microsoft Graph Mail.Read as an application permission reads mail in all mailboxes without a signed-in user11.
  • Mail.ReadWrite can create, read, update and delete mail, but does not include sending13.
  • An unscoped Mail.Read grant in Entra ID cancels a mailbox scope set in Exchange Online17.
  • Deleting a domain-wide delegation client stops the apps that depend on it at once10.

The short answer

QuestionAnswer
Is it safe to give an email security vendor API access to our mailboxes?It is safer when you know what each scope allows before you approve it. Microsoft calls admin consent a sensitive operation that can give the publisher access to significant portions of your data18
Which Gmail scope reads mail without changing it?gmail.readonly: view your email messages and settings
Which Gmail scope can delete mail permanently?The full mail scope (mail.google.com), which can read, compose, send and permanently delete4
Which Graph permission reads mail but not the body?Mail.ReadBasic.All: every property except body, previewBody, attachments and extended properties12
Which Graph permission lets a tool send as your users?Mail.Send: send mail as any user without a signed-in user14
How do you take access back?Microsoft 365: Revoke permission on the Admin consent tab in Entra19. Google Workspace: delete the delegation client, or block the app,7

What you can do by the end

  • Map every Gmail scope and Graph permission on a consent screen to what it reads, changes or sends.
  • Separate the read only scopes from the scopes that add removal, before you approve either.
  • Revoke each grant on both platforms, and confirm a mailbox scope is not cancelled.

Short on time? Watch the explainer, or book a demo.

How do read-only and read-write permissions differ across scope tiers?

Reading needs a read scope; removal needs a scope that changes the mailbox. On Google Workspace, gmail.readonly views messages and settings. The modify scope goes on to compose and send3, and the full mail scope adds permanent deletion. On Microsoft 365, Mail.Read reads mail in all mailboxes. Mail.ReadWrite adds update and delete.

On Microsoft 365 the change tier does not send. Mail.ReadWrite does not include permission to send mail; sending is Mail.Send, a separate grant. On Google the tiers overlap: gmail.modify already includes sending, and gmail.send is a separate sensitive scope that only sends5.

Approve the read tier for the first step, and add the change tier only on the day you switch on removal.

How do you apply least-privilege principles to mailbox access control?

Narrow the mailboxes first, then the permission. RBAC for Applications in Exchange Online pairs a permission grant with a resource scope that names the mailboxes an app can reach16. The two grants add up. Microsoft states that an unscoped Mail.Read grant from Entra ID plus a resource-scoped Mail.Read grant gives no effective resource scoping.

On Google Workspace, domain-wide delegation is not narrowed by mailbox. With domain-wide delegation, the app has access to the data belonging to all of your users9. The narrower Google lever is the scope itself: gmail.metadata sees labels and headers, not the body.

Check the Entra Admin consent tab for the same permission after you set any Exchange resource scope.

Which API access scopes matter for compliance and audit readiness?

The restricted ones, because Google reviews the app behind them. Restricted scopes give wide access to Google user data and need restricted scope OAuth App Verification. An app that stores or transmits restricted scope data on its servers must also go through a security assessment6.

On Microsoft 365, the audit record starts at consent. Microsoft calls admin consent a sensitive operation, with full access to all mailboxes as its example. The Admin consent tab in Entra lists what was granted, and is where a grant is revoked.

Ask the vendor which restricted scopes it holds, and file the answer with the consent date.

How to evaluate a vendor's API access scope requests

Run these in order: once at approval, then again at each quarterly access review.

  1. List each scope or permission on the consent screen and find its row in the reference table below.

  2. On Google Workspace, set the app to Trusted, Limited or Blocked in the Admin console app access control.

  3. If the app uses domain-wide delegation, go to Security, then Access and data control, then API controls. Open Manage Domain Wide Delegation and read the scopes on its client.

  4. Restrict Gmail access to trusted apps in the Google Workspace Admin console; untrusted apps already installed then stop working and their tokens are revoked8.

  5. On Microsoft 365, open the app under Enterprise apps in the Entra admin center. Read the Admin consent tab under Permissions.

  6. Add an Exchange Online resource scope to limit mailboxes, then remove the matching unscoped Entra grant.

  7. To revoke on Microsoft 365, pick the permission on the Admin consent tab and select Revoke permission.

  8. To revoke on Google Workspace, delete the delegation client; apps that depend on it stop working at once. A Blocked app can't access any Google service.

Write the date and the approver next to each step in your change log.

What are the email security API access scopes in Gmail and Microsoft Graph?

The Gmail API scopes in this table are gmail.metadata, gmail.readonly, gmail.modify, gmail.send and the full mail scope. The Graph permissions are Mail.ReadBasic.All, Mail.Read, Mail.ReadWrite, Mail.Send and MailboxSettings.Read. Microsoft rows are application permissions, which act on all mailboxes without a signed-in user.

Scope or permissionPlatformWhat it lets the tool doRisk to weighHow an admin reviews or revokes it
gmail.metadataGoogle WorkspaceView message metadata such as labels and headers, not the bodyRestricted scopeAdmin console app access: Trusted, Limited or Blocked
gmail.readonlyGoogle WorkspaceView email messages and settingsRestricted scopeSame control; a Limited app reaches only unrestricted services
gmail.modifyGoogle WorkspaceRead, compose and send emailRestricted scopeSame control
Full mail scope (mail.google.com)Google WorkspaceRead, compose, send and permanently delete all emailRestricted scopeSame control; ask why a narrower scope does not do the job
gmail.sendGoogle WorkspaceSend email on the user's behalfSensitive scopeSame control
Mail.ReadBasic.AllMicrosoft 365Read basic mail properties in all mailboxes, except body, previewBody, attachments and extended propertiesNo message bodyEntra: Enterprise apps, Permissions, Admin consent
Mail.ReadMicrosoft 365Read mail in all mailboxes; admin consent requiredFull message content, tenant wideSame tab; pair with an Exchange resource scope
Mail.ReadWriteMicrosoft 365Create, read, update and delete mail in all mailboxes; no sendingCan change and delete mailSame tab; grant only when removal is switched on
Mail.SendMicrosoft 365Send mail as any user without a signed-in userMail that appears to come from your staffSame tab; ask why a security tool needs it
Application MailboxSettings.ReadMicrosoft 365Read users' mailbox settings in all mailboxes15Settings, not mailExchange Online RBAC for Applications

Before you click Allow, question every scope that can change, send or delete mail.

How AegisAI handles this

A pilot runs read-only: the app can list users and read mail for classification, nothing more24. Quarantine mode adds a single permission to move malicious messages. Every permission is shown on the consent screen before you approve it. There is no MX record to change back and no connector to unwind25.

Book a demoSee inbound email security

See your own records: Check your domain.

How to measure it in 30 days

Track three numbers for each connected tool.

  • Scopes or permissions granted against the rows you expected, from the Entra Admin consent tab or the Google Workspace app access page.
  • Grants that can change or send mail, counted from the same pages. These are Mail.ReadWrite, Mail.Send, gmail.modify, gmail.send and the full mail scope.
  • Days since the last revoke test, from your change log.

To see a real consent screen in your own tenant, walk through a connection with the team. On day 30, remove any grant nobody can explain.

Questions people ask

Is it safe to give an email security vendor API access to our mailboxes?

It depends on the Gmail API scopes and Graph permissions the tool asks for, because each one caps what the tool can do. The reference table above shows what each one allows. In Entra, an admin consent grant is revoked on the Admin consent tab.

Does Mail.ReadWrite let a tool send email?

No. Mail.ReadWrite covers create, read, update and delete in all mailboxes. Sending needs Mail.Send.

Can a Gmail scope read headers without the message body?

Yes. gmail.metadata views message metadata such as labels and headers, but not the email body. Google still lists it as a restricted scope.

What does domain-wide delegation give an app?

Access to every user's data in the domain. Google states that with domain-wide delegation, the app has access to the data belonging to all of your users. A super admin can delete the client, and dependent apps stop at once.

Can I limit a tool to some mailboxes in Microsoft 365?

Yes, with RBAC for Applications in Exchange Online, which pairs a grant with a resource scope of named mailboxes. Remove any unscoped Mail.Read grant in Entra ID, or the scope has no effect.

Sources

  1. (Google for Developers, Choose Gmail API scopes, read 17 November 2026)
  2. (Google for Developers, Restricted scope verification, read 17 November 2026)
  3. (Google Workspace Admin Help, Control which third-party and internal apps access Google Workspace data, 10 November 2026)
  4. (Google Workspace Admin Help, Control API access with domain-wide delegation, 10 November 2026)
  5. (Microsoft Learn, Microsoft Graph permissions reference, 7 November 2026)
  6. (Microsoft Learn, Role Based Access Control for Applications in Exchange Online, 27 October 2026)
  7. (Microsoft Learn, Grant tenant-wide admin consent to an application, 25 March 2025)
  8. (Microsoft Learn, Review permissions granted to enterprise applications, 3 March 2025)
  9. (AegisAI Blog, email security and mail flow, 23 October 2026)
  10. (AegisAI, Inbound email security, read 17 November 2026)
  11. (AegisAI, Is it safe to give an email security vendor API access to our mailboxes, 13 November 2026)
  12. (AegisAI, How AegisAI's AI agents are secured, 14 November 2026)

Recent posts

Every email, investigated.