Share via

The provided account MSI@50342 does not have access to subscription ID

Guillaume MANCERON 0 Reputation points
2025-10-22T19:09:32.7866667+00:00

Hello everyone,

I’m currently facing an issue while deploying my Azure HCI.

Here’s the error message I’m getting:

The provided account MSI@50342 does not have access to subscription ID “XXXXXXXXXX”. Please try logging in with different credentials or a different subscription ID. If a subscription is not specified, please check the configs by Get-AzConfig.

When I run Get-AzConfig, I can clearly see the element under DefaultSubscriptionForLogin.

For context, I’m running the latest version of Azure HCI, and I’ve also installed the latest version of Az.Accounts (5.3.0).

If I downgrade to version 4.0.2, the deployment fails even earlier in the process, so I don’t believe that’s the right solution.

I’d really appreciate any help or guidance on this issue.

Thanks in advance! Guillaume

Azure Local

3 answers

Sort by: Most helpful
  1. Woods, Shawn 10 Reputation points
    2025-10-24T20:29:52.0866667+00:00

    I got mine to work. Here are the steps I took. Got me through the verification. Now it is deploying. Hope this helps you.

    #Uninstall all Az modules
    Get-Module -ListAvailable | where {$_.Name -like "Az.*"} | Uninstall-Module -Force
    # Then I went back in the release notes and found wich release of the Az modules had Az.Accounts 4.0.2 and installed this
    Install-Module -Name Az -RequiredVersion 13.2.0
    # Uninstalled Az.Resources 7.8.1
    Uninstall-Module az.resources -RequiredVersion 7.8.1
    # Then made sure these versions of the modules were installed
    install-module Az.Resources -RequiredVersion 7.8.0
    install-module Az.Accounts -RequiredVersion 4.0.2
    Install-Module az.storage -RequiredVersion 8.1.0 
    
    
    
    2 people found this answer helpful.
    0 comments No comments

  2. Christoffer Klarskov Jakobsen 25 Reputation points
    2025-10-27T18:51:36.5866667+00:00

    I have worked on this issue on a stack and have worked together with Microsoft to fix the issue. We encountered multiple issues, so I have collected all the issues we came across and written about it.

    I have published all the different steps we took to resolve it on my webpage:
    https://www.chkja.dk/2025/10/27/azure-local-exception-caught-in-test-azstackhciarcintegration-validator/

    0 comments No comments

  3. Jilakara Hemalatha 12,660 Reputation points Microsoft External Staff Moderator
    2025-10-22T19:59:35.6033333+00:00

    Hi Guillaume MANCERON,

    The error message indicates that the account MSI@50342 does not have the necessary permissions to access the specified subscription. While some guidance suggests downgrading the Az.Accounts module to version 4.0.2, in your case this caused earlier failures, so let’s verify both the module consistency and account permissions.

    Note: Ensure that only the correct module versions are installed on all nodes. Having multiple or mismatched versions of the Az modules may cause authentication or subscription access issues (Az.Resources 7.8.0 and Az.Accounts 4.0.2)

    Verify the version of Az.accounts PS module installed on the nodes of the cluster.

    Get-InstalledModule az.accounts -Allversions
    

    If any other version apart from 4.0.2 is installed on the nodes follow the below steps:

    Uninstall all the versions of az.accounts on the nodes

    uninstall-Module az.accounts  -allversions
    

    Install version 4.0.2 on the nodes.

    install-Module az.accounts -RequiredVersion 4.0.2
    

    Then, verify with below command

    Get-InstalledModule -Name Az.Accounts -AllVersions
    

    To resolve the issue, please ensure the correct account and permissions are in place by following these steps:

    1. Verify Subscription and Account:
      • Log in to the Azure Portal with the account you're using for the deployment.
      • Confirm that you are in the correct tenant and subscription. If you have multiple subscriptions, make sure the one you've specified for the deployment is the active one.
    2. Assign Required RBAC Roles:
      • Navigate to the subscription in the Azure Portal.
      • Go to Access control (IAM).
      • Click + Add to add a role assignment.
      • Assign the Contributor or Owner role to the account or service principal used for the deployment. The Owner role provides full control and is often necessary for registration. If you're using a service principal (the MSI), make sure to select it as the member.

    After these steps, retry the Azure Stack HCI deployment and the validation process.

    Please find related official documentations for reference:

    https://learn.microsoft.com/en-us/azure/azure-local/deploy/deployment-arc-register-server-permissions?view=azloc-2508

    https://learn.microsoft.com/en-us/azure/azure-local/manage/assign-vm-rbac-roles?view=azloc-2508

    Once Arc integration is completed and the account has proper permissions, you should be able to proceed with the deployment successfully.

    Hope this helps! Please let me know if you have any further queries.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.