Lighthouse offer and Managed Identities permissions

Alessandro Pecci 20 Reputation points
2025-04-08T07:41:05.5633333+00:00

Hi,

I am trying to assign the Contributor role over a Lighthouse managed subscription to a System Managed Identity (an Automation account).

According to the documentation:

"The User Access Administrator role is supported, but only for the limited purpose of assigning roles to a managed identity in the customer tenant."

I have deployed Lighthouse using a template, and the UAA role definition looks like this:

{
          "principalId": "11111111-2222-3333-4444-555555555555",
          "roleDefinitionId": "18d7d88d-d35e-4fb5-a5c3-7773c20a72d9", 
          "principalIdDisplayName": "<DISPLAYNAME>",
          "delegatedRoleDefinitionIds": [
            "b24988ac-6180-42a0-ab88-20f7382dd24c",
            "f353d9bd-d4a6-484e-a77a-8050b599b867",
            "91c1777a-f3dc-4fae-b103-61d183457e46"
          ]
        }

Once deployed, the Role assignments looks like this:

User's image

Despite that, when I log in with that account and try to assign any role to a Managed Identity with

New-AzRoleAssignment -ObjectId "<MANAGED_IDENTITY_ID>" -RoleDefinitionId "b24988ac-6180-42a0-ab88-20f7382dd24c" -Scope "/subscriptions/<MANAGED_SUBSCRIPTION_ID>" -Debug

I get:

"The client '<DISPLAYNAME>' with object id '11111111-2222-3333-4444-555555555555' does not have authorization to perform action 'Microsoft.Authorization/roleAssignments/write' over scope '/subscriptions/<MANAGED_SUBSCRIPTION_ID>/providers/Microsoft.Authorization/roleAssignments/aba84cfe-5664-4ec0-b4af-3dbfd4fc0403' or the scope is invalid. If access was recently granted, please refresh your credentials."

Any suggestion about what's wrong is hugely appreciated.

Azure Lighthouse
Azure Lighthouse
An Azure service that provides secure managed services and access control for partners and customers.
92 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.