An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
The error Tenant ID, application ID, principal ID, and scope are not allowed to be updated. (code: RoleAssignmentUpdateNotPermitted) occurs when a deployment tries to update an existing role assignment instead of creating a new one. Role assignments are immutable and uniquely identified by their name (a GUID). If the same name is reused with a different principal, role, or scope, Azure treats it as an update and blocks it.
To resolve this in the WithSecure → Sentinel integration deployment, focus on the role assignment resource in the template/Bicep that grants Monitoring Metrics Publisher (or the custom role) and ensure:
- Use a unique, deterministic
namefor the role assignment- The
nameof theMicrosoft.Authorization/roleAssignmentsresource must be unique for each combination of scope, principal ID, and role ID. - If redeploying after changing the principal or role, generate a different GUID for the role assignment
nameso it is treated as a new assignment, not an update. - In Bicep/ARM, use the
guid()function with stable inputs (for example, scope, principalId, roleDefinitionId) to generate an idempotent but correctname:- Example pattern (conceptual):
name: guid(subscription().id, principalId, roleDefinitionId).
- Example pattern (conceptual):
- The
- Do not attempt to change an existing role assignment in-place
- If a role assignment already exists for that
name, you cannot change its tenant, principal ID, application ID, or scope. - Either:
- Delete the existing role assignment (if appropriate and allowed) and then redeploy, or
- Keep the existing assignment and adjust the template to match it, or
- Create a new role assignment with a new
name.
- If a role assignment already exists for that
- Check for previous deployments or manual assignments
- If the WithSecure integration or another deployment previously created a role assignment at the same scope for the same identity, the current deployment may be reusing the same
name. - Inspect existing role assignments on the target resource/subscription and compare their IDs with what the template is generating.
- If the WithSecure integration or another deployment previously created a role assignment at the same scope for the same identity, the current deployment may be reusing the same
- If using Azure Developer CLI or ARM/Bicep pipelines
- The same rule applies: ensure each
Microsoft.Authorization/roleAssignmentsresource uses a proper, deterministic GUID fornameso that redeployments are idempotent and do not try to “update” an assignment whose principal or scope has changed.
- The same rule applies: ensure each
The error is not caused by the specific role (Monitoring Metrics Publisher vs custom role) but by how the role assignment resource is defined and named in the deployment.
References: