locked
ASDK - Deploy SQL RP - Prompting for Credential RRS feed

  • Question

  • Trying to deploy SQL RP on the latest ASDK and am running into issue. Script prompts me enter the Tenant ID, Azure Stack Admin Management and Service Admin credential. Entered the valid credential isnt accepting it.

    VERBOSE: 1:40:13 PM : 
    VERBOSE: 1:40:13 PM : ************************
    VERBOSE: 1:40:13 PM : *Getting the parameters*
    VERBOSE: 1:40:13 PM : ************************
    Add-AzureRmAccount : user_realm_discovery_failed: User realm discovery failed: The remote server returned an error: (400) Bad Request.
    At D:\APPService\Prerequisites\Common\Common.psm1:75 char:18
    + ... azAccount = Add-AzureRmAccount -EnvironmentName $azEnvironmentName -C ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [Add-AzureRmAccount], AadAuthenticationFailedException
        + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand
     
    VERBOSE: Login successful. Looks like there is no Subscription for account: XXX@azurestack.local. Using https://adminmanagement.local.azurestack.external
     Admin 
                URL and (GUID)  DirectoryTenantID  
    Failed to verify account, please enter correct Tenant Directory ID, Azure Stack Admin Management url and Service Admin Account credential

    # For AAD, use the following
    $tenantID = Get-AzsDirectoryTenantID -AADTenantName "XXXX.onmicrosoft.com" -EnvironmentName AzureStackAdmin

    Tried With the Azure Stack admin:

    $AdminPass = ConvertTo-SecureString "***!" -AsPlainText -Force
    $AdminCreds = New-Object System.Management.Automation.PSCredential ("azurestackadmin@azurestack.local", $AdminPass)

    Tried with Azure Admin account:

    $AdminPass = ConvertTo-SecureString "***!" -AsPlainText -Force
    $AdminCreds = New-Object System.Management.Automation.PSCredential ("XXX@outlook.com", $AdminPass)

    Thanks


    Thursday, July 20, 2017 5:01 AM

Answers

  • Found the cause, the AAD login that i was using is Live Account. The issue is that the 'non-interactive' flow, that is log in without going through the login dialog is not allowed for live id credentials in Azure Active Directory...Hence the Add-AzureRmAccount  cmdlet was failing. 
    Thursday, July 20, 2017 7:59 AM

All replies

  • Found the cause, the AAD login that i was using is Live Account. The issue is that the 'non-interactive' flow, that is log in without going through the login dialog is not allowed for live id credentials in Azure Active Directory...Hence the Add-AzureRmAccount  cmdlet was failing. 
    Thursday, July 20, 2017 7:59 AM
  • Glad to know that your issue is resolved.
    Thursday, July 20, 2017 10:30 AM
  • Hello,

    I have the same issue with a connected scenario. How did you solve it?


    Here the output of my error:

     

    VERBOSE: 11:50:52 AM : ************************
    Add-AzureRmAccount : Sequence contains no elements
    At C:\Users\administrator.AZURESTACK\Downloads\AzureStackSql\Prerequisites\Common\Common.psm1:75 char:18
    + ... azAccount = Add-AzureRmAccount -EnvironmentName $azEnvironmentName -C ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [Add-AzureRmAccount], AadAuthenticationFailedException
        + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand

    VERBOSE: Login successful. Looks like there is no Subscription for account: xyz@outlook.es. Using https://adminmanagement.local.azurestack.external Admin 
                URL and xxxxxxxxxxxxxxxxxxxxx DirectoryTenantID  

    Failed to verify account, please enter correct Tenant Directory ID, Azure Stack Admin Management url and Service Admin Account credential

    I can see my subscription at Azure Portal, is the same user account that I've used to install AzureStack ASDK.

    Thanks in advance,

    Best regards,

    Friday, September 22, 2017 9:57 AM