Method 2: Using Azure Portal
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-11e2467679f2Make note of the objectId of the newly created Service Principal — it will be needed later in step 3 as
<servicePrincipalObjectId>.Assign RBAC to a custom Role
Go to Subscription → Access Control (IAM)
.png?sv=2022-11-02&spr=https&st=2026-04-01T20%3A47%3A18Z&se=2026-04-01T20%3A58%3A18Z&sr=c&sp=r&sig=dRgYsxyaEv%2Bfc2TIIc9SpoVx8zLOSEpxYIHK2L3%2BWPY%3D)
Select → Add → Add Custom Role.
.png?sv=2022-11-02&spr=https&st=2026-04-01T20%3A47%3A18Z&se=2026-04-01T20%3A58%3A18Z&sr=c&sp=r&sig=dRgYsxyaEv%2Bfc2TIIc9SpoVx8zLOSEpxYIHK2L3%2BWPY%3D)
Provide a suitable name (example: lucidity_autoscaler or lucidity_autoscaler_assessment )
Choose Start from scratch and Select Next
.png?sv=2022-11-02&spr=https&st=2026-04-01T20%3A47%3A18Z&se=2026-04-01T20%3A58%3A18Z&sr=c&sp=r&sig=dRgYsxyaEv%2Bfc2TIIc9SpoVx8zLOSEpxYIHK2L3%2BWPY%3D)
Skip to the JSON tab
.png?sv=2022-11-02&spr=https&st=2026-04-01T20%3A47%3A18Z&se=2026-04-01T20%3A58%3A18Z&sr=c&sp=r&sig=dRgYsxyaEv%2Bfc2TIIc9SpoVx8zLOSEpxYIHK2L3%2BWPY%3D)
On the JSON tab→ Click on Edit.
.png?sv=2022-11-02&spr=https&st=2026-04-01T20%3A47%3A18Z&se=2026-04-01T20%3A58%3A18Z&sr=c&sp=r&sig=dRgYsxyaEv%2Bfc2TIIc9SpoVx8zLOSEpxYIHK2L3%2BWPY%3D)
Replace the action section with Lucidity Custom Permissions action section in JSON (also provided in the Permissions section) and Click on Save
.png?sv=2022-11-02&spr=https&st=2026-04-01T20%3A47%3A18Z&se=2026-04-01T20%3A58%3A18Z&sr=c&sp=r&sig=dRgYsxyaEv%2Bfc2TIIc9SpoVx8zLOSEpxYIHK2L3%2BWPY%3D)
Complete role creation.
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"
.png?sv=2022-11-02&spr=https&st=2026-04-01T20%3A47%3A18Z&se=2026-04-01T20%3A58%3A18Z&sr=c&sp=r&sig=dRgYsxyaEv%2Bfc2TIIc9SpoVx8zLOSEpxYIHK2L3%2BWPY%3D)
After creation of Service Principle and Role Assignment, reach out to Lucidity with: Tenant-id, Subscription-id, Tenant-Name, Subscription-Name.