You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Using the following commands we can extract a User Assigned Managed Identity
The text was updated successfully, but these errors were encountered: