Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support for Managed Identity

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
azure, python

Research direction

Start at the Azure CLI authentication entry point and review how the post-provisioning azd hooks obtain credentials for data-plane operations. Compare the current service-principal login with the requested managed-identity login, then run the template validation workflow against a managed identity; done means authentication succeeds and the hooks complete without permission errors.

Written by the indexing model from the issue text.

Description

Template validation action authenticates to Azure CLI using service principal, from logs:

az login --service-principal -u "***" --federated-token $AZURE_AD_TOKEN --tenant "***"

Logged in to Azure as (***)

[
  {
    "cloudName": "***",
    "homeTenantId": "***",
    "id": "***",
    "isDefault": true,
    "managedByTenants": [],
    "name": "***",
    "state": "Enabled",
    "tenantId": "***",
    "user": {
      "name": "***",
      "type": "servicePrincipal"
    }
  }
]

My template is currently using managed identity to authenticate with the template validation workflow. In this case, -u "***" is the client-id of a managed identity (as opposed to a service principal). az login succeeds, but there seems to be some issue with permissions. The managed identity has Owner permissions on the subscription being deployed to, but the validation is failing claiming that it is missing permissions. The particular location of this failure is within post-provisioning azd hooks. Here, the template is using the local identity (in the case of the validation action, the managed identity) to perform various data-plane operations on Azure.

Perhaps this is related to logging in as a service principal with a managed identity?

Regardless, could the template validation action support managed identity? I imagine that when managed identity authentication is enabled, the az login command would change to:

az login --identity --client-id "***" --federated-token $AZURE_AD_TOKEN --tenant "***"
Dominant language
Python
Stars
24
Forks
11
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/template-validation-action

All issues in microsoft/template-validation-action

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.