Sign-in instructions for the Azure Toolkit for IntelliJ
Once installed, the Azure Toolkit for IntelliJ provides four methods for signing in to your Azure account:
- Sign in to your Azure account with Azure CLI
- Sign in to your Azure account with OAuth
- Sign in to your Azure account with Device Login
- Sign in to your Azure account with Service Principal
Sign out methods are also provided.
Prerequisites
- A supported Java Development Kit (JDK). For more information about the JDKs available for use when developing on Azure, see Java support on Azure and Azure Stack.
- IntelliJ IDEA, Ultimate or Community Edition.
- The Azure Toolkit for IntelliJ. For more information, see Install the Azure Toolkit for IntelliJ.
Tip
To use all the latest features of Azure Toolkit for IntelliJ, please download the latest version of IntelliJ IDEA as well as the plugin itself.
Sign in to your Azure account with Azure CLI
Note
For more information on using Azure CLI to sign in, see Sign in with Azure CLI.
To sign in Azure with Azure CLI, do the following:
Open your project with IntelliJ IDEA.
Navigate to the left-hand Azure Explorer sidebar, and then click the Azure Sign In icon. Alternatively, you can navigate to Tools, expand Azure, and then click Azure Sign in.
In the Azure Sign In window, Azure CLI will be selected by default after waiting a few seconds. When the option is available, click Sign in.
In the browser, sign in with your account and then go back to IntelliJ. In the Select Subscriptions dialog box, click on the subscriptions that you want to use, then click Select.
Sign in to your Azure account with OAuth
To sign in Azure with OAuth 2.0, do the following:
Open your project with IntelliJ IDEA.
Navigate to the left-hand Azure Explorer sidebar, and then click the Azure Sign In icon. Alternatively, you can navigate to Tools, expand Azure, and then click Azure Sign in.
In the Azure Sign In window, select OAuth 2.0, and then click Sign in.
In the browser, sign in with your account and then go back to IntelliJ. In the Select Subscriptions dialog box, click on the subscriptions that you want to use, then click Select.
Sign in to your Azure account with Device Login
To sign in Azure with Device Login, do the following:
Open your project with IntelliJ IDEA.
Open sidebar Azure Explorer, and then click the Azure Sign In icon in the bar on top (or from the IntelliJ menu, navigate to Tools>Azure>Azure Sign in).
In the Azure Sign In window, select Device Login, and then click Sign in.
Click Copy&Open in Azure Device Login dialog.
In the browser, paste your device code (which has been copied when you click Copy&Open in last step) and then click Next.
Select your Azure account and complete any authentication procedures necessary in order to sign in.
In the Select Subscriptions dialog box, select the subscriptions that you want to use, and then click Select.
Sign in to your Azure account with Service Principal
Note
To create an Azure service principal, see Create an Azure service principal with the Azure CLI.
To sign in Azure with Service Principal, do the following:
Open your project with IntelliJ IDEA.
Open sidebar Azure Explorer, and then click the Azure Sign In icon in the bar on top (or from the IntelliJ menu, navigate to Tools>Azure>Azure Sign in).
In the Azure Sign In window, select Service Principal, and then click Sign In.
In the Sign In - Service Principal window, complete any information necessary (you can copy the JSON output, which has been generated after using the
az ad sp create-for-rbac
command into the JSON Panel of the window), and then click Sign In.In the Select Subscriptions dialog box, select the subscriptions that you want to use, and then click Select.
Sign out of your Azure account
After you have configured your account by preceding steps, you will be automatically signed in each time you start IntelliJ IDEA.
However, if you want to sign out of your Azure account, navigate to the Azure Explorer side bar, click the Azure Sign Out icon or from the IntelliJ menu, navigate to Tools>Azure>Azure Sign Out).
Next steps
To report bugs or request new features, create issues on our GitHub repository, or ask questions on Stack Overflow with tag azure-java-tools.
For more information about using Java with Azure, see the following links: