> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neoagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Petra Security

> Let Neo agents read Petra Security's Microsoft 365 compromise incidents, failed attacks, posture reports and billable users for each client

Petra Security detects Microsoft 365 account compromises for your clients. Connect it once with an API key from your Petra organization, and Neo agents can read every client tenant in it.

## What Neo can do with Petra Security

* Add Petra's incident to a compromise ticket: the compromised user, when it happened, the remediation status, and the phishing email with the other mailboxes that received it
* Build the security section of a quarterly business review: the sign-in attacks that failed, where they came from, and the users most targeted
* List a client's top Microsoft 365 risks and suggested fixes from its latest posture report
* Compare Petra's billable users per client with what you bill, and name licensed accounts that are disabled

## Each ticket stays with its client

One Petra key reaches every client tenant in your organization. On a ticket that names a company, Neo sends a call only for the Petra tenant the ticket's company is mapped to. Reads across every client, such as usage for billing, go out only when the run has no ticket company: a chat with Neo, a scheduled agent, or a ticket that names no company.

## Your tenants are mapped to companies

Neo matches your Petra tenants to the companies in your PSA and keeps the mapping on the Petra Security card's **Organization Mapping** tab, refreshed on each PSA metadata sync.

Matching first uses the Microsoft tenant ID: a Petra tenant whose Microsoft tenant ID is the one Neo holds for a company is matched to it. Then it uses the tenant name: exact, then after stripping a legal-form suffix (Ltd, Inc, LLC). Last comes an AI match for the long tail.

**A Microsoft tenant ID match, a name that matches exactly one of your PSA companies, as it is or after stripping a legal-form suffix, and a match you confirm are handed straight to your agents.** A name two of your PSA companies share, or a name that matches a company another Petra tenant already matches, is left to the AI match, and an AI match waits for you on the Organization Mapping tab. Confirm or correct each there.

Anything Neo could not match stays unmapped and visible on the same tab, where you can set the right company by hand. A mapping you set by hand survives every later sync.

See [Petra Security API](/agents/tools/security/petra-api) for the permission groups.

## Next steps

<Card title="Connect Petra Security" icon="plug" href="/integrations/petra/connecting-to-neo">
  Create an API key and save it in Neo.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.