azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Unable to enable System-Assign Managed Identity on VMSS

Open dretta opened this issue 1 year ago • 3 comments

Description

I am not able to enable the System-Assigned Managed Identity for Virtual Machine Scaling Sets. I have made a new VMSS (making me the owner of it thus having all permissions needed) and tried to enable the System-Assigned Managed Identity through the Portal and Azure PowerShell but both attempts fail.

This does not apply to the instances, individually enabling each VM still works.

f2815316-c818-4b6e-82ca-a7c247071df9 96d76102-e544-4338-be05-1b1689fc062f

Issue script & Debug output

PS C:\Users\danielretta> Update-AzVmss -ResourceGroupName myResourceGroup -Name myScaleSet -IdentityType "SystemAssigned"

Environment data

PS C:\Users\danielretta> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22621.3672
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.3672
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

PS C:\Users\danielretta> Get-Module Az*

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     3.0.0      Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear...
Script     8.0.0      Az.Compute                          {Add-AzImageDataDisk, Add-AzVhd, Add-AzVMAdditionalUnatten...
Script     7.1.0      Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDeny...

Error output

Update-AzVmss : The value 'SystemAssigned' of parameter 'identity' is not allowed. Allowed values are: UserAssigned,
None.
ErrorCode: InvalidParameter
ErrorMessage: The value 'SystemAssigned' of parameter 'identity' is not allowed. Allowed values are: UserAssigned,
None.
ErrorTarget: identity
StatusCode: 400
ReasonPhrase:
OperationID : 39667a5d-5391-4680-aa57-e5c413a49de0
At line:1 char:1
+ Update-AzVmss -ResourceGroupName myResourceGroup -Name myScaleSet -Id ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Update-AzVmss], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Automation.UpdateAzureRmVmss

dretta avatar Jun 25 '24 16:06 dretta

Hi @dretta I'll loop in the developers of the Az.Compute module but if you are experiencing issues both on Azure Portal and with Azure PowerShell, it's recommended to contact Azure support for a quicker response.

isra-fel avatar Jun 26 '24 18:06 isra-fel

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @TravisCragg-MSFT, @sandeepraichura.

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @TravisCragg-MSFT, @sandeepraichura.

@dretta Thanks for making this issue. Have you engaged with support, and are you still experiencing this issue?

TravisCragg-MSFT avatar Jul 08 '24 22:07 TravisCragg-MSFT

@dretta , Have you been able to engage with support, and are you still experiencing this issue?

Could you please also help us with the VMSS Orchestration mode for your VMSS? VMSS Flex only supports User managed identity at this time. https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-orchestration-modes#basic-setup

@TravisCragg-MSFT FYI

Kanik09 avatar Jul 22 '24 13:07 Kanik09

I was not able to resolve this issue. I spoke to my team about this and they recommended that I move forward with an User-Assigned Managed Identity. I'm not sure what prevented me from making a System-Assigned Managed Identity but I will not be needing one now.

dretta avatar Jul 22 '24 21:07 dretta