Skip to main content
Tools Reference

Petra Security Tools

Written By Christopher Scaminaci

Last updated 7 days ago

Petra Security Tools

petra_ · 5 tools · Free 5 Identity threat detection and response for Microsoft 365, multi-tenant by default. The credential is an organization-scoped API key sent as a bearer against a fixed host, with no documented expiry. A 403 is ambiguous by design - either the request never reached the application or the tenant id sits outside the key's organization - and the error code in the body tells the two apart, while a 401 means the key is missing, invalid or deleted. Every tool is a Free read and none is destructive: the public API has no remediation, pause or scan-trigger endpoint to gate at Pro. The rate limit is 10 requests a minute per route. Paging is effectively absent - only the incident list takes a limit, default 100 and maximum 500, and there is no cursor, offset or total - so reach further back by moving the start date.

All connector tools · Petra Security setup guide

Security Events

ToolPlanAccessSummary
petra_get_failed_attacksFreeRead-onlyGet the BLOCKED-attack summary for one tenant: totals by country, by day and by attack type, plus the most-targeted users with the countries their attackers came from.
petra_list_incidentsFreeRead-onlyList identity-compromise incidents detected in Microsoft 365, newest first.

[Petra Security] Get the BLOCKED-attack summary for one tenant: totals by country, by day and by attack type, plus the most-targeted users with the countries their attackers came from. This is the client-reporting and QBR material — attacks that Petra stopped, as opposed to petra_list_incidents, which reports compromises that succeeded. It is an aggregate report, not a raw event list, so there is no paging and no per-event detail. tenantId is REQUIRED and only one tenant is covered per call; Petra allows 10 requests per minute on this endpoint, so a sixty-tenant sweep takes about six minutes. Get tenant ids from petra_list_tenants.

ParamTypeRequiredDefaultDescription
endDatestringnonullEnd of the reporting window. ISO date or date-time. Defaults to now.
startDatestringnonullStart of the reporting window. ISO date or date-time. Defaults to 30 days before endDate. A start later than the end is a 400.
tenantIdstringyesREQUIRED. The tenant to report on. Accepts EITHER a Petra tenant id or a Microsoft (Entra) tenant id, both from petra_list_tenants. A tenant outside your Petra organization is a 404.

[Petra Security] List identity-compromise incidents detected in Microsoft 365, newest first. OMIT tenantId to sweep every client tenant in the organization — that is the cross-tenant view most questions want ("what is live across my whole book right now?"). Each incident carries isLive, dwellTimeMinutes, remediationStatus, the affected user, and a url that deep-links into the Petra dashboard, so hand that url to a person for anything beyond the list row. remediationStatus values are SCREAMING_SNAKE (REMEDIATED, PARTIALLY_REMEDIATED, UNREMEDIATED, INCORRECT, LOCKED_AWAITING_PASSWORD_RESET, UNCOVERED_IN_BASELINING, REMEDIATED_PRIOR_TO_ONBOARDING, PEN_TEST, ATTACKER_RETAINS_PASSWORD). There is NO incident-detail endpoint and NO cursor: the forensic timeline is dashboard-only, and history deeper than one page is reached by moving startDate back, not by paging. Use petra_list_tenants for tenant ids and petra_get_failed_attacks for attacks that were blocked rather than successful.

ParamTypeRequiredDefaultDescription
limitintegernonullMax incidents to return (1-500). Defaults to 100.
startDatestringnonullOnly incidents on or after this instant. ISO date (2026-08-01) or date-time. Omit for no lower bound. Move this backward to reach history beyond one page — there is no cursor.
tenantIdstringnonullLimit to one tenant. Accepts EITHER a Petra tenant id or a Microsoft (Entra) tenant id, both from petra_list_tenants. OMIT it to return incidents across every tenant in the organization. A tenant outside your Petra organization is a 404.

Tenants & Billing

ToolPlanAccessSummary
petra_get_usageFreeRead-onlyGet the whole-organization Petra billing snapshot in ONE call: for every tenant, the service (Monitoring or Autopsy), billableStatus (Trial, Active, NFR or Deleted), totalLicensedUsers,…
petra_list_billable_usersFreeRead-onlyList the individual billable users for ONE tenant — the user-level detail behind the count petra_get_usage reports.
petra_list_tenantsFreeRead-onlyList every client tenant in your Petra organization.

[Petra Security] Get the whole-organization Petra billing snapshot in ONE call: for every tenant, the service (Monitoring or Autopsy), billableStatus (Trial, Active, NFR or Deleted), totalLicensedUsers, billableUsersThisMonth, proratingPercentageThisMonth and firstBillableDate. This is the monthly billing-reconciliation tool, and it is the fan-out-free alternative to petra_list_billable_users — prefer it whenever you need counts rather than the names behind them, because it covers every tenant without one call per tenant. Usage is a point-in-time snapshot, not a stream. PAUSED tenants are included here too, so filter on isPaused before counting. Enum casing is deliberately mixed across this response: service and billableStatus are TitleCase while incident statuses elsewhere are SCREAMING_SNAKE.

ParamTypeRequiredDefaultDescription
asOfstringnonullPoint-in-time date to report as of, in YYYY-MM-DD form. Defaults to today. Use it to reproduce a past month's billing snapshot.

[Petra Security] List the individual billable users for ONE tenant — the user-level detail behind the count petra_get_usage reports. Reach for it when a client disputes an invoice and you need names, not totals. Each user carries displayName, userPrincipalName, mail, accountEnabled and assignedLicenseSkuIds; a user is billable when that SKU list is non-empty and the account is not deleted. Unpaginated: the whole list comes back in one body. This is a one-tenant-per-call endpoint on a 10-request-per-minute budget, so it is the LAST tool to reach for across many tenants — use petra_get_usage for organization-wide counts instead.

ParamTypeRequiredDefaultDescription
tenantIdstringyesREQUIRED. The PETRA tenant id from petra_list_tenants (the petraTenantId field). Unlike the incidents and failed-attacks tools, this endpoint documents only the Petra id — the Microsoft tenant id is not documented here. A tenant outside your Petra organization is a 403 on this endpoint.

[Petra Security] List every client tenant in your Petra organization. Start here: the other tenant-scoped tools need an id from this list, and guessing one is refused. Each row carries BOTH id namespaces — petraTenantId (Petra's own) and microsoftTenantId (the Entra tenant GUID) — plus name, onboardingDate and isPaused. petra_list_incidents and petra_get_failed_attacks accept either id; petra_list_billable_users accepts only the Petra id. Deleted tenants are excluded, but PAUSED tenants ARE returned with isPaused set to true, so filter on that before reporting a tenant count. Takes no parameters and returns every tenant in one call.