AegisAI Perspectives · 142

How AegisAI's AI agents are secured: what they read, what they keep, what they cannot do

AegisAI's agents start read-only, keep only metadata and flagged mail, and lose access when your admin revokes it; see each permission and its source.

TL;DR
Answer
AegisAI's AI agents start read-only: a pilot can list users and read mail for classification, nothing more, and removal needs write access your admin grants and can revoke.
Who it's for
If you run IT for a company of 20 to 500 people on Microsoft 365 or Google Workspace, with a small IT or security team and no SOC.
Watch out for
Quarantine mode adds a permission to move malicious messages, and quarantined originals are held for at most 48 hours, so record when you switch it on.
What AegisAI does
Messages are read through the API, analyzed in memory and discarded.
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.

How AegisAI's AI agents are secured: what they read, what they keep, what they cannot do

A pilot runs read-only: the app can list users and read mail for classification, nothing more4. Quarantine mode adds a single permission to move malicious messages. AegisAI keeps only the metadata needed to run the service (message IDs, counts) and the content of messages flagged as suspicious6.

If you run IT for a company of 20 to 500 people on Microsoft 365 or Google Workspace, with a small IT or security team and no SOC, use this page as the access record for the AI agents before you approve the consent screen. How the product reads and removes mail is on the inbound email security page. The questions to ask any vendor are in is it safe to give an email security vendor API access to our mailboxes. This page answers them for one product, from its own published pages and from Google's and Microsoft's documentation.

Key takeaways

  • Every permission is shown on the consent screen before you approve it.
  • Removal needs write access your admin grants and can revoke3.
  • In quarantine mode, the original copy of a quarantined message is held for at most 48 hours to carry out the quarantine7.
  • Emails classified as benign stay in the inference pipeline and never enter training10.
  • On Microsoft 365, admins can revoke the permissions they granted for the entire organization22.

The short answer

QuestionAnswer
Is it safe to give an email security vendor API access to our mailboxes?It is safer when access starts read-only and an admin can take it back. The inbound page states: "Starts read-only. Runs in monitoring mode first. Removal needs write access your admin grants and can revoke."
What do the agents read?Mail, through the Microsoft 365 or Google Workspace API after delivery, with no change to mail routing (MX records)2
What do the agents keep?Only the metadata needed to run the service (message IDs, counts) and the content of messages flagged as suspicious
How long is data kept?Threat history: 90 days by default in the console8. A quarantined original: at most 48 hours
Is benign mail used for training?No. Benign mail never enters training
Who holds the encryption key?With customer-managed encryption keys, you hold the key in your own key management service9
How do you end access?Revoke the permissions in Microsoft Entra (Enterprise applications) or in the Google Workspace admin console5

What you can do by the end

  • Name what the agents read, keep and discard, with the page that states each one.
  • Match the read-only pilot and quarantine mode to the platform permissions behind that kind of access.
  • End the access on either platform, and make stored data unreadable with your own key.

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

What access do email security AI agents get, and how do they authenticate to email platforms?

They get the permissions your admin approves, and the consent screen lists each one first. The inbound page puts the access model in two lines: "Reads mail through the Microsoft 365 or Google Workspace API after delivery. No change to mail routing (MX records)."

Authentication is the platform's own app model. On Microsoft 365, an app that works without a signed-in user must get admin consent once its permissions are configured23. Mail.Read in that form allows the app to read mail in all mailboxes18. On Google Workspace, an app with domain-wide delegation has access to the data belonging to all of your users16.

Read each line of the consent screen, and record who approved it and on which date.

What do the agents keep, and for how long?

Normal mail is not stored. Messages are read through the API, analyzed in memory and discarded. What stays is metadata and the content of suspicious messages.

  • Before storage: suspicious content is scanned with Google Cloud Sensitive Data Protection. It redacts names and phone numbers; card and account numbers; passport numbers; credentials and keys.
  • At rest: it is encrypted and stored separately for each customer.
  • Quarantined originals: held for at most 48 hours to carry out the quarantine.
  • Threat history: 90 days in the console by default; enterprise customers can request extended retention.

The full answer is in the post on data retention and encryption. Write the 48 hour and 90 day figures into your vendor record next to the permissions you approve.

What can the agents not do?

Four limits are stated on live pages.

  • In a pilot, they cannot change mail. The pilot is read-only.
  • They cannot remove mail without write access. Removal needs write access your admin grants and can revoke.
  • Benign mail does not train models. It is processed in memory and discarded.
  • With customer-managed keys, stored data needs your key. The retention post states: "Revoking our access to the key makes all stored data unreadable at once, and every decryption request is logged in your own environment."

Platform scopes carry limits of their own. Where an app holds the Gmail modify scope, that scope does not allow immediate, permanent deletion that bypasses the trash13.

Ask for each limit in writing during the pilot, with the page that states it.

How does compliance and audit logging work for AI agent access?

Two logs matter: the platform's record of the grant, and the record of who decrypted stored data. On Microsoft 365, admins can review and revoke the permissions they granted for the entire organization. With customer-managed keys, every decryption request is logged in your own environment.

Google adds a review step for apps. Apps accessing restricted data from or through a third-party server must undergo an annual security assessment by a Google-approved third party14. Google's user data policy also bars using user data to train a machine learning or AI model beyond that user's personalized model15.

