I am attempting to install Azure Stack HCI onto a Hyper V host following the steps provided by the official Microsoft documentation and a youtube video depicting a 23H2 deployment. When I get to the portion that registers the nodes with Azure I get the following results when i run this command:
$ARMtoken = (Get-AzAccessToken).Token
Get-AzAccessToken : Authentication failed against tenant XXXXXXXXXXXXXXXXXXXXXXXXXXX. User interaction is required. This may be due to the conditional access policy settings such as multi-factor authentication (MFA). If you need to access
subscriptions in that tenant, please rerun 'Connect-AzAccount' with additional parameter '-TenantId 703b43b4-97e4-4bca-9b08-0bc2d8b22e09'.
At line:1 char:14
+ $ARMtoken = (Get-AzAccessToken).Token
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzAccessToken], AzPSAuthenticationFailedException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.GetAzureRmAccessTokenCommand
I didn't have this issue when I performed this process a day or so ago. And I did what the error indicates and reran the cmdlet but I got the same results. Any suggestions?