1. Resources
  2. Detection rules
  3. Federated Credential Added to a Managed Identity

Federated Credential Added to a Managed Identity detection rules

Someone adds a federated identity credential to a user-assigned managed identity, so tokens from an external identity provider they control can sign in as that identity without any secret.

Platform
Azure
Severity
High
Log source
Azure Activity log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Owner, Contributor, Managed Identity Contributor or a custom role that can write federated identity credentials on the user-assigned managed identity.
Impact
Durable, secretless access as the managed identity from outside the organization, with all of its Azure role assignments and directory permissions.
Response
Record the issuer, subject and audience of the credential and delete it, then reduce the identity's role assignments until its sign-ins since the change are reviewed.
Mitigation
Block federated credentials with Azure Policy on managed identities that do not need them, and restrict who can write managed identities.
Operation
MICROSOFT.MANAGEDIDENTITY/USERASSIGNEDIDENTITIES/FEDERATEDIDENTITYCREDENTIALS/WRITE
Threat groups
Storm-0501

How the attack works

A federated identity credential makes a user-assigned managed identity trust tokens from an external identity provider (the issuer) for a given subject, such as a GitHub Actions workflow, a Kubernetes service account or a workload in another cloud. A workload that presents a matching token receives a Microsoft Entra access token as the managed identity, with every role it holds, and no secret or certificate is involved.

An attacker with write access to a managed identity adds a credential that trusts an issuer and subject they control, for example their own repository or an OpenID Connect issuer they host. They can then obtain tokens for the identity from outside Azure, the identity does not need to be attached to any resource, and rotating secrets or resetting passwords does not remove the access. The change is recorded in the Azure Activity log as Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials/write; later token use appears in the managed identity sign-in logs.

What an attacker needs

  • Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials/write on the identity (Owner, Contributor, Managed Identity Contributor or a custom role).

Impact

Durable, secretless access as the managed identity from outside the organization, with all of its Azure role assignments and directory permissions.

Detection rules

Federated Identity Credential Added to Azure Managed Identity

Detects a successful creation or update of a federated identity credential on a user-assigned managed identity, which lets tokens from the configured external issuer and subject obtain access tokens as that identity.

LevelMediumStatusExperimentalLog sourceAzure Activity log
title: Federated Identity Credential Added to Azure Managed Identity
id: 97f6b123-e26d-4db1-a690-7f2aef54fc50
status: experimental
description: >-
  Detects a successful creation or update of a federated identity credential
  on a user-assigned managed identity, which lets tokens from the configured
  external issuer and subject obtain access tokens as that identity.
references:
  - https://attack.mitre.org/techniques/T1098/001/
  - https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation-create-trust-user-assigned-managed-identity
  - https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/identity
author: Forestall
date: 2026-11-10
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098.001
logsource:
  product: azure
  service: activitylogs
detection:
  selection:
    OperationNameValue: MICROSOFT.MANAGEDIDENTITY/USERASSIGNEDIDENTITIES/FEDERATEDIDENTITYCREDENTIALS/WRITE
    ActivityStatusValue:
      - Success
      - Succeeded
  condition: selection
falsepositives:
  - Setup of GitHub Actions, Azure DevOps or Kubernetes workload identity by platform teams; exclude their deployment identities in a filter_ selection by Caller and review the issuer of each new credential.
level: medium

False positives

  • Setup of GitHub Actions, Azure DevOps or Kubernetes workload identity by platform teams; exclude their deployment identities in a filter_ selection by Caller and review the issuer of each new credential.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Federated credential added, then the identity acts from an address it never used

Detection hypothesisSequence of eventsNeeds a baselineNeeds your own lists

With a federated credential, the token is obtained and used by a workload outside Azure, so what the identity then does in Resource Manager arrives from the address of that workload. Operations by the identity shortly after a credential was added, from an address that is neither one it used before nor one of your own runners or clusters, show the new trust in use.

  1. In the Azure Activity log, take the successful credential write of the rule on this page. The resource ID names the identity. Read the identity's principal ID from the identity resource.
  2. Over the next 7 days, take the Activity log events whose Caller is that principal ID. A managed identity is a service principal, and Microsoft's examples show the object ID in Caller when a service principal makes the request.
  3. Compare each CallerIpAddress with the addresses the identity used in the 30 days before the credential was added, and with the outbound addresses of your own runners, clusters and other workloads meant to use the identity.
  4. Report events from addresses outside both lists, starting with role assignment writes, key listings and credential writes.

EventsMICROSOFT.MANAGEDIDENTITY/USERASSIGNEDIDENTITIES/FEDERATEDIDENTITYCREDENTIALS/WRITE

LimitsHosted runners of CI services share address ranges that change, which makes the address list hard to keep. The Activity log has no read operations, and calls to Microsoft Graph or to data planes such as Key Vault are not in it. A new identity has no history to compare with. The 7 and 30 days are starting points.

Triage

  • Identify the Caller and the managed identity from the event, then read the new credential's issuer, subject and audience on the identity.
  • Decide whether the issuer and subject belong to a known pipeline or cluster; treat personal repositories and unknown issuers as suspicious.
  • Review the identity's role assignments and managed identity sign-ins since the change, and remove the credential if it is unexplained.

Response

Once the attack is confirmed:

  1. Record the issuer, subject and audience of the credential, then delete it from the identity. The three values identify the external workload that was trusted.
  2. Limit the identity while you investigate. Remove or reduce its role assignments and directory permissions until its sign-ins since the change are reviewed.
  3. Undo what was done as the identity since the credential was added, such as role assignments, credentials added to other identities, new resources and data access shown in its sign-ins and in the Activity log.
  4. Take write access to managed identities away from the caller, revoke its sessions and rotate its credentials. Contributor on the resource group of the identity is enough to add the credential again.
  5. Search the other user-assigned managed identities for federated credentials with the same issuer or subject, and for credentials added by the same caller.
  6. Confirm that the identity lists only the federated credentials you expect, and that its sign-in logs show no further sign-ins that you cannot tie to a known workload.

Mitigation

  • Block federated credentials on managed identities that do not need them with Azure Policy (Not allowed resource types for userAssignedIdentities/federatedIdentityCredentials), and restrict issuers with the built-in policy "Managed Identity Federated Credentials should be from allowed issuer types" (in preview).
  • Keep user-assigned managed identities least privileged and delete privileged identities that are no longer used.
  • Restrict who can write managed identities; Contributor on their resource group is enough to add a credential.

Frequently asked questions

Does this attack apply to system-assigned managed identities?

No. Microsoft documents that configuring a federated identity credential on a system-assigned managed identity is not supported. The operation exists for user-assigned managed identities, and the rule matches the write of a credential on those.

Does the managed identity have to be attached to a resource to be abused this way?

No. With a federated credential, a workload outside Azure that presents a matching token receives an access token as the identity. The identity does not need to be attached to any resource, and no secret or certificate is involved, so rotating secrets does not remove the access.

How do we tell a legitimate federated credential from a malicious one?

Read the issuer, subject and audience of the new credential on the identity. An issuer and subject that belong to a known pipeline or cluster, added by the platform team, is the normal case. A personal repository or an issuer nobody recognizes is suspicious, whoever the caller was.

Where does later use of the federated credential show up?

Token use appears in the managed identity sign-in logs, and what the identity then does in Azure appears in the Activity log under its principal. The rule on this page sees only the moment the credential is written, so review both logs from that time onward. The Detection logic section describes how to follow the identity in the Activity log.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.