Which standards and agreements apply is in the same post on retention and compliance. With customer-managed keys, open the decryption log in your own key service at the end of the pilot and check each request.

Which access controls should you enforce before deploying AI email agents?

Enforce these in order, before the first consent click.

  1. Start in the read-only pilot, before you grant any write access.

  2. Compare the consent screen with the access you expect. Every permission is shown there before you approve it.

  3. Decide which mailboxes are in scope. In Exchange Online, a grant can be paired with a resource scope that names the mailboxes an app can access21.

  4. On Google Workspace, review the app's scopes. Where an app uses domain-wide delegation, Google's advice is to check its scopes periodically and remove scopes that aren't required or actively used17.

  5. Add write access only when you switch on removal. Quarantine mode adds a single permission to move malicious messages.

  6. Set up customer-managed encryption keys (CMEK) if you want key control. You hold the key in your own key management service.

  7. Test the way back once. Revoke the permissions in Microsoft Entra or the Google Workspace admin console, and access ends.

Run steps 1 and 2 before anyone opens the consent screen.

Which OAuth scope and permission boundaries apply at each stage?

Each row is one stage of access. The middle column quotes the product's live pages; the third column gives the platform's own rule for that kind of access.

StageWhat the product's live pages stateWhat the platform documents
ConsentEvery permission is shown on the consent screen before you approve itMicrosoft 365: an app-only app must get admin consent to access the resources
Read-only pilotList users and read mail for classificationMicrosoft Graph Mail.Read reads mail in all mailboxes without a signed-in user. Gmail's read-only scope views messages and settings11
Metadata onlyNot stated on a live product pageMail.ReadBasic.All reads all properties except body, previewBody, attachments and extended properties19. Gmail's metadata scope sees labels and headers, not the body12
Quarantine modeA single permission to move malicious messagesWhere an app holds Gmail modify, that scope has no permanent deletion that bypasses the trash
Mailbox scopeNot stated on a live product pageExchange Online pairs a grant with a resource scope that names mailboxes
Model trainingBenign mail never enters trainingGoogle bars training on user data beyond that user's personalized model
Encryption keyWith customer-managed encryption keys, you hold the key in your own key management serviceNot a platform setting
RevokeRevoke in Microsoft Entra or the Google Workspace admin console, and access endsEntra lets admins revoke granted permissions for the whole organization. Google advises removing scopes not in use

Copy the rows into your vendor record and mark the stage you approve.

How AegisAI handles this

Access starts read-only. Quarantine mode adds a single permission to move malicious messages. Messages are read through the API, analyzed in memory and discarded. AegisAI supports customer-managed encryption keys (CMEK): you hold the key in your own key management service; AegisAI never possesses it.

Book a demoSee inbound email security

See your own records: Check your domain.

How to measure it in 30 days

Track three numbers for the connection.

  • Permissions granted against permissions you expected, from the app's permissions page in Entra ID or the app's access page in the Google Workspace admin console.
  • Days in the read-only pilot before quarantine mode, from your change log.
  • Days since the last revoke test, from your change log.

To see the consent screen for your own tenant, walk through a connection with the team. Review the three numbers on day 30 and remove any permission nobody can explain.

Questions people ask

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

It is safer when access starts read-only and an admin can revoke it. AegisAI's inbound email security page states: "Starts read-only. Runs in monitoring mode first. Removal needs write access your admin grants and can revoke." Revoke the permissions in Microsoft Entra or the Google Workspace admin console, and access ends.

Is my normal business mail used to train models?

No. Emails classified as benign stay in the inference pipeline and never enter training. They are processed in memory and discarded.

How long is a quarantined message kept?

At most 48 hours. In quarantine mode, the original copy of a quarantined message is held for that long to carry out the quarantine. Threat history stays in the console for 90 days by default.

Does connecting the AI agents change mail routing?

No. The inbound page states mail is read through the Microsoft 365 or Google Workspace API after delivery, with no change to mail routing (MX records).

What happens to stored data after I revoke the key?

It becomes unreadable at once. With customer-managed encryption keys, revoking access to the key makes all stored data unreadable, and every decryption request is logged in your own environment.

Sources

  1. (AegisAI Blog, email security and mail flow, 23 October 2026)
  2. (AegisAI Blog, Data retention, encryption and compliance, 27 October 2026)
  3. (AegisAI Blog, Can I trust AI agents inside my inbox, 21 October 2026)
  4. (AegisAI, Inbound email security, read 14 November 2026)
  5. (AegisAI, Is it safe to give an email security vendor API access to our mailboxes, 12 November 2026)
  6. (Microsoft Learn, Review permissions granted to enterprise applications, 6 March 2025)
  7. (Microsoft Learn, App-only access primer, 21 May 2025)
  8. (Microsoft Learn, Microsoft Graph permissions reference, 14 September 2026)
  9. (Microsoft Learn, Role Based Access Control for Applications in Exchange Online, 21 August 2026)
  10. (Google Workspace Admin Help, Control API access with domain-wide delegation, 10 November 2026)
  11. (Google for Developers, Choose Gmail API scopes, 10 September 2026)
  12. (Google for Developers, Restricted scope verification, 10 November 2026)
  13. (Google for Developers, Google Workspace API user data and developer policy, 3 September 2026)

Recent posts

Every email, investigated.