Skip to main content

Adding an Azure account with Read/Write access with a Single subscription using Automatic connection

Learn how to add Azure Single subscription read-write account using Automatic connection

To add an Azure subscription, you need permission to create service principals and assign roles in that subscription.

Step 1

Skip to Step 4 if you came to this guide from the Connect your Azure subscription page.

Navigate to the Account manager tab.

If you don't have any accounts yet, click the Add Environment button.

If you already have some accounts, click the Connect Account button.

Step 2

Choose Microsoft Azure.

Step 3

Select Single subscription.

Step 4

You will see the Connect your Azure subscription page. Fill in the form:

  • Account name – enter a name for the account (up to 32 characters).

  • Access mode – select Read/write. Read/write lets you use all features, such as converting to Spot, scheduling resources, removing unused resources and rightsizing. Read-only only lets you view your resources and possible actions.

  • Connection method – select Auto.

A Short guide with all the required steps appears under the connection method.

Step 5

Click Open Azure Cloud Shell, sign in to Azure if prompted, and switch the shell to PowerShell.

When you open Cloud Shell for the first time, you'll be prompted to create a storage account. You can create one automatically by clicking Create storage.

A Cloud Shell with a PowerShell terminal appears after the storage is created.

If PowerShell mode is not active, click Switch to PowerShell.

Step 6

In Uniskai, copy the Import command and run it in Cloud Shell. It loads the Uniskai setup module.

The command finishes silently – no output is expected.

Step 7

Find your Subscription ID in the Azure portal (Subscriptions → your subscription → Overview) and copy it.

Paste the Subscription ID into the Subscription ID field in Uniskai. Two commands are generated for your subscription: Setup connection and Setup cost exports.

Step 8

Copy the Setup connection command and run it in Cloud Shell. It creates the Uniskai application (service principal), creates and assigns the access role, and generates the connection config file uniskai-connection.json.

When the command finishes, the console shows the connection configuration and the message that uniskai-connection.json was created.

Note: Warnings about upcoming breaking changes in Az cmdlets are expected and can be ignored.

Step 9

Copy the Setup cost exports command and run it in Cloud Shell. It registers the Microsoft.CostManagementExports provider, creates a storage account and configures cost exports for the current month and the previous 12 months.

Wait until the command finishes. If an export can't be created on the first attempt, the console shows a retry message and tries again automatically – don't interrupt it.

Step 10

Download the config file. In Cloud Shell, click Manage files → Download.

Enter uniskai-connection.json and click Download.

Step 11

Go back to Uniskai, click Upload JSON and select the downloaded file (or paste its content into the JSON key file field).

Check that the JSON key file field is filled and click Connect.

Step 12

The account is connected. You can see it on the Account manager page.

Troubleshooting

1. If you see $0 in Uniskai billing after refreshing the account, please check that you have access to view Azure costs in this subscription. If you don’t see any values in Cost analysis or your export files have all cost columns equal to 0, ask your admin to enable policy to view Azure charges.

2. (SubscriptionNotFound) Subscription … was not found when creating the storage account. The Microsoft.Storage resource provider is not registered in that subscription. Run:

az provider register -n Microsoft.Storage --subscription <subscription-id> --wait

then run Step 9 again.

Did this answer your question?