Connecting to Azure subscription using Azure Active Directory credential is a fairly simple process. One drawback, however is that you need to enter your credentials each time you start a new Azure PowerShell session, or every 12 hours if the session is kept open.
Note :{ To automate data center operations, entering credentials for each session might not be ideal. Therefore, consider using a publish settings file, as outlined in the next section, Connecting to Azure using a publish settings file,or consider using a management certificate (http://msdn.microsoft.com/en-us/library/azure/gg551722.aspx).}
Use the following steps to connect to Microsoft Azure using Azure Active Directory credentials:
1. Open Microsoft Azure PowerShell from the Start menu.
2. Use the Add-AzureAccount cmdlet by entering it in the Command Prompt and pressing Enter, as shown here:
3. When prompted, enter the e-mail address for the account used to manage Microsoft Azure and select Continue (the Microsoft account, using your e-mail address, used when creating an Azure subscription is automatically added to an instance of Azure Active Directory):
4. Enter the password for your account and select Sign in.
5. Once the sign-in is complete, the Command Prompt will indicate that the account has been added and will indicate which subscription has been selected, as shown here:
Note :: { If you have multiple Microsoft Azure subscriptions that you manage with the same Microsoft account, you can use the Select-AzureSubscription cmdlet to switch between subscriptions in the PowerShell session.}
Note :{ To automate data center operations, entering credentials for each session might not be ideal. Therefore, consider using a publish settings file, as outlined in the next section, Connecting to Azure using a publish settings file,or consider using a management certificate (http://msdn.microsoft.com/en-us/library/azure/gg551722.aspx).}
Use the following steps to connect to Microsoft Azure using Azure Active Directory credentials:
1. Open Microsoft Azure PowerShell from the Start menu.
2. Use the Add-AzureAccount cmdlet by entering it in the Command Prompt and pressing Enter, as shown here:
3. When prompted, enter the e-mail address for the account used to manage Microsoft Azure and select Continue (the Microsoft account, using your e-mail address, used when creating an Azure subscription is automatically added to an instance of Azure Active Directory):
4. Enter the password for your account and select Sign in.
5. Once the sign-in is complete, the Command Prompt will indicate that the account has been added and will indicate which subscription has been selected, as shown here:
Note :: { If you have multiple Microsoft Azure subscriptions that you manage with the same Microsoft account, you can use the Select-AzureSubscription cmdlet to switch between subscriptions in the PowerShell session.}