Report an Incident Become a Partner Careers Contact
Book a Demo
Threat Research

Treat Every Secret As Stolen: Hunting Downstream Of The Azure API Management Classic Exposure

Heider Albadawi · Senior SOC Analyst 24 November 2026 9 min read
An Azure API Management Classic gateway box with red lines fanning out to four key-marked items — named values, IdP client secret, subscription keys and management API token — labelled "Rotate all", beside the headline "Treat every secret as stolen".

Last week an unknown attacker went after the secrets held inside Azure API Management. Microsoft found the issue on 18 November and closed the access path on 19 November. By then, Microsoft says, some customers had already been exposed. Norway's National Security Authority (NSM) has told organisations to assume every secret and named value in an affected instance is compromised. The fix needed nothing from you. Cleaning up afterwards needs a lot.

What happened

Azure API Management (APIM) is the service many organisations put in front of their APIs. It publishes them, applies policies, checks subscription keys and passes requests on to backend services. To do that it holds credentials: keys for the backends, client secrets for the identity providers behind the developer portal, and the values its policies reference.

From SecurityWeek's reporting and the NSM advisory (in Norwegian), the timeline is:

  • 17 November: an affected energy company reports an incident to the authorities.
  • 18 November: Microsoft identifies the issue.
  • 19 November: Microsoft closes the access path.
  • 20 November: NSM publishes its advisory and raises Norway's national cyber risk level. It warns that AI is speeding up exploitation attempts.
  • 23 November: the advisory is updated. Microsoft is notifying affected customers.

NSM says an unknown actor actively went after access tokens, secrets and named values in APIM. It says several sectors are affected in Norway and abroad, and that it is still unclear how widely the flaw was exploited. No CVE or technical root cause has been published. No indicators of compromise have been released, and no actor has been named.

Who is affected

Microsoft's statement, as reported, limits the exposure to APIM Classic tiers that do not follow Microsoft's documented security guidance. The v2 tiers are not affected. NSM adds that the Consumption tier is not affected either.

What was at risk

  • Named values. The key-value pairs that policies reference. They often hold backend API keys, connection strings and tokens.
  • Client secrets for identity providers. These are the Entra ID or Azure AD B2C app registrations behind developer portal sign-in.
  • Subscription keys. These are what your API consumers present to call your APIs.
  • Tokens for APIM's direct management API. This is the older management interface, which can change the instance itself.

Each of these opens something else. That is why treating the gateway as the only thing to check is the wrong instinct.

Step 1: confirm whether your gateway was patched

NSM gives a simple check. Browse to https://<your-gateway-hostname>/internal-status-0123456789abcdef and read the RuntimeVersion:

  • 0.52.x: patched if the last number is 31936 or higher.
  • 0.53.x: patched if the last number is 31938 or higher.
  • Other version formats belong to the v2 or Consumption tiers, which NSM says are not vulnerable.

If a Classic instance shows a lower number, raise it with Microsoft now. Also check Azure Service Health for a notification, by going into the portal directly. Do not follow a link in an email about this. An incident like this attracts lures that imitate the notification.

Step 2: rotate everything, in the right order

NSM's first instruction is to assume compromise and rotate all tokens and secrets. Doing it in a sensible order stops you from rotating a secret into a store an attacker can still read.

  1. Make sure the instance is patched (Step 1). Rotating before that only hands over the new secret.
  2. Inventory the named values. In each instance, list every named value and mark which are plain-text secrets and which are Key Vault references. A plain-text secret is in scope for this incident. For a Key Vault reference, rotate the secret in Key Vault and check who has read it (see the hunting below).
  3. Rotate at the source, not just in APIM. A backend API key has to be regenerated in the backend system. Pasting the same key back into APIM changes nothing.
  4. Rotate identity provider client secrets on the app registrations behind the developer portal. Delete the old credential rather than adding a new one next to it.
  5. Regenerate subscription keys, both primary and secondary, and tell API consumers. This will break integrations. Plan it with the application owners instead of discovering it in production.
  6. Regenerate the direct management API keys. If nobody uses that interface, disable it.
  7. Move plain-text named values into Key Vault references as part of the rebuild, so the next secret you store is not held in the gateway at all.

NSM's second instruction is just as important: map the data behind the instance. For each secret, write down what it opens and what that system holds. That list tells you where to hunt, and which other teams need to be told.

Step 3: hunt for use of what was taken

There are no published indicators, so you cannot hunt for the exposure itself. You can hunt for the secrets being used. The Microsoft Sentinel queries below are starting points to tune to your estate. Treat them as a reason to look, not a verdict.

1. Identity provider apps signing in from somewhere new

If a client secret for the developer portal's app registration was taken, it can be used to get tokens as that application. Baseline where each app normally authenticates from, then look for anything new since mid-November.

let apps = dynamic(["<app-id-1>", "<app-id-2>"]); // app registrations whose secrets sat in APIM
let baseline = AADServicePrincipalSignInLogs
  | where TimeGenerated between (ago(90d) .. datetime(2026-11-10))
  | where AppId in (apps) and ResultType == "0"
  | distinct AppId, IPAddress;
AADServicePrincipalSignInLogs
| where TimeGenerated > datetime(2026-11-10)
| where AppId in (apps)
| join kind=leftanti baseline on AppId, IPAddress
| project TimeGenerated, ServicePrincipalName, AppId, IPAddress, Location,
    ResourceDisplayName, ResultType
| order by TimeGenerated asc

Pay most attention to successful sign-ins against resources the app does not normally call.

2. Secrets read through the management plane

Whatever the original flaw was, an attacker who gets a management token can read secrets the normal way. These operations show up in the Azure activity log.

AzureActivity
| where TimeGenerated > ago(30d)
| where ResourceProviderValue =~ "MICROSOFT.APIMANAGEMENT"
| where OperationNameValue has_any ("listSecrets", "listValue", "namedValues/write",
    "identityProviders/write", "tenant/accessInfo")
| project TimeGenerated, Caller, CallerIpAddress, OperationNameValue,
    ActivityStatusValue, _ResourceId
| order by TimeGenerated desc

Your own pipelines and administrators will appear here. You are looking for a caller or IP address you cannot account for, especially in the days before 19 November.

3. Subscription keys used from new places

If gateway logs go to your workspace, look for subscriptions calling your APIs from addresses they have never used before.

let baseline = ApiManagementGatewayLogs
  | where TimeGenerated between (ago(60d) .. datetime(2026-11-10))
  | distinct ApimSubscriptionId, CallerIpAddress;
ApiManagementGatewayLogs
| where TimeGenerated > datetime(2026-11-10)
| join kind=leftanti baseline on ApimSubscriptionId, CallerIpAddress
| summarize Calls = count(), Apis = make_set(ApiId, 20), First = min(TimeGenerated)
    by ApimSubscriptionId, CallerIpAddress
| order by Calls desc

4. Key Vault reads by the gateway's identity

Where named values are Key Vault references, check that only the APIM managed identity read them, and only from where you expect.

AzureDiagnostics
| where TimeGenerated > ago(30d)
| where ResourceProvider == "MICROSOFT.KEYVAULT" and OperationName == "SecretGet"
| summarize Reads = count(), Secrets = make_set(id_s, 20)
    by identity_claim_oid_g, CallerIPAddress, bin(TimeGenerated, 1d)
| order by TimeGenerated desc

Then do the same in every backend system the secrets opened. Those systems' own logs, such as database sign-ins, partner API dashboards and storage access logs, are where use of a stolen backend key will show up. APIM will not show it.

What we would do this week

  • Check every APIM instance in every subscription, including the ones a project team set up and forgot. Azure Resource Graph will list them in one query.
  • Patch check, then rotate, then hunt, in that order.
  • Write down what you rotated and when. If anything does turn up in the hunt, that record becomes the incident timeline.
  • Plan a move off Classic tiers if you can, and keep secrets in Key Vault rather than the gateway.

The wider lesson is one we have written about before: rotation isn't recovery. Changing a secret stops future misuse. It does not tell you what happened while the old one was valid.

How a managed SOC helps

The hard part of an incident like this is that the evidence is spread across systems that rarely sit together: Entra service principal sign-ins, the Azure activity log, gateway logs, Key Vault and whatever is behind the API. Our SOC runs Microsoft Sentinel at the core of the managed service. Connectors, parsers and analytical rules for the rest of the estate are built at onboarding, so those sources can be queried together rather than one portal at a time.

Analysts are on shift 24/7, a senior analyst signs off before a case is closed, and every investigation produces a full report. That report is what you want in hand when an auditor or regulator asks how you knew the secrets were not used.

If you have an APIM Classic instance and want an independent view of whether anything followed, a compromise assessment will answer it. Or book a demo to see how we would watch it day to day.

Threat ResearchAzure API ManagementMicrosoft AzureSecrets ManagementMicrosoft Entra IDService PrincipalsKQLMicrosoft SentinelCloud SecurityCredential Rotation

Ready to see the agents work?

Book a demo of CYBERSHIELD AI against a real scenario.