Skip to content
  1. Home
  2. Articles
  3. From a Leaked Secret to Key Vault in Five Minutes (One Case): A Service Principal and Log Checklist from Microsoft's Report
113
Security

From a Leaked Secret to Key Vault in Five Minutes (One Case): A Service Principal and Log Checklist from Microsoft's Report

From a Leaked Secret to Key Vault in Five Minutes (One Case): A Service Principal and Log Checklist from Microsoft's Report

Microsoft reports one case where an agent went from searching GitHub for secrets to exfiltrating Key Vault data in five minutes. We read it as a checklist for service principals, logs and who can disable an app at 3am.

Imagine a Monday morning in which the development team tells you that the client secret of an Azure app was committed to a public GitHub repository last week, and has since been deleted. The team feels the matter is closed. As IT lead you still need four answers within the first hour: which Key Vaults can that app read, how far back do your logs go, who is allowed to disable the app, and when do the tokens already issued expire. The Microsoft Threat Intelligence report of 5 Nov 2026 makes those questions more pressing, because it describes agent tooling that searches GitHub for secrets and uses them against Azure.

This article reads that report as a checklist for the identity and logging side of Azure. Where secrets hide in repositories and pipelines, the order of actions on a leak and the secret register at handover are covered in our article on leaked secrets in repos and pipelines, so we will not repeat them here.


What the Microsoft report says, and what it does not prove

The report says attackers used agent tooling to find exposed secrets on GitHub, such as application credentials and API keys for AI services, and then used them against target organisations. It names ARTEX, which Microsoft describes as an agentic AI offensive framework. From August 2026, Microsoft says it observed an agentic framework submitting large volumes of queries to GitHub, often combining a target organisation's name with secret-related keywords and cloud service names.

The figure people quote most is the time. The report says that in at least one case an agent went from searching GitHub for client secrets to exfiltrating data from Azure Key Vault in five minutes. Note the words "at least one case". It is a single observed event, not an average speed. On our reading of the page, the clock starts when the agent searches for the secret, not when the secret first appeared in a repository. The report does not say how long the secret had been public before it was found.

The report also says that from 28 Oct 2026 valid application credentials were used to reach Entra ID tenants, with service principal sign-ins against dozens of applications across several tenants. The services touched include Key Vault, storage account keys, App Service settings and publishing credentials, AKS user credentials, AI and ML connections, Azure Resource Manager enumeration, VM Run Command, Azure DevOps secret searches, and Microsoft 365 through Graph.

Three things the report has not shown. Microsoft itself describes some indicators as unattributed or only potentially associated with the campaign, so we do not tie every event to ARTEX more firmly than the report does. The five minutes is one case. And everything rests on one vendor's own observations; from outside, you cannot count how many organisations were affected. That makes the report useful as a checklist and unsuitable as a benchmark for your own response speed.

Why the service principal secret is the thing to move away from

A client secret is a string that works from anywhere. Whoever holds it can sign in as the app. The report points out that an AADSTS7000215 error (invalid secret) or AADSTS7000222 (expired secret) suggests someone holds a credential for the app and is trying it, and that a failure followed by a success is urgent.

Microsoft's most direct recommendation is to migrate OAuth apps away from secret-based authentication and use managed identities where possible. The report argues this removes the possibility of a secret being exposed in code. The Microsoft Learn page on managed identities, which we opened on 12 Nov 2026, says much the same: an app obtains Microsoft Entra tokens without managing credentials, and the credentials are not even accessible to developers.

So how does a service principal differ from a managed identity? A managed identity is assigned to an Azure compute resource such as a VM, App Service or AKS. When enabled, Entra ID creates a service principal of a special type for it. You still have a service principal; what disappears is the secret you would otherwise issue, rotate and store. There are two kinds: system-assigned, tied to the lifecycle of one resource, and user-assigned, a standalone resource that several resources can share, as the Learn page describes.

We think this is the right place to start because every other measure in the report, rotation, log review, disabling the app, works after the event. Moving to a managed identity reduces what can leak in the first place. An app without a secret leaves nothing for an agent to find on GitHub.

Blast radius: what can this app read?

The list of services in the report doubles as a list of questions to answer in writing before an incident. Microsoft recommends least privilege for service principals: review Azure RBAC assignments and restrict them to the resources and operations needed. In our view that review should answer three things per app.

  • Does the app hold rights at subscription, resource group or single-resource level?

  • Which Key Vaults can it read? The report says to rotate everything stored in any Key Vault the affected app could read.

  • Can it reach storage account keys, App Service settings or VM Run Command, all of which the report says were used?

If you cannot answer these on an ordinary day, you will be working through each resource one at a time during an incident, and the rotation scope will be wider than necessary because nobody dares leave anything out.

Which logs must exist before the day

The report is fairly specific. Review Entra service principal and non-interactive sign-in logs, including failures; Azure Activity logs; Key Vault and Storage diagnostics; Entra audit logs; Azure DevOps audit logs; and the Microsoft 365 unified audit log. It also says to turn on Azure DevOps auditing if it is off. We suggest asking your team, for each log, whether it is enabled, where it is sent and who reads it. The report does not give default settings for these logs, and we cannot confirm them.

It also recommends hunting by behaviour rather than by IP address alone, because attackers can change IPs and user agents. Its examples: one address authenticating to three or more service principals with mixed success and failure, or one app requesting tokens across ARM, Key Vault, Storage and Graph in a short window. Queries like these only work if the logs are detailed enough and kept long enough.

