Azure API Management flaw: what to rotate now
An exploited flaw in Azure API Management Classic exposed secrets, and Microsoft's fix does not revoke them. Which tiers, what to rotate and what to check.
By Shaheer Q. · · 13 min read

If you run Azure API Management on a Classic tier (Developer, Basic, Standard or Premium), assume the secrets stored in it are in someone else's hands and rotate them. Microsoft has confirmed that an attacker could use a flaw in the service to read secrets stored in Classic instances, and Norway's National Security Authority (NSM) says the flaw was used against Norwegian organisations, Equinor and Skagerak Energi among them. Microsoft closed the hole on 19 November. Its own advisory says the fix "does not automatically invalidate credentials that may have been accessed before the fix was deployed."
So the platform side is done, and the rest is yours to do: rotating each secret at the system that issued it, then checking what those secrets could reach.
What Microsoft has said
BleepingComputer quotes the advisory as saying Microsoft identified the issue on 18 November 2026 and deployed a mitigation the next day. "Our investigation found that customers were exposed and an unauthorized party could have used the issue to access secrets stored in Azure API Management Classic instances before Microsoft identified the security issue."
On what was wrong, Microsoft told BleepingComputer the issue "allowed unauthorized access to certain management functionality when APIM Classic instances were not configured according to recommended security best practices," and that this access "could have allowed attackers to perform administrative operations, including accessing secrets stored in the service."
On the fix: "This remediation blocks the unauthorized management-plane access path that could allow an actor to perform administrative operations, including secrets management, against Azure API Management services. However, it does not automatically invalidate credentials that may have been accessed before the fix was deployed." Microsoft says it also rotated keys and credentials that it controls "where appropriate". Customer secrets are left to customers.
Microsoft's instructions to customers, as BleepingComputer summarises them, are three: rotate potentially exposed credentials, investigate suspicious activity in the systems those credentials can reach, and review available logs for unauthorised access.
There is no CVE, no CVSS score and no entry in Microsoft's Security Update Guide that I could find. Microsoft has also not said how many customers were affected.
What may have been exposed
From the advisory, as BleepingComputer reports it:
- secrets stored in named values;
- client secrets for identity providers;
- client secrets for OpenID Connect providers;
- subscription keys;
- tokens used to call the direct management API.
Named values are where many teams keep backend API keys, connection strings and tokens that policies inject into requests. That is why the advice is to look past API Management itself: a stolen named value is a key to whatever system it belongs to.
NSM's description of the attacker is short: "En ukjent aktør har aktivt gått etter access tokens, secrets og named values i APIM." In English: an unknown actor has actively gone after access tokens, secrets and named values in APIM.
Who is affected
| API Management tier | Affected? |
|---|---|
| Classic Developer | Yes |
| Classic Basic | Yes |
| Classic Standard | Yes |
| Classic Premium | Yes |
| Classic Consumption | No |
| All v2 tiers | No |
That list comes from Microsoft. A spokesperson told CSO: "We identified and fixed a security issue affecting the Developer, Basic, Standard and Premium tiers of Azure API Management (APIM) Classic. Azure API Management v2 tiers are not affected." BleepingComputer updated its story on 23 November with the same tiers, adding that Classic Consumption was not affected.
Microsoft adds a condition: instances that were "not configured according to recommended security best practices." It has not said publicly which settings those are. Reports of the advisory mention network integration and keeping secrets in Azure Key Vault instead of in API Management, but nothing more precise. I would not use that condition to decide you are safe. NSM does not: its advice applies to everyone running the service.
Check that your instance has the fix
Microsoft says the fix needed no customer action. NSM still asks organisations to check, and gives a way to do it. Open this address on your gateway and read RuntimeVersion:
https://<your-gateway-hostname>/internal-status-0123456789abcdef
- 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 patterns, such as
0.53.4608.0or0.52.4150.0: a v2 or Consumption instance, which NSM says is not vulnerable. - Anything lower: still vulnerable. NSM says to contact your provider directly.
BleepingComputer points out the gap between "required no customer action" and NSM's version check, and Microsoft has not explained it. Checking takes a minute.
What happened in Norway
NSM published its advisory on 20 November. Its key lines, in my translation:
- "Equinor og Skagerak Energi er blant virksomhetene som har blitt rammet." Equinor and Skagerak Energi are among the organisations that have been hit.
- "Alle som har Azure API Manager må ta utgangspunkt i at deres secrets og named values er på avveie." Everyone who runs Azure API Management must assume that their secrets and named values have gone astray.
- "Sårbarheten treffer flere sektorer i Norge og også utenfor Norges grenser." The vulnerability affects several sectors in Norway and beyond its borders.
- Martin Albert-Hoff, NSM's director of operational cyber security: "Det er fortsatt usikkert hvor omfattende utnyttelsen av sårbarheten er, og har vært." It is still uncertain how extensive the exploitation is, and has been.
NSM says the flaw was first discovered by the Norwegian energy sector and credits Equinor with early detection. It says it has no evidence so far that the attacks affected anyone's ability to deliver services.
Neither company mentions Azure in its own statements. Equinor's notice, first posted on 17 November at 18:55 CET, says it "detected an ongoing cyber-attack against certain IT systems". On 18 November it added that "this is not a virus attack". On 19 November it said the attack "does not appear to be specifically targeting Equinor". On 20 November at 08:55 CET it said the attack "has now been stopped", with "no indication that data has been stolen or altered", and that it had been reported to the police. Skagerak Energi reported an attempted attack that, it says, did not affect operations, with no sign that information was taken.
One detail in that timeline is worth noticing: Equinor was fighting the attack on 17 November, a day before Microsoft says it identified the issue.
What the access path probably was, and why that is not confirmed
Microsoft has not published a root cause. All it has said publicly is "a management-plane access path" and "certain management functionality".
An administrator on Reddit, quoted by BleepingComputer, claimed their organisation found the problem after "someone logged into our keyvaults using a valid administrator token". The administrator also alleged that attackers used "a zero-day authentication bypass in a deprecated legacy API", and that this API "did not generate logs that customers could use." BleepingComputer says it has not verified these claims. The thread would not load for me.
Here is what is documented. API Management Classic has a direct management API, a per-instance endpoint at <instance>.management.azure-api.net that came before Azure Resource Manager. Microsoft Learn says it "is disabled by default but can be enabled in the Premium, Standard, Basic, and Developer tiers". That is exactly the list of affected tiers. Microsoft retired it on 15 March 2025, and the retirement page says that "if it's enabled in your API Management instance, you should disable it." It authenticates with a shared access signature rather than Entra ID. The independent consultant Anders Kristiansen notes that its calls "aren't recorded in the ARM Activity log."
The advisory's own list of exposed items includes "tokens used to call direct management APIs." Put together, the deprecated API is the obvious suspect. But that is my inference from public documents, and Microsoft has not confirmed it. Turn the API off anyway, because Microsoft told you to in March 2025.
What to do, in order
1. Check the runtime version
Use NSM's check above on every Classic instance, in every subscription. If any instance shows a lower version, contact Microsoft before doing anything else.
2. Turn off the direct management API
In the Azure portal, open the instance's Management API page and set the option that enables the REST API to No. Microsoft's retirement page links an open-source tool, api-management-discover-direct-management-api-status, that finds instances where it is still on. Check that nothing you run still calls it first, although after March 2025 nothing should.
3. Rotate every secret, at its issuer
This is the step that matters. Microsoft's Tech Community post of 21 November, "Rotating credentials in Azure API Management", gives the order:
- Create the replacement at the issuer, such as the backend service or identity provider.
- Update API Management with the new secret.
- Test your APIs.
- Revoke the old secret.
Microsoft's own line: "Updating the value in API Management doesn't revoke the old credential at its issuer." If a stolen backend API key is still valid at the backend, rotating the named value in API Management changes nothing for the attacker.
What to rotate, from that post and the advisory:
| Credential | How (from Microsoft's post) |
|---|---|
| Subscription keys | Move callers to the secondary key, regenerate the primary, test, move callers back, then regenerate the secondary. Do every subscription, including the built-in all-access one. |
| Named values with secrets | For Key Vault-backed values, put the new secret in Key Vault, update any version-pinned reference, then refresh the named value. For values stored in API Management, replace them, after rotating the secret at its source. |
| Backend credentials (headers, query parameters, client certificates) | Create the new credential at the backend, update API Management, test, revoke the old one. |
| OAuth 2.0 and OpenID Connect client secrets | Add a new client secret to the app registration in Entra (or your identity provider), update API Management, test sign-in, delete the old secret. |
| Connection strings (for example Event Hubs loggers) | Switch the logger to the secondary key, confirm events still arrive, then regenerate the primary. |
| Secrets written into policies | Move them into Key Vault-backed named values, then revoke the old ones. |
| Direct management API keys | Regenerate both tenant access keys. Microsoft's post includes az rest calls for tenant/access/regeneratePrimaryKey and regenerateSecondaryKey. |
The post has an Azure CLI and a PowerShell command for each row. It also tells you to look for subscriptions, users, policies or backends that you did not create, which is worth doing while you are in there.
4. Check the systems behind the secrets
NSM's advice is to map what information sits behind each API Management instance, so you know how far a stolen secret reaches. For every backend, identity provider and Key Vault an instance had credentials for, look at that system's own logs from mid-November onward for access you cannot explain. The Reddit administrator's account started with Key Vault reads under a valid token.
5. Report it if you find something
If you are in Norway, NSM asks organisations that see signs of compromise to contact it (cert@ncsc.no, phone 02497). Elsewhere, contact Microsoft support and your national CERT.
How to look for misuse
Microsoft has not published detection guidance. Anders Kristiansen, an independent Azure security consultant, published a hunting guide on 21 November. These checks come from it, not from Microsoft:
- In
AzureActivity, look for API Management operations containing/namedvalues/listvalue/action,/subscriptions/listsecrets/action,/tenant/listsecrets/actionand/identityproviders/listsecrets/action(secrets being read), and/policies/write,/namedvalues/write,/users/writeand/portalsettings/write(configuration being changed). - In gateway logs, look for subscription IDs you have not seen before.
- In
AADServicePrincipalSignInLogs, look for sign-ins from new IP addresses by apps whose secrets API Management held. - In Key Vault audit logs, look for secret reads that do not come from the API Management managed identity.
He also lists IP addresses and a user agent (curl/7.88.1), credited to a Wiz advisory that needs a login and that I could not read. In his words, "These are shared with legitimate traffic, so treat a match as suspicious only together with the behavior."
Two cautions from the same guide. "No match isn't proof of safety": check that each log was turned on and kept for the whole period. And if the direct management API was the path, its calls would not show in the Activity log at all. That is why the advice is to rotate first and investigate second, not the other way round.
Make the next one smaller
These come from Microsoft's own docs and post:
- Keep secrets in Key Vault, not in API Management. Microsoft Learn: "We recommend using key vault secrets because they help improve API Management security." Use a secret identifier without a version so rotation flows through automatically.
- Use managed identities instead of keys and connection strings wherever the backend supports them. With a managed identity, there is no secret to steal.
- Treat policy editors as secret readers. Microsoft Learn warns that anyone who can edit policies can read the contents of any named value, and tracing can expose Key Vault-backed values too. Review who has both.
- Plan the move to v2. The v2 tiers were not affected. Moving is a project, not a fix for this incident, but it is the direction Microsoft is taking the service.
Not the same incident: Entra Connect Health
The same week, Microsoft confirmed a separate flaw in the Entra Connect Health API. According to BleepingComputer, it was introduced on 23 July, found by Microsoft on 9 November and fixed on 19 November. It exposed tenant metadata, such as technical contact email addresses and the tenant ID, but not passwords, hashes or tokens. It shares a fix date with the API Management issue, and no source links the two. If you received a Service Health notice about Connect Health, it is a different matter from MZK9-GH0.
What is still unknown
- The root cause. Microsoft has said "management-plane access path" and nothing more.
- When exploitation started. Microsoft gives no date. The only window I found is Kristiansen's "November 8 to 21", credited to the Wiz advisory I could not read.
- How many customers were affected, and whether Microsoft notified only those it believes were affected or every Classic customer.
- Which configuration protected an instance. Microsoft refers to "recommended security best practices" without naming the settings.
- Who did it. NSM says only "an unknown actor".
- Why NSM's version check is needed if, as Microsoft says, the fix required no customer action.
I will update this post when Microsoft publishes a root cause, a CVE or a post-incident review for MZK9-GH0, or when NSM updates its advisory.
The short version
- A flaw in Azure API Management Classic (Developer, Basic, Standard and Premium tiers) let an attacker read stored secrets. Classic Consumption and v2 were not affected.
- Microsoft fixed it on 19 November 2026. The fix does not revoke secrets already taken.
- Norway's NSM says it was used against Norwegian organisations, Equinor and Skagerak Energi among them, and tells everyone running the service to assume its secrets are exposed.
- Do now: check
RuntimeVersion, turn off the direct management API, rotate every subscription key, named value, backend credential and client secret at its issuer, then check the systems behind them. - Microsoft's rotation guide is "Rotating credentials in Azure API Management" on its Tech Community blog.
Frequently asked questions
Which Azure API Management tiers were affected?
The Developer, Basic, Standard and Premium tiers of API Management Classic, according to Microsoft. The Consumption tier of Classic and all v2 tiers were not affected. Microsoft says the issue allowed access to certain management functionality on Classic instances that were not configured according to its security best practices.
Do I need to do anything if Microsoft already fixed it?
Yes. Microsoft's fix, deployed on 19 November 2026, closed the access path but, in its own words, does not automatically invalidate credentials that may have been accessed before the fix. You need to rotate secrets that were stored in or reachable through the instance, at the system that issued them, and check the systems those secrets give access to.
What exactly may have been exposed?
Microsoft lists secrets stored in named values, client secrets for identity providers, client secrets for OpenID Connect providers, subscription keys, and tokens used to call the direct management API. Norway's National Security Authority advises everyone running the service to assume their secrets and named values have been exposed.
How do I check whether my APIM instance received the fix?
Norway's National Security Authority says to open https://<your-gateway-hostname>/internal-status-0123456789abcdef and read RuntimeVersion. A 0.52.x runtime is patched if x is 31936 or higher, and a 0.53.x runtime if x is 31938 or higher. Other patterns are v2 or Consumption instances, which are not vulnerable.