Severity
P2 - High (Major functionality broken)
Describe the Bug with repro steps
For a workflow with a Managed Service Identity agent connection (e.g. Azure OpenAI), saving crashes with:
TypeError: Cannot read properties of undefined (reading 'id')
at role.ts:126
at getMissingRoleDefinitions
In designer v1 the Save button becomes a silent no-op (error only in console, no network traffic on subsequent clicks because the underlying queries are cached); in designer-v2 the same error breaks autosave, Run draft, and Publish.
Repro:
- Use a tenant where ARM's built-in role definitions list (
$filter=type eq 'BuiltInRole') does not include Azure AI User (confirmed via HAR: 929 roles returned, Azure AI User absent while Azure AI Administrator / Azure AI Developer / Cognitive Services Contributor exist).
- Create an MSI agent connection to an Azure OpenAI resource and save → first save on a fresh app succeeds (zero role assignments hits the early-return path) and assigns the available roles.
- Save again (or create a second MSI connection and save) → crash. Deleting the connection does not help because the role assignments persist on the resource.
Root cause
getMissingRoleDefinitions (duplicated in libs/designer and libs/designer-v2) iterates all requested role names and dereferences definitions[name].id, but the definitions record only contains names actually found in ARM's built-in role list. When the app identity already has assignments at the resource scope, the unguarded loop runs and crashes on the missing name.
Fix
PR #9279 — skip role names with no matching definition (a role that does not exist in the environment cannot be assigned) and guard the roleDefinitionId access.
Severity
P2 - High (Major functionality broken)
Describe the Bug with repro steps
For a workflow with a Managed Service Identity agent connection (e.g. Azure OpenAI), saving crashes with:
In designer v1 the Save button becomes a silent no-op (error only in console, no network traffic on subsequent clicks because the underlying queries are cached); in designer-v2 the same error breaks autosave, Run draft, and Publish.
Repro:
$filter=type eq 'BuiltInRole') does not includeAzure AI User(confirmed via HAR: 929 roles returned,Azure AI Userabsent whileAzure AI Administrator/Azure AI Developer/Cognitive Services Contributorexist).Root cause
getMissingRoleDefinitions(duplicated inlibs/designerandlibs/designer-v2) iterates all requested role names and dereferencesdefinitions[name].id, but the definitions record only contains names actually found in ARM's built-in role list. When the app identity already has assignments at the resource scope, the unguarded loop runs and crashes on the missing name.Fix
PR #9279 — skip role names with no matching definition (a role that does not exist in the environment cannot be assigned) and guard the
roleDefinitionIdaccess.