Skip to content

Entra ID application should show missing subscription state like other Azure resources - #21163

Merged
Eric Erhardt (eerhardt) merged 2 commits into
mainfrom
eerhardt-entra-fail-without-azure-subscription
Oct 20, 2026
Merged

Eric Erhardt (eerhardt) merged 2 commits into
mainfrom
eerhardt-entra-fail-without-azure-subscription

Conversation

@eerhardt

Copy link
Copy Markdown
Member

Description

When Azure subscription/location/resource group info is missing, Azure resources show "Missing subscription configuration". The Entra ID application resource instead showed "Failed to start", because its initializer observed the provisioning failure and overwrote the controller-published state.

The initializer now treats MissingConfigurationException from provisioning as already reported by the Azure provisioning controller and leaves the state untouched. Other provisioning failures still report FailedToStart. Aspire.Hosting.Azure exposes internals to Aspire.Hosting.Azure.EntraId (and its tests) for this.

Validation: dotnet test --project tests/Aspire.Hosting.Azure.EntraId.Tests/Aspire.Hosting.Azure.EntraId.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" — passed (250/250).

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 311fe83c-132a-483d-87c4-57135c403d13
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21163

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21163"

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Oct 19, 2026
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 19, 2026 22:56
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused exception handling preserves other failure behavior, includes regression coverage, and has no unresolved findings.

No open issues 🎉

What changed in this PR

Preserves the Azure controller’s “Missing subscription configuration” state for Entra ID applications instead of overwriting it with “Failed to start.”

Changes:

  • Handles missing configuration separately from other provisioning failures.
  • Grants internal access to the Entra ID integration and tests.
  • Adds regression coverage for preserving the provisioning state.
File Description
tests/​Aspire.Hosting.Azure.EntraId.Tests/​EntraIdInitializationTests.cs Tests that missing-configuration state remains unchanged.
src/​Aspire.Hosting.Azure/​Aspire.Hosting.Azure.csproj Grants internal access to Entra ID assemblies.
src/​Aspire.Hosting.Azure.EntraId/​EntraIdResourceExtensions.cs Leaves controller-reported missing-configuration state intact.

Review effort: Balanced

…sibleTo

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 311fe83c-132a-483d-87c4-57135c403d13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused fix includes regression coverage and has no identified blocking issues.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

2 / 99 PR test projects · 1 PR job, from 2 changed files.

Selected PR test projects (2 / 99)

Aspire.Hosting.Azure.EntraId.Tests, Aspire.Hosting.Azure.Tests

Selected PR jobs (1)

typescript-api-compat


How these were chosen — grouped by what changed

🔧 src/Aspire.Hosting.Azure.EntraId/EntraIdResourceExtensions.cs (changed source)
→ 2 directly: Aspire.Hosting.Azure.EntraId.Tests, Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.EntraId.Tests/EntraIdInitializationTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.EntraId.Tests

Job reasons

Job Triggered by
typescript-api-compat affected project Aspire.Hosting.Azure.EntraId

Selection computed for commit 7cc416d.

@eerhardt
Eric Erhardt (eerhardt) enabled auto-merge (squash) October 20, 2026 15:12
@eerhardt
Eric Erhardt (eerhardt) merged commit 79e54ff into main Oct 20, 2026
52 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Oct 20, 2026
aspire-repo-bot Bot added a commit to microsoft/aspire.dev that referenced this pull request Oct 20, 2026
…ire 17.0

Documents microsoft/aspire#21163: the Entra ID application resource now
shows 'Missing subscription configuration' instead of 'Failed to start'
when Azure subscription/location/resource group config is missing,
matching other Azure resources.

Co-authored-by: Copilot <[email protected]>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1928

Generated by PR Documentation Check · copilot · auto · 108.2 AIC · ⌖ 22.7 AIC · ⊞ 20.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1928 targeting release/17.0.

Triggered signal: pr_body_has_cli_flag_mention (evidence: PR body mentions a dotnet test --project ... command). This is a user-visible bug fix — the Entra ID application resource now shows Missing subscription configuration instead of Failed to start when Azure subscription/location/resource group config is missing, matching other Azure resources (per the PR description and diff in EntraIdResourceExtensions.cs). Added a "Bug fixes" entry to whats-new/aspire-17.mdx cross-referencing the existing local-provisioning.mdx#configuration docs, since no page previously documented this resource-state behavior by name.

Note

This draft PR needs human review before merging.

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

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants