Git Product home page Git Product logo

Comments (5)

aricbernard avatar aricbernard commented on August 28, 2024

If I use the same command line, but I set the azureSubscriptionOwner equal to the AAD GLOBAL ADMIN ACCOUNT I used to install the Azure Stack, I will proceed further into the script. However, if after entering those same credentials when prompted, the script will error out as follows:

Select-AzureRmSubscription : Provided subscription does not exist
At C:\temp\Registerwithazure.ps1:112 char:1

  • Select-AzureRmSubscription -SubscriptionId $azureSubscriptionId
  •   + CategoryInfo          : CloseError: (:) [Set-AzureRmContext], ArgumentException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.SetAzureRMContextCommand
    
    

Get-AzureRmResourceProvider : No subscription found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Login-AzureRMAccount to login.
At C:\temp\Registerwithazure.ps1:115 char:15

  • ... egState = $(Get-AzureRmResourceProvider -ProviderNamespace 'microsoft ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [Get-AzureRmResourceProvider], ApplicationException
    • FullyQualifiedErrorId : Microsoft.Azure.Commands.Providers.GetAzureProviderCmdlet

Cannot index into a null array.
At C:\temp\Registerwithazure.ps1:115 char:15

  • ... egState = $(Get-AzureRmResourceProvider -ProviderNamespace 'microsoft ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : NullArray

Get-AzureRmResourceProvider : No subscription found in the context. Please ensure that the credentials you provided are authorized to access an Azure subscription, then run Login-AzureRMAccount to login.
At C:\temp\Registerwithazure.ps1:119 char:19

  • ... egState = $(Get-AzureRmResourceProvider -ProviderNamespace 'microsoft ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [Get-AzureRmResourceProvider], ApplicationException
    • FullyQualifiedErrorId : Microsoft.Azure.Commands.Providers.GetAzureProviderCmdlet

Note that the last error above appears repeat indefinitely (or at least for much longer than I wish to sit and watch hoping it stops).

from azurestack-tools.

aricbernard avatar aricbernard commented on August 28, 2024

As if with the second scenario (above), if I use the same command line, but I set the azureSubscriptionOwner equal to the AAD GLOBAL ADMIN ACCOUNT I used to install the Azure Stack, I will proceed further into the script. However, if when prompted for credentials I instead use the Azure subscription owners credentials I can proceed even further into the script processing. Although eventually it does still error out with the following:

Select-AzureRmSubscription : Provided subscription does not exist
At C:\CloudDeployment\Setup\Activation\Bridge\Register-AzureStack.ps1:97 char:17

  • ... scription = Select-AzureRmSubscription -SubscriptionId $SubscriptionI ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : CloseError: (:) [Set-AzureRmContext], ArgumentException
    • FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.SetAzureRMContextCommand

from azurestack-tools.

MatthewMcGlynn avatar MatthewMcGlynn commented on August 28, 2024

Rupi, can you confirm that this issue is now fixed in the latest version of the registration script?

from azurestack-tools.

rupisure avatar rupisure commented on August 28, 2024

Hi @aricbernard -- sorry, I am just seeing this. Did you eventually find success with the script?

The account specified as a parameter of the script needs to be a global admin of the aad tenant as well as a owner/contributor for the azure subscription. And the same account should be specified when prompted again in the script. (Can't use different creds in the second prompt) -- hope that helps!

from azurestack-tools.

MatthewMcGlynn avatar MatthewMcGlynn commented on August 28, 2024

Closing. Feel free to reopen if an issue occurs again!

from azurestack-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.