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:
- 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.
- 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.