Integration Using Azure Portal

Prev Next

Method 2: Using Azure Portal

  1. Create Azure Service Principal: You can use Azure Cloud Shell (recommended) or your local Azure CLI:

    az ad sp create --id 4f2c2c1f-372a-4904-b13d-11e2467679f2

    Make note of the objectId of the newly created Service Principal — it will be needed later in step 3 as

    <servicePrincipalObjectId>.

  2. Assign RBAC to a custom Role

    • Go to Subscription → Access Control (IAM)

    • Select → Add → Add Custom Role.

    • Provide a suitable name (example: lucidity_autoscaler or lucidity_autoscaler_assessment )

    • Choose Start from scratch and Select Next

    • Skip to the JSON tab

    • On the JSON tab→ Click on Edit.

    • Replace the action section with Lucidity Custom Permissions action section in JSON (also provided in the Permissions section) and Click on Save

    • Complete role creation.

  3. Assign role just created to Service Principal

    • Fetch Service Principle

      SP_OBJ_ID=$(az ad sp list --all --query "[?contains(appId, '4f2c2c1f-372a-4904-b13d-11e2467679f2')].id" -o tsv --only-show-errors)

    • Fetch Role Just Created

      ROLE_DEF_ID=$(az role definition list --name "<Newly Created Role Name>" --query "[].name" -o tsv)

    • Assign Role to Service Principle

      az role assignment create --assignee-object-id "$SP_OBJ_ID" --role "$ROLE_DEF_ID" --scope "/subscriptions/subscription-id"

  4. After creation of Service Principle and Role Assignment, reach out to Lucidity with: Tenant-id, Subscription-id, Tenant-Name, Subscription-Name.