LogoLogo
HomePricingSelf-hosted docsAPI docsLogin
  • Home
  • Login to hava
  • Developer
  • Getting Started
    • Quickstart
      • Create New Account
      • Import Demo Data
      • Creating Environments
      • Exporting Diagrams
  • AWS Marketplace
  • Using Hava
    • Providers & Sources
    • Environments
      • Creating Environments
      • Filtering Environments
  • Importing Data
    • Demo Data
    • AWS
      • Getting Started with AWS
        • Cross Account Role
        • Read Only IAM User
        • Minimum Access IAM User
      • AWS Supported Resources
      • AWS Views
        • Infrastructure
        • Security
        • Container - ECS
        • List
    • Azure
      • Getting Started with Azure
        • Powershell
        • Azure Portal
      • Azure Supported Resources
      • Azure Views
        • Infrastructure
        • Azure Security View
        • List
    • Google Cloud
      • Getting Started with GCP
        • Service Account
        • Import Multiple Projects
        • Enabling APIs
      • GCP Supported Resources
      • GCP Views
        • Infrastructure
        • List
    • Kubernetes
      • Getting Started with Kubernetes
        • Read Only Kubeconfig
        • Automatic Import of Managed Kubernetes
          • AWS EKS Cluster Configuration
        • Converting certificate files to certificate data fields
      • Kubernetes Supported Resources
      • Kubernetes Views
        • Container
        • List
    • Import Errors
  • Discover
    • Importing
    • Searching
      • Search Overview
      • Search Syntax
        • VPC Search
        • Wildcard Search
        • Tag Search
        • Deep Search
      • Search Examples
        • Discover Resources From Regions
        • Create a multiple VPC diagram
        • Defining Custom Environments
    • Versioning
      • Tracking Changes in Cloud Architecture
    • Manual Sync
  • Diagram
    • Listing Environments
      • Filtering Environments
      • Favouriting Environments
    • Viewing Environments
      • Diagram Controls
      • Diagram Layout
      • Switch Between Views
      • Diagram Canvas Resource Filters
    • Draw Custom Connections
  • Diagnose
    • Architectural Monitoring Alerts
    • Attributes
    • Cost Estimation
    • Diff View - Comparing Diagrams
    • Infrastructure
      • View Route Tables
      • View ACLs
      • View Security Groups
    • Reports
      • AWS Compliance Reports
  • Document
    • Environment Notes
    • Embed
    • Exporting Diagrams
    • Edit
      • Draw.io
  • Collaboration
    • Teams
    • Inviting Users
    • Disabling users
    • SSO/SAML
      • Overview
      • Azure AD - SAML Setup
      • Azure AD - OIDC Setup
      • Okta - SAML Setup
      • Okta - OIDC Setup
      • Trouble Shooting SSO
    • Project folders
  • Integrations
    • AWS Control Tower
    • CLI
    • Confluence Cloud
    • GitHub
    • Terraform
  • API
    • API Docs
  • Account & Billing
    • Types Of Hava Accounts
    • Change Subscription
    • Switch to AWS marketplace
    • Change Password
    • MFA
    • Download Invoice
    • Cancel Account
    • Account Audit Log
  • Quick Look
    • Quick AWS Overview
    • Security Overview
    • Customize the Hava Dashboard
Powered by GitBook
On this page
  • 1. Launch Powershell
  • 2. Create Service Principal
  • 3. Assign Reader Role
  • 4. Create the Password
  • 5. Obtaining the Credentials
  • 6. Import in Hava

Was this helpful?

  1. Importing Data
  2. Azure
  3. Getting Started with Azure

Powershell

PreviousGetting Started with AzureNextAzure Portal

Last updated 2 years ago

Was this helpful?

Creating the required IDs and Keys to import into Hava should only take a couple of minutes. If you run into any trouble, feel free to reach out to us.

1. Launch Powershell

Open the Azure Portal and launch PowerShell from the top menu bar

2. Create Service Principal

You will need to create a new Service Principal from the command line and a display name. In the below code example, we’ve used HavaServicePrincipal you can edit and choose a name that suits you.

$sp = New-AzADServicePrincipal -DisplayName HavaServicePrincipal

3. Assign Reader Role

Hava only requires read-only access for most functionality. You can assign the read-only permissions to the Service Principal account using the below command.

If you would also like to automatically detect and import your public kubernetes clusters you can also add the Azure Kubernetes Service Cluster User Role.

New-AzRoleAssignment -ObjectId $sp.Id -RoleDefinitionName Reader
# This role is optional, but recommened for displaying AKS container views
New-AzRoleAssignment -ObjectId $sp.Id -RoleDefinitionName "Azure Kubernetes Service Cluster User Role"

4. Create the Password

Once you’ve created the Service Principal and assigned it with a Reader Role, you need to create password credentials to attach to the Service Principal.

The following example $endDate is set to expire in 2024. You can set the value to suit and update at a later date if required.

$startDate = Get-Date
$endDate = Get-Date -Year 2024
$creds = New-AzADSpCredential -StartDate $startDate -EndDate $endDate -ObjectId $sp.Id

5. Obtaining the Credentials

The final step required is to retrieve the necessary credentials to input into Hava.

Subscription ID:

(Get-AzContext).Subscription.Id

Tenant ID:

(Get-AzContext).Tenant.Id

Client ID:

$sp.AppId

Secret Key:

$creds.SecretText

One of the most common reasons we see an import fail due to an authentication error is pasting the credentials in the wrong input field or copied and pasting a trailing (space) when entering the IDs and Secret key. One we are guilty of too :)

6. Import in Hava

Once you've populated the input fields with the correct IDs, you can give the Source a familiar name. By default, Hava will use the Subscription ID, which you can update later under the source tab section.

Now hit the IMPORT button and you should start to see Hava importing and generating your automated Azure diagrams.

Create a new Service Principal in Azure
Azure Powershell Video Walkthrough