Appearance
Sending audit logs to your monitoring
Phanera's four audit trails can be collected into your own monitoring platform — Microsoft Sentinel, Splunk, or anything that can poll a REST API. This page is the recipe.
Delivery is pull, not push. Your monitoring platform polls Phanera on a schedule you set; Phanera does not open connections outward to you. That is a deliberate boundary — there is no outbound egress path from the platform to an authority's network, and nothing to allow-list in your firewall. What it means in practice is that the collector is configured in your platform, not in Phanera.
What you can collect
| Endpoint | What it holds |
|---|---|
/api/v1/audit/access | Sign-ins — successes, failures, lockouts, SSO, emergency access — with address, IP and user agent |
/api/v1/audit/admin | Configuration changes: who changed a role, request type, template, pipeline or SSO setting, and to what |
/api/v1/audit/timeline | Case events across the whole organisation, flattened into one stream |
/api/v1/audit/record-access | Who opened a case, downloaded a document or exported a report |
Every material column of the underlying record is returned. Nothing is summarised or dropped for export.
Before you start
- In Settings → Integrations, create an OAuth client and copy the client id and secret. The secret is shown once.
- Confirm your organisation accepts OAuth (the same screen). If it accepts API keys only, the recipe below still works — replace the token step with an
X-Api-Keyheader.
The collection pattern
Whatever platform you use, the shape is the same:
GET /api/v1/audit/access
?sortAscending=true
&from={watermark}
&pageSize=100
&page=1
Authorization: Bearer {token}Then page forward while hasNextPage is true, and store the createdAt of the last entry you saw as the next run's {watermark}.
Three rules make this reliable. They matter more than the platform you choose:
- Always pass
sortAscending=true. The default is newest-first, which is right for someone reading the log on screen and wrong for a collector. Paging newest-first while entries are still being written shifts every later page down, so a collection run duplicates some rows and silently skips others. Oldest-first puts new entries after everything you have already walked. - Page until
hasNextPageis false. Do not calculate the page count fromtotalCount— new rows may arrive mid-run. - De-duplicate on
id.fromis inclusive, so resuming at your last-seen timestamp returns that entry again.idis stable, so discarding a repeat is trivial. Re-reading one row is the cheaper error than missing one.
Set the first run's watermark to however far back you want to backfill; leave from off entirely to take everything.
Microsoft Sentinel
Sentinel ingests REST APIs natively through the Codeless Connector Platform — no function app, no custom code.
Create a data connector with:
Authentication
| Field | Value |
|---|---|
| Type | OAuth2 |
| Grant type | client_credentials |
| Token endpoint | https://{your-host}/api/v1/oauth/token |
| Client id / secret | From Settings → Integrations |
| Content type | application/x-www-form-urlencoded |
Request — one connector per trail, or one with four paths:
| Field | Value |
|---|---|
| API endpoint | https://{your-host}/api/v1/audit/access |
| Method | GET |
| Query parameters | sortAscending=true, pageSize=100 |
| Query time format | ISO 8601 (yyyy-MM-ddTHH:mm:ssZ) |
| Start time attribute | from |
| End time attribute | to |
| Polling frequency | 5 minutes is ample; the trails are not high-volume |
Paging
| Field | Value |
|---|---|
| Paging type | Offset |
| Page size parameter | pageSize |
| Page number parameter | page |
| Has-next field | hasNextPage |
Response — the rows are under items. Map into custom tables (PhaneraAccess_CL, PhaneraAdmin_CL, PhaneraTimeline_CL, PhaneraRecordAccess_CL), taking createdAt as TimeGenerated.
Access-log fields worth mapping first, because they are what an alert rule will use: eventType, userName, email, ipAddress, userAgent, failureReason.
The eventType values
| Value | Means |
|---|---|
LoginSuccess / LoginFailed | A password sign-in, accepted or refused. failureReason says which refusal |
SsoLoginSuccess / SsoLoginFailed | The same through the identity provider |
SsoBypassLogin | An emergency-access account signed in with a password where everyone else must use SSO. The one line an auditor asking "did anyone go round the identity provider" is looking for |
AccountLockedOut | Locked after repeated failures, whether at the password or the second factor |
TwoFactorRequired | A correct password, with the second factor still outstanding. Not a failure — but a run of these with no sign-in following is what a compromised password looks like |
RecoveryCodeLogin | Signed in with a recovery code rather than the authenticator. Single-use and finite, so worth following up |
ApiTokenIssued | A machine credential exchanged its client id and secret for an access token. The anchor for whatever that integration did next |
ApiAuthFailed | An API credential was refused — a wrong client secret, a revoked or expired key, or a credential whose method the organisation has switched off. userName carries the credential's name |
Machine credentials share this trail with people on purpose: they reach the same caseload, so a rule written against sign-ins covers the API too, without anybody having to remember it separately.
A rule to start with — repeated authentication failures from one address, human or machine:
kql
PhaneraAccess_CL
| where TimeGenerated > ago(15m)
| where eventType_s in ("LoginFailed", "SsoLoginFailed", "ApiAuthFailed")
| summarize attempts = count() by ipAddress_s, bin(TimeGenerated, 15m)
| where attempts >= 10And one worth having — a password that works, stopping at the second factor and never getting past it:
kql
let challenged = PhaneraAccess_CL
| where TimeGenerated > ago(1h) and eventType_s == "TwoFactorRequired"
| summarize attempts = count() by email_s, ipAddress_s;
let arrived = PhaneraAccess_CL
| where TimeGenerated > ago(1h) and eventType_s in ("LoginSuccess", "RecoveryCodeLogin")
| distinct email_s;
challenged
| where attempts >= 5 and email_s !in (arrived)Splunk
Use the REST API Modular Input, or a scripted input running the pattern above.
- Endpoint
https://{your-host}/api/v1/audit/access - Auth: fetch a token from
/api/v1/oauth/token, present asAuthorization: Bearer …. Tokens last one hour — refresh on401rather than on a timer. - Response handler: emit each element of
itemsas an event; usecreatedAtas_time. - Checkpoint on the last
createdAt, feeding it back asfrom. sourcetype = phanera:audit:access, one per trail.
Anything else
The pattern is a loop. In outline:
bash
TOKEN=$(curl -s -X POST https://{host}/api/v1/oauth/token \
-d grant_type=client_credentials \
-d client_id="$CLIENT_ID" \
-d client_secret="$CLIENT_SECRET" | jq -r .access_token)
PAGE=1
while : ; do
RESP=$(curl -s -H "Authorization: Bearer $TOKEN" \
"https://{host}/api/v1/audit/access?sortAscending=true&from=$WATERMARK&pageSize=100&page=$PAGE")
echo "$RESP" | jq -c '.items[]' >> audit.ndjson
[ "$(echo "$RESP" | jq -r .hasNextPage)" = "true" ] || break
PAGE=$((PAGE + 1))
doneStore the last createdAt as the next WATERMARK. Run it as often as you like.
Retention, and why you may want this
Phanera keeps the in-product audit trail for the life of the organisation, so this is not a workaround for a short retention window. The reasons to collect it are to correlate Phanera events with the rest of your estate, to alert on them in the platform your SOC already watches, and to hold a copy under your own control that does not depend on the supplier still being here when somebody asks who saw a case in 2029.
What is not offered
Stated so you can plan around it rather than discover it:
- No push. No webhook on audit events, no syslog, no CEF, and no pre-built Sentinel or Splunk connector package to install — the connector is configuration you create from this page.
- No streaming. Polling only; the practical floor is a minute or so.
- No rate limit on the audit endpoints today, but do not design a collector that assumes none will ever exist. Poll on a sensible interval and page rather than requesting enormous pages. The token endpoint is limited — 20 calls a minute per IP — so fetch a token once and reuse it for its hour rather than getting a fresh one per request.
Related
- Public API Documentation — auth, paging, error model and guarantees in full
/api/v1/docs— the browsable endpoint reference- Settings → Integrations — where credentials are issued