NetSPI / NetSPI/MicroBurst

Add User Assigned Managed Identity

Open
#26 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PowerShell
Stars
2.4k
Forks
340
PR merge metrics
No merged PRs in 30d

Description

Using the following commands we can extract a User Assigned Managed Identity

$UserAssignedIdentity =  Get-AzUserAssignedIdentity -ResourceGroupName $AutoAccount.ResourceGroupName -SubscriptionId $AutoAccount.SubscriptionId
$ClientId = $UserAssignedIdentity.ClientId
$apiVersion = "2017-09-01"
$headers=@{"secret"=$env:IDENTITY_HEADER}

# Querying the Graph API with a User ClientID
$userResponse = Invoke-RestMethod -Method Get -Uri "$($env:IDENTITY_ENDPOINT)?resource=https://graph.microsoft.com/&clientid=$ClientId&api-version=$apiVersion" -Headers $headers

# This response should give us a User Bearer Token for later use in Graph API calls
$useraccessToken = $userResponse.access_token

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

The issue provides PowerShell commands using Get-AzUserAssignedIdentity and the Azure identity endpoint. Start by locating the repository's Azure assessment scripts and checking where managed-identity tokens are obtained. Done means the relevant workflow supports a user-assigned identity and can use its Graph API token; no file or test is named.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.