On retention, the report says to search as far back as retention allows and gives no number of days. We think the figure should come from one question: how far back would you need to go to say when that secret was first used? If a secret sat in a repository for months, a few weeks of logs cannot answer that. Legal minimums are a separate question for your counsel. We cover logs and audit evidence in our article on log retention and audit trails.

Who can disable an app at 3am

The containment steps in the report need someone with authority to act: remove all client secrets, certificates and federated credentials from the affected app, including any the attacker added; disable the service principal if needed; then rotate everything stored in any Key Vault the app could read, plus any credentials found in documents it accessed.

The question is about people, not technology. Does every app have a named owner? Does the on-call person at 3am have the right to disable a service principal, or must they wait for approval? Who decides whether disabling an app that production depends on is worth the risk? Roles and decision rights during an outage are covered in our article on roles and decisions during an outage, and the same logic applies here.

Also note apps configured by an outside provider. If the app registration or its credentials sit with a contractor who is about to be replaced, the real owner of the secret may not be who you think. We discuss access handover in our article on cloud access during a vendor transition.

One detail means disabling the app is not the end. The report warns that tokens already issued remain valid until they expire. Removing the secret stops new tokens; it does not recall old ones. The report does not state token lifetimes, so we cannot give a number. Check the setting in your own tenant and keep watching logs at least until that window has passed.

Where Conditional Access for workload identities does not reach

Microsoft suggests Conditional Access for workload identities to block sign-ins from a named location, assigned directly to service principals. The report states two limits itself: it requires Workload ID Premium licensing, and it covers only single-tenant apps registered in your tenant.

The second limit has practical effect. The report describes a multitenant app that was compromised at the vendor's source and then used against downstream tenants. On Microsoft's wording, an app registered on the vendor's side is outside the scope of this policy. Before you rely on it, check with Microsoft or your partner whether the apps you actually run fall inside it. We would not infer that from one report.

IP blocking also has a ceiling. Microsoft advises blocking the exact address rather than the whole ASN, and says itself that attackers change IPs, user agents and other fingerprints. Conditional Access closes known paths; it does not replace logging or having no secret to leak.

Two controls in the report do not depend on IP: app management policies, such as restricting new user-provided app passwords and enforcing a maximum lifetime for secrets, and Defender for Cloud plans on critical workloads such as Resource Manager, Storage, Key Vault, App Service and Databases. We see these as working at the app and the resource, so they do not rely on which IP the attacker uses.

Limits we should state plainly

The biggest limit is the evidence base. The report rests on cases Microsoft observed itself, and the five-minute case is one of them. If you cite it in a TOR or to executives, write that Microsoft reported one case. Do not write that attacks take five minutes, and do not set a five-minute response target on the strength of that number.

The checklist is also not equally worth doing for everyone. If your organisation runs mainly on another cloud, or has only a handful of Azure apps, the repo-side controls, secret scanning and push protection, which the report also recommends, will probably give you most of the value. Moving to managed identities and buying Workload ID Premium across the board may not pay off. Our advice then is to start at the repository, and look at what the few remaining Azure apps need afterwards.

And managed identities attach to Azure compute, as the Learn page explains. Apps that run outside Azure, or that are external SaaS, may not be movable immediately. Assess app by app.

Objections we often hear

A common one: we already deleted the secret from the repository, so why review logs and rotate? It is a fair question, because deletion is the first thing a team does and it feels like completion. But the report says to treat publicly exposed credentials as compromised even after the source is edited or deleted, because deletion does not invalidate the credential and copies can remain in edit history, caches, archives and logs. Log review is the only way to learn whether someone used the secret while it was public.

Where to start

If you have one hour on Monday morning, we suggest this order.

  1. List every service principal with its owner and the expiry date of each secret.

  2. Take the three apps with the broadest rights and answer which Key Vaults each can read.

  3. Check that service principal sign-in logs and Key Vault diagnostics are on, where they go and how long they are kept.

  4. Name the person who can disable a service principal at 3am, and write it in the on-call document.

  5. Set an app management policy for maximum secret lifetime, and pick one app that can move to a managed identity first.

If your critical apps are single-tenant and you hold or plan to buy Workload ID Premium, add Conditional Access afterwards as an extra layer.

Summary

Microsoft's report of 5 Nov 2026 does not hand you a response-time standard. It gives you questions: what can one secret reach, and who can see it being used. If you take one thing from this article, ask of every app whether, if its secret leaked today, you would know within the first hour what it can read and who can shut it off.

If you would like to talk through the details of a project, you can reach us at 088-983-9386 or [email protected]. Our office is in Bang Kapi, Bangkok. For organizations still drafting a scope of work, we are glad to arrange a conversation to understand the problem first, without needing complete documents. And if we find that the problem is not yet at the point of needing a new system, we will say so plainly, because starting a project at the wrong time costs more than waiting another quarter.

FAQ: Frequently Asked Questions about This Article

A collection of questions and answers to help you better understand the content of this article.

Tags:

Azure service principal securityKey Vault leaked secretmanaged identity vs service principalConditional Access for workload identitiesservice principal sign-in logsclient secret leaked GitHubAzure security checklist enterpriseagentic AI secret scanning
Share:

Other Articles

Stay tuned for upcoming articles!