Skip to content

Default user-assigned identity creation to Function App context in Identity Connections flow - #5037

Draft
Nathan (nturinski) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-default-values-identity-creation
Draft

Nathan (nturinski) with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-default-values-identity-creation

Conversation

Copilot AI commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

In Add Function App Identity Connections, choosing Create new user-assigned identity opened a creation flow without useful prefilled context. This change seeds the wizard with the selected Function App’s resource group/location so identity creation starts with sensible defaults (including generated identity name behavior tied to RG context).

  • Wizard context defaults (Identity Connections flow)

    • In addRemoteMIConnectionsInternal, derive defaults from the selected Function App site.
    • Prepopulate wizardContext.resourceGroup with { name, location } from functionapp.site.
    • Set default location via LocationListStep.setAutoSelectLocation(...) before UserAssignedIdentityListStep runs.
  • Refactor for explicit default derivation

    • Added getDefaultResourceGroupForIdentityCreation(...) helper to isolate/clarify default selection logic.
  • Focused test coverage

    • Added unit test for default derivation helper:
      • returns undefined when Function App/site context is missing
      • returns expected { name, location } when site data exists
const defaultResourceGroup = getDefaultResourceGroupForIdentityCreation(wizardContext);
if (defaultResourceGroup) {
    wizardContext.resourceGroup ??= defaultResourceGroup;
    await LocationListStep.setAutoSelectLocation(wizardContext, defaultResourceGroup.location);
}

[!WARNING]

Copilot AI self-assigned this May 20, 2026
Copilot AI review requested due to automatic review settings May 20, 2026 18:17
Copilot AI removed the request for review from Copilot May 20, 2026 18:17
Copilot AI requested review from Copilot and removed request for Copilot May 20, 2026 18:23
Copilot AI changed the title [WIP] Fix missing default values for new user-assigned identity Default user-assigned identity creation to Function App context in Identity Connections flow May 20, 2026
Copilot AI requested a review from Nathan (nturinski) May 20, 2026 18:25
@MicroFish91

Copy link
Copy Markdown
Contributor

Copilot Prefer using LocationListStep.setAutoSelectLocation over LocationListStep.setLocation

Copilot AI requested review from Copilot and removed request for Copilot May 21, 2026 00:17

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

Copilot Prefer using LocationListStep.setAutoSelectLocation over LocationListStep.setLocation

Updated in 414e9e8 to use LocationListStep.setAutoSelectLocation(...) instead of setLocation(...) in addRemoteMIConnectionsInternal.

Screenshot: unable to capture from this sandbox due Playwright browser profile lock (mcp-chrome in use), but no UI text/layout changed—only the location defaulting method call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No default values provided when creating new user-assigned identity in Function App Identity flow

3 participants