Skip to content

Document the Microsoft Entra ID integration for Aspire 17.0 - #2086

Merged
Eric Erhardt (eerhardt) merged 5 commits into
release/17.0from
eerhardt-entra-id-docs
Nov 11, 2026
Merged

Eric Erhardt (eerhardt) merged 5 commits into
release/17.0from
eerhardt-entra-id-docs

Conversation

@eerhardt

Copy link
Copy Markdown
Member

Summary

Documents the Microsoft Entra ID hosting integration (epic microsoft/aspire#21060) as one consolidated set of pages under integrations/security/microsoft-entra-id/. It replaces ten independent bot-written draft PRs that overlapped, edited the same files, and in places contradicted the shipped API. Every claim was checked against microsoft/aspire (README, code, [AspireExport] attributes, polyglot fixtures, tests, and the end-to-end deployment tests).

New pages:

Page Covers
Overview (index) Preview posture, prerequisites, package install, run vs publish, settings workloads receive, connection names
Secure a web app and API Web-to-API walkthrough, local vs Azure deployment
Redirect URIs and sign-in Endpoint-derived, host-parameter, and literal URIs, browser origins, ID-token issuance, audiences, sovereign clouds
Client credentials Secret, local developer certificate, managed identity federation, Key Vault certificate (+ automatic cert-read RBAC), store, file, x5c
Expose and call APIs Scopes, application ID URI, API permissions, DownstreamApis, consent, pre-authorization, Graph and custom APIs
Application roles WithAppRole, retirement rules, PublishWithAppRoleAssignment for managed identities
Existing registrations AddExistingEntraApplication vs AsExistingApplication, supported vs rejected settings
Customize infrastructure ConfigureInfrastructure, tags, serviceManagementReference, experimental Aspire.Hosting.Azure.Provisioning.EntraId (ASPIREAZUREPROVISIONING001)
Lifecycle and permissions Permissions matrix, create/redeploy/cleanup, tenant suffix, owners, retained grants, limitations, transient Graph failures, troubleshooting

Other changes: sidebar group under Security & identity, a Microsoft Entra ID row in the Azure provisioning package table, and cross-links from the local provisioning, user-assigned identity, and Key Vault pages.

Superseded drafts (closed after this PR opens): #1928, #1934, #1944, #1964, #1973, #1991, #2027, #2028, #2031, #2043.

Consolidation notes and assumptions

  • Defects in the drafts that were not carried over: apphost.ts titles, the wrong syncKey, C# before TypeScript, a nonexistent prerelease prop on InstallPackage, an unverified shortName, aligned fluent indentation, the stale "add URL callbacks before WithRedirectUris" note (resolution now waits for all URL customizations), and a claim that local-provisioning.mdx documents "Missing subscription configuration".
  • The 17.0 what's-new page is intentionally not edited ([docs] Note Entra ID application missing-subscription state fix in Aspire 17.0 #1928 only touched that page), per the task instructions.
  • TypeScript samples are not twoslash-annotated because the bundled twoslash data predates the Entra package. The method names and option shapes were verified against apphost.mts and the [AspireExport] attributes. C#-only APIs (WithCredential, EntraIdApi, EntraIdApiPermission, EntraIdAppRole) show C# only or use the TypeScript DTO equivalents.
  • Nested sidebar items carry no per-item locale translations, matching every other nested integration group in integrations.topics.ts.
  • integration-docs.json mappings were intentionally not added. reconcileIntegrationDocs prunes official-package entries missing from aspire-integrations.json, so pnpm test:unit:structured-data fails until the packages appear on NuGet. They can be added by the integrations updater afterwards.
  • No <ApiReference> components are used because no generated API data exists for these packages yet.

Open questions and unverifiable claims

  • Epic items still open and not reflected as final: API review (#21075), security review (#21080), release docs/samples (#21079), platform and failure-path dispositions (#21078).
  • "Azure CLI with Bicep 0.36.1 or later" comes only from the integration README and playground README.
  • The AzureAd Microsoft.Identity.Web snippets were checked against Microsoft.Identity.Web source (AddMicrosoftIdentityMessageHandler(IConfiguration, string), EnableTokenAcquisitionToCallDownstreamApi, AddMicrosoftIdentityWebApi) but not executed end to end.
  • The app-role sample's use of WithAllowWebApiToBeAuthorizedByACL follows the shipped end-to-end deployment test. The exact Microsoft.Identity.Web rejection behavior for tokens without roles is from that test and the option's XML doc.
  • Transient Graph failures after registration creation are documented as a known limitation with "deploy again" guidance, per #21372. No automatic retry exists in 17.0.

Third-party links and affiliations

None. All added links point to Microsoft-owned sites (learn.microsoft.com, entra.microsoft.com, aka.ms, devblogs.microsoft.com, nuget.org package pages) and the existing aspire.dev docs.

Validation

Run from src/frontend; pnpm build was not run, per repository policy:

  • pnpm install --frozen-lockfile: passed
  • pnpm test:unit:structured-data: passed (5 files, 99 tests)
  • pnpm exec vitest run --config vitest.config.ts: passed (97 files, 1398 passed, 1 skipped), including seo-lengths, typescript-first-apphost-tabs, and twoslash-blocks
  • pnpm exec eslint config/sidebar/integrations.topics.ts --max-warnings 0: passed
  • pnpm exec prettier --write config/sidebar/integrations.topics.ts: applied
  • A script that resolves every internal link and anchor in the new and edited pages: all OK
  • Style sweep for em dashes, bold lead-in bullets, Overview headings, non-TypeScript-first tabs, bad syncKey/titles, and missing trailing slashes: clean
  • Three independent read-only fact-check passes against the microsoft/aspire sources; all reported discrepancies were fixed before this commit
  • Regenerated .starlight-icons/* and twoslash/aspire.d.ts were restored and are not in the commit

Add a multi-page Microsoft Entra ID integration section under
integrations/security/microsoft-entra-id covering the hosting package,
redirect URIs and sign-in, client credentials, exposing and calling APIs,
application roles, existing registrations, infrastructure customization,
lifecycle and permissions, and a web-to-API walkthrough.

Consolidates and supersedes the independent draft PRs #1928, #1934, #1944,
#1964, #1973, #1991, #2027, #2028, #2031, and #2043. Every claim was
verified against microsoft/aspire. Also adds the sidebar group, an Entra row
in the Azure provisioning package table, and cross-links from related Azure
pages.

Co-authored-by: Copilot App <[email protected]>

@aspire-repo-bot aspire-repo-bot Bot 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.

Automated wording suggestions from the forbidden-words check. Apply the suggestions to resolve them.

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.

🟡 Changes recommended

Unresolved documentation errors can break authentication and consent flows, block frontend startup, prevent preview-package restoration, and mislead readers about certificate rollover requirements.

5 open issues
What changed in this PR

Adds a consolidated Microsoft Entra ID integration guide for Aspire 17.0, replacing overlapping draft documentation and connecting it to existing Azure guidance.

Changes:

  • Adds nine pages covering registration setup, authentication, credentials, API permissions, roles, and lifecycle management.
  • Provides TypeScript and C# AppHost examples with preview limitations and deployment requirements.
  • Adds sidebar navigation, a provisioning-package entry, and related Azure cross-links.
File Description
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​secure-web-and-api.mdx Adds a local-to-Azure authentication walkthrough.
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​redirect-uris-and-sign-in.mdx Covers callbacks, audiences, and sovereign clouds.
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​lifecycle-and-permissions.mdx Explains permissions, cleanup, and troubleshooting.
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​index.mdx Introduces installation, configuration, and preview status.
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​expose-and-call-apis.mdx Documents scopes, consent, and downstream API calls.
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​existing-registrations.mdx Explains references to externally managed registrations.
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​customize-infrastructure.mdx Demonstrates Microsoft Graph infrastructure customization.
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​client-credentials.mdx Covers secrets, certificates, and identity federation.
src/​frontend/​src/​content/​docs/​integrations/​security/​microsoft-entra-id/​app-roles.mdx Documents role declarations and managed identity assignments.
src/​frontend/​src/​content/​docs/​integrations/​cloud/​azure/​user-assigned-identity.mdx Links to Entra application-role assignments.
src/​frontend/​src/​content/​docs/​integrations/​cloud/​azure/​local-provisioning.mdx Links to the Entra integration overview.
src/​frontend/​src/​content/​docs/​integrations/​cloud/​azure/​customize-resources.mdx Adds the Entra provisioning package and guidance.
src/​frontend/​src/​content/​docs/​integrations/​cloud/​azure/​azure-key-vault/​azure-key-vault-host.mdx Links to certificate credentials and automatic access grants.
src/​frontend/​config/​sidebar/​integrations.topics.ts Adds the Microsoft Entra ID navigation group.

Review effort: Balanced

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #2086. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #2086 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@eerhardt

Copy link
Copy Markdown
Member Author

Phase A: verified claim catalog (follow-up to the review)

This lists every claim verified against microsoft/aspire release/17.0 @ cec195f2d0bf3f1d714badf74f205fa855fdf963 (and AzureAD/microsoft-identity-web @ d37ee59 for Microsoft.Identity.Web snippets), with path:line evidence. It's posted separately because it doesn't fit in the review body. Contradicted, unverifiable, and with-nuance items are in the review itself.

Batch A1: index, redirect-uris-and-sign-in, lifecycle-and-permissions

I reviewed index.mdx, redirect-uris-and-sign-in.mdx and lifecycle-and-permissions.mdx against microsoft/aspire origin/release/17.0 (cec195f).

Verdict Count
Total claims 162 (152 checkable + 10 narrative)
verified 143
verified-with-nuance 6
unverifiable 3
contradicted 0
narrative 10

All TypeScript methods and options in the three files are exported, and they match tests/PolyglotAppHosts/Aspire.Hosting.Azure.EntraId/TypeScript/apphost.mts or the generated SDK. No C#-only API appears in a TypeScript tab. Every internal link and anchor resolves.

Path abbreviations used below:

Abbreviation Path
ext src/Aspire.Hosting.Azure.EntraId/EntraIdResourceExtensions.cs
res src/Aspire.Hosting.Azure.EntraId/EntraIdApplicationResource.cs
RM src/Aspire.Hosting.Azure.EntraId/README.md
fx tests/PolyglotAppHosts/Aspire.Hosting.Azure.EntraId/TypeScript/apphost.mts
EPR src/Aspire.Hosting/ApplicationModel/EndpointReference.cs
ctl src/Aspire.Hosting.Azure/AzureProvisioningController.cs
pg playground/EntraId/README.md
e2e tests/Aspire.Deployment.EndToEnd.Tests/Helpers/EntraDeploymentHelpers.cs
TSsnap tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts
MIW AzureAD/microsoft-identity-web src/Microsoft.Identity.Web/WebApiExtensions/MicrosoftIdentityWebApiAuthenticationBuilderExtensions.cs

index.mdx

id line normalized_claim evidence
A1-1 12 Creates a registration and service principal, or references an existing one; passes settings as env vars ext:30-37; RM:32,72
A1-2 14 Doesn't install middleware or protect routes RM:145
A1-3 17 Package ships a preview version Aspire.Hosting.Azure.EntraId.csproj:8 (SuppressFinalPackageVersion)
A1-4 17 Provisioning.EntraId is experimental and reports ASPIREAZUREPROVISIONING001 Aspire.Hosting.Azure.Provisioning/ExperimentalAssemblyInfo.cs:6; Aspire.Hosting.Azure.Provisioning.EntraId/README.md:4
A1-5 23 Creation prereqs, including Bicep 0.36.1 RM:10
A1-6 23 Tenant policy can restrict creation RM:72
A1-7 24 Existing registrations need no Azure or Graph access ext:358-359; RM:72
A1-8 26 Graph extension is downloaded from mcr.microsoft.com res:601; RM:74
A1-9 30 Package name csproj
A1-10 34 Six AppHost languages; Python add_entra_id_app / with_app_owners RM:28; Python/apphost.py:63,66
A1-11 36 AddDotnetProject comes from the Dotnet integration (TS export addDotnetProject) Aspire.Hosting.Dotnet/DotnetProjectHostingExtensions.cs:287,299
A1-12 43-60 TS addEntraIdApplication, chained withRedirectUris(literal), addDotnetProject, withReference ext:58,1640; fx:58,80,84; RM:56-57
A1-13 63-87 C# WithRedirectUris(params string[]) ext:1398-1400
A1-14 91 Created through the Graph Bicep extension in the subscription's tenant res:210,601; RM:72
A1-15 95 Waiting → validate → Running ext:84-90,261
A1-17 97 Dashboard properties: tenant, client, audience, instance, credentials ext:245-253
A1-18 98 Invalid setting → FailedToStart, with logs ext:177-210
A1-19 99 Missing subscription configuration state ext:160-164; Resources/AzureProvisioningStrings.resx:446
A1-20 101 Use AddExistingEntraApplication when policy blocks creation ext:168
A1-21 107 .NET projects get AzureAd__{Key} ext:3050,3092; RM:68
A1-22 108 Other resources get UPPER_SNAKE names with the resource-name prefix; values keep casing ext:3002-3004,3050
A1-23 112-115 AddAuthentication().AddMicrosoftIdentityWebApi(GetSection("AzureAd")) (AzureAD/microsoft-identity-web) MIW:74-78; ext:3012-3013
A1-24 117 A reference doesn't configure an auth library RM:66
A1-25 121 Instance, TenantId and ClientId are always present ext:3125-3150
A1-26 122 AppHomeTenantId plus organizations/common/consumers ext:3133-3141; res:889-896
A1-27 123 ClientCredentials when a credential is configured ext:3159-3169
A1-28 124 Scopes = enabled scopes ext:3191-3195
A1-29 125 DownstreamApis; .NET section is a sibling that ignores the connection name ext:3110-3111
A1-30 126 Audiences via WithAudience ext:2266,3178-3181
A1-31 127 ClientCapabilities, SendX5C, ACL and ExtraQueryParameters methods ext:2192-2246,3154-3224
A1-32 131 connectionName is per reference RM:550
A1-33 135-141 TS withReference(x, { connectionName }) fx:46; ext:3031
A1-34 145-153 C# WithReference(x, connectionName:) ext:3032-3036
A1-35 158 ENTRA_TENANT_ID and Authentication__AzureAd__ClientId RM:527,543
A1-36 160 : → __ for .NET ext:3053-3055
A1-37 161 MyAuth → MY_AUTH_CLIENT_ID RM:545
A1-38 162 Empty connection name omits the prefix ext:2988,3093
A1-39 163 Nested ENTRA_CLIENT_CREDENTIALS_0_SOURCE_TYPE RM:543-544; ext:3003
A1-41 172 Created registration: provisioned on run, Bicep module on publish res:594-718; ext:66
A1-42 173 Existing registration is config-only and excluded from the manifest ext:358,643
A1-43 174 Endpoint redirects use the browser URL on run and the compute host plus TLS on publish ext:1479-1481,1538-1564
A1-44 175 Local developer certificate is run-only ext:691-695
A1-45 176 Created federation is publish-only and trusts a UAMI RM:630,652
A1-46 177 Configured federation applies in both modes ext:756-757
A1-47 178 App-role assignments are publish-only RM:408
A1-48 36,101,123-125,164,180,229-231 Internal page and anchor links exist PR head files (e.g. expose-and-call-apis.mdx:184, existing pages)
A1-49 234 Blog link RM:768

redirect-uris-and-sign-in.mdx

id line normalized_claim evidence
A1-50 9 Redirect methods throw InvalidOperationException for existing registrations ext:1404; res:173-178
A1-51 11 Not discovered; the path must match the app ext:1388,1486-1487
A1-52 25-33 TS withRedirectUris(endpoint, { callbackPaths }), withExternalHttpEndpoints, getEndpoint fx:83; ext:1640-1654; TSsnap:15745,15751
A1-53 44-50 C# WithRedirectUris(EndpointReference, params string[]) ext:1505-1508
A1-54 61 Run waits for allocation, uses the finalized browser URL incl. *.dev.localhost, before or after the call EntraIdRunModeBrowserOrigin.cs:33-38; RM:115-116
A1-55 62 Publish uses https:// + compute host + path; depends on the compute environment ext:1543-1564; RM:650
A1-56 62 TLS-disabled endpoint → error suggesting HTTPS or an explicit URI ext:1557-1561
A1-57 62 ACA requires an external HTTP(S) endpoint Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs:437-442
A1-58 63 Paths start with /; at least one is required ext:1515-1527
A1-59 65 30 s timeout → warning plus allocated origin EntraIdRunModeBrowserOrigin.cs:35-49
A1-61 69 Host parameter → https://{host}{path}; no scheme or path in the value ext:1573,1622
A1-62 75-79 TS host-parameter shape fx:82
A1-63 86-88 C# WithRedirectUris(host, path, params paths) ext:1599-1603
A1-64 96 Parameter without paths = comma-separated full URIs ext:1632
A1-65 102-105 TS literal and parameter shapes fx:80-81
A1-66 112-116 C# literal and parameter overloads ext:1398,1447
A1-67 122 Mixed values keep call order; comma split without trimming; TS uses repeated calls ext:1429-1432,1636-1637
A1-68 126 Registered URIs use the primary browser origin; PrimaryBrowserOrigin and BrowserOrigins semantics EPR:57-87; ext:1540,1554
A1-69 132-136 TS primaryBrowserOrigin() / browserOrigins(); withEnvironment accepts EndpointReferenceExpression EPR:13,181-182; TSsnap:4363,4372,15636
A1-70 143-147 C# properties EPR:71,87
A1-71 153 Ordinary references resolve to the allocated address EPR:406,437-440
A1-72 157 ID-token issuance is off by default res:872-879; ext:2153
A1-73 163,170 withIdTokenIssuance / WithIdTokenIssuance ext:2175; fx:63
A1-74 176 ID tokens only; not needed for auth code; throws for existing ext:2153-2160,2180
A1-75 178 Prefer PKCE plus a credential RM:143; ext:2156
A1-76 182 Default is the home tenant; must match Supported account types ext:1325,1333
A1-77 188-190 TS EntraIdSignInAudience import and withSignInAudience fx:1,28
A1-78 197 C# WithSignInAudience ext:1363
A1-79 203-208 Audience → TenantId table res:889-896; EntraIdSignInAudience.cs:27-42
A1-80 210 AppHomeTenantId for MIW app tokens; pass the home tenant for existing registrations ext:1333-1336; EntraIdValidation.cs:36-40; RM:570
A1-81 212 Created registrations get account types set; existing ones are consumer-only ext:1339-1340,1358
A1-82 215 tid caution ext:1343-1346
A1-83 220 Instance must be absolute HTTPS with no query or fragment ext:1300-1314
A1-84 226,233 withInstance / WithInstance fx:27; ext:1303
A1-85 239 Built-in APIs are global-cloud; define your own by ID RM:741-749
A1-87 242 Federation supports public, USGov and China; other clouds error EntraIdFederation.cs:30-36; res:271-277
A1-88 239,247-248 Anchors and links exist expose-and-call-apis.mdx:259

lifecycle-and-permissions.mdx

id line normalized_claim evidence
A1-89 9 Registrations live in the tenant; existing ones are never changed RM:420; res:177-178
A1-90 13 Graph Bicep extension uses the provisioning identity res:29,601
A1-91 17 Create permissions RM:10
A1-92 18 Owners need Application.ReadWrite.All or a directory role ext:1676-1678
A1-93 19 Local dev certificate needs ReadWrite.All or OwnedBy RM:603
A1-94 20 Roles for delegated consent ext:2765-2766
A1-95 21 Graph app-permission consent roles ext:2766-2768
A1-96 22 PublishWithAppRoleAssignment permissions ext:2012; RM:414
A1-98 26 Owner/Contributor is insufficient; callers need nothing; WithApiPermissions needs nothing extra RM:273,414
A1-99 28 Existing registrations need no access ext:358-359
A1-100 34 Run creates on first start and reuses cached state Aspire.Hosting.Azure/Provisioning/BicepUtilities.cs:52-53; RM:593
A1-101 35 Publish/deploy includes it Aspire.Hosting.Azure/AzurePublishingContext.cs:228-241
A1-102 37 Subscription's tenant only res:210,710
A1-103 39 displayName and uniqueName = name[-suffix]; same key → same registration; upsert res:607-616; RM:80,101; e2e:211
A1-104 41 Roles, scopes and pre-authorized clients are sent in full RM:245,366
A1-105 45 Resource groups don't isolate; deployments can overwrite RM:101-102; ext:663
A1-106 47 Dialog field label and dev-a example resx:159-160; res:607-610; RM:81-82
A1-107 48 Azure:TenantResourceSuffix and Change Azure context Aspire.Hosting.Azure/AzureBicepResource.cs:420; ctl:350-367; resx:229
A1-108 49 Logical name and env vars unchanged RM:83
A1-109 50 Deploy prompt; setting the key skips it; non-interactive → empty Provisioning/Internal/PublishModeProvisioningContextProvider.cs:113-143; BicepUtilities.cs:63; RM:89-91
A1-110 51 Published parameter defaults to empty; per-registration override AzurePublishingContext.cs:236-240,416-418
A1-111 57-58 TS withParameter(name, { value }) on an Entra builder Aspire.Hosting.Azure/AzureBicepResourceExtensions.cs:142-155; PolyglotAppHosts/Aspire.Hosting.Azure/TypeScript/apphost.mts:57
A1-112 65-66 C# WithParameter(name, string) RM:96-99
A1-113 72 Rename or re-suffix leaves the old registration; no adoption RM:103-105; resx:163
A1-114 74 Separate dev and prod registrations ext:662
A1-115 78 No default owners; WithOwners sets both; separate methods; literals or parameters ext:1672-1673,1814-1861
A1-116 84-97 TS and C# withOwners(param) fx:60; ext:1841
A1-117 103 Owners are appended, never removed; throws for existing ext:1676,1697
A1-118 111 Delegated consent leave-behind rule RM:246
A1-119 112 App-permission consent stays RM:246
A1-120 113 App-role assignments stay RM:416
A1-121 114 Pre-authorization revoke/stay rule RM:245
A1-122 115 Scopes and URIs stay RM:245
A1-123 116 Owners stay ext:1676
A1-124 117 Publishing doesn't revoke the dev key ext:664-665
A1-125 119 Issued tokens stay valid RM:416
A1-126 123 Not deleted on RG delete, stop or switch RM:420,605,103
A1-127 125 objectId, servicePrincipalId and uniqueName outputs; portal link res:711-713; ext:236-242
A1-128 127 Commands offered and hidden; Delete Azure resources deletes the RG ctl:975-980; resx:340-343; RM:422-423
A1-130 129 30-day soft delete; restore or purge before redeploy RM:428
A1-131 135 Missing subscription configuration resx:446; ext:160-164
A1-132 136 Permission-denied guidance RM:10
A1-133 137 uniqueName conflict RM:428
A1-134 138 Transient Graph errors → redeploy e2e:202-211
A1-135 139 CannotDeleteOrUpdateEnabledEntitlement; enabled scope removal rejected RM:244,366
A1-136 140 AADSTS50011 pg:172
A1-137 141 AADSTS700054 pg:173; ext:2180
A1-138 142 AADSTS700213 ext:762-765
A1-139 143 AADSTS28000 RM:247
A1-140 144 Need admin approval pg:174
A1-141 148 No role assignment to users or apps RM:755
A1-142 149 Can't delete the last role RM:756
A1-143 150 No secret or certificate lifecycle except the dev certificate RM:757; ext:654-655
A1-144 151 Never modifies existing registrations RM:759
A1-145 152 No middleware RM:145
A1-148 158 One module per registration; Graph replication lag RM:285; e2e:202-203
A1-150 164 Idempotent; no product retry; upstream issue e2e:204,211 (no retry in src/Aspire.Hosting.Azure.EntraId)
A1-151 168 Preview, experimental, ASPIREAZUREPROVISIONING001 ExperimentalAssemblyInfo.cs:6
A1-152 21,26,74,168,172-175 Cross-reference anchors exist app-roles.mdx:79,218; client-credentials.mdx:67; expose-and-call-apis.mdx:166,370
Batch A2: client-credentials, app-roles, existing-registrations
  • Total claims: 158 (146 checkable, 12 narrative)
  • Verified: 140
  • Verified with nuance: 5
  • Unverifiable: 1
  • Contradicted: 0

All evidence comes from microsoft/aspire origin/release/17.0 (cec195f). Path abbreviations:

Short name Path
ext src/Aspire.Hosting.Azure.EntraId/EntraIdResourceExtensions.cs
res src/Aspire.Hosting.Azure.EntraId/EntraIdApplicationResource.cs
README src/Aspire.Hosting.Azure.EntraId/README.md
fixture tests/PolyglotAppHosts/Aspire.Hosting.Azure.EntraId/TypeScript/apphost.mts
store src/Aspire.Hosting.Azure.EntraId/LocalDeveloperCertificateStore.cs
cred src/Aspire.Hosting.Azure.EntraId/EntraIdLocalDeveloperCertificateCredential.cs
role src/Aspire.Hosting.Azure.EntraId/EntraIdAppRole.cs
kvtests tests/Aspire.Hosting.Azure.EntraId.Tests/EntraIdKeyVaultCertificateTests.cs
e2e tests/Aspire.Deployment.EndToEnd.Tests/AzureEntraIdAppRoleDeploymentTests.cs

File abbreviations: CC = client-credentials.mdx, AR = app-roles.mdx, ER = existing-registrations.mdx.

id file:line normalized claim evidence
A2-1 CC:9 Each credential appends a ClientCredentials[n] entry; multiple credentials form a fallback chain README:574; ext:3159-3169
A2-2 CC:11 Aspire doesn't create, store, or rotate secrets or certificates, except the local developer certificate; federation creates the trust only README:757; ext:838-839
A2-3 CC:17 WithClientSecret: created and existing registrations, run and publish ext:718-737
A2-4 CC:18 Local developer certificate: created registrations only, run only ext:688,691-695
A2-5 CC:19 PublishWithFederatedManagedIdentityCredential: created only, publish only ext:869,875-878
A2-6 CC:20 WithFederatedManagedIdentityCredential: created and existing, run and publish ext:754-757
A2-7 CC:21 Key Vault certificate: created and existing, both modes ext:1049-1131
A2-8 CC:22 Certificate store methods: created and existing, both modes ext:1140-1183
A2-9 CC:23 File and signed assertion are TypeScript methods; C# uses WithCredential ext:1193,1214,1234
A2-10 CC:27 Client secret parameter must be secret ext:726-729
A2-11 CC:33-44 TypeScript client secret sample fixture:7,24-30; ext:460,718
A2-12 CC:51-61 C# client secret sample ext:371-375,719-721
A2-13 CC:69 Only the public key is registered; private key goes to workloads ext:654-658; res:631-647
A2-14 CC:71 Local method does nothing at publish ext:664,691-695
A2-15 CC:77-82 TypeScript local certificate + federation chain ext:683,1008; fixture:85-86
A2-16 CC:89-94 C# local certificate sample ext:674-681
A2-17 CC:101 Use separate dev/prod registrations via TenantResourceSuffix; old keys aren't revoked ext:662-666; res:603-610; README:591
A2-18 CC:106 Self-signed RSA certificate valid 48 h; reused when more than 24 h remain store:65-70,87-91; src/Shared/CertificateFactory.cs:10
A2-19 CC:108 Renewal only at startup; restart sessions ext:669-670
A2-20 CC:112 PFX path dev-certs/Entra/<name>.pfx; store path settings honored; owner-only access store:19,25-36,128-141; src/Aspire.Hosting/ApplicationModel/AspireStore.cs:11; IAspireStore.cs:11
A2-21 CC:114 PFX overwritten in place; no OS store or trust; regenerated if bad; kept after a Graph failure store:75-84,116-118; README:595
A2-22 CC:118 Public certificate in Bicep; full keyCredentials replaced; renewal removes old key res:631-647; ext:658-659; README:597
A2-23 CC:120 Graph assigns keyId res:635; README:599
A2-24 CC:122 Application.ReadWrite.All / ReadWrite.OwnedBy README:603
A2-25 CC:126-129 SourceType=Base64Encoded + Base64EncodedValue as a secret parameter cred:27-33,57-66
A2-26 CC:131 Non-.NET resources get uppercase snake case; no certificate path needed ext:3226-3231; README:601
A2-27 CC:134 Local credentials excluded from publish cred:59-62; README:601
A2-28 CC:139 Throws for existing registrations; blocks AsExistingApplication ext:688; res:153-154
A2-29 CC:140 Shutdown or resource group deletion doesn't delete the PFX or registration README:605
A2-30 CC:144 Registration trusts a user-assigned identity; no stored secret ext:820-822,851
A2-31 CC:148 Trusts each referencing workload's identity ext:828-832
A2-32 CC:154-158 TypeScript federation sample fixture:86
A2-33 CC:165-169 C# federation sample ext:857-861
A2-34 CC:175 Consumer needs a user-assigned identity at publish; reuses its identity or the environment creates one ext:835-838,1032-1040; res:1222
A2-35 CC:177 Resource type Microsoft.Graph/applications/federatedIdentityCredentials Provisioning/EntraIdBicepConstants.cs:42; res:699-705
A2-36 CC:179-181 Issuer v2.0 / subject principal ID / per-cloud audience; public, US Gov, China only res:702-704,271-277; EntraIdFederation.cs:30-35
A2-37 CC:183 ManagedIdentityClientId = client ID; deployment order res:1280-1289; ext:840-841; README:630
A2-38 CC:185 No effect in run mode ext:849-850,875-878; res:1268-1271
A2-39 CC:189 Passed compute resource must reference the registration and is the only one to get the credential ext:896-905; res:1261-1264
A2-40 CC:195-208 TypeScript { identity } union; addAzureUserAssignedIdentity/withAzureUserAssignedIdentity exported ext:1008-1011; fixture:87-88; src/Aspire.Hosting.Azure/AzureUserAssignedIdentityExtensions.cs:27-28,63
A2-41 CC:215-229 C# compute / identity overloads ext:911-915,963-969
A2-42 CC:235 Explicit identity required; validation after azure-prepare-resources names the resource ext:952-953; res:66-83,1217-1229; src/Aspire.Hosting.Azure/AzureEnvironmentResource.cs:34
A2-43 CC:237 Redirect URI still needed; endpoint-derived URI uses compute host README:650,513-514
A2-44 CC:241 Publish method throws for existing; With… configures the app only, both modes ext:754-757,844-846,1025-1030
A2-45 CC:247,254 withFederatedManagedIdentityCredential(clientId) ext:781-783,806-810; fixture:31
A2-46 CC:260-264 Manual trust values; AADSTS700213 ext:761-765
A2-48 CC:268 Federation ≠ direct managed identity token; no mTLS PoP README:664
A2-49 CC:272 Resource overload uses AzureKeyVaultResource ext:1092-1095
A2-50 CC:278-284 TypeScript Key Vault resource sample ext:1116-1120; fixture:36
A2-51 CC:291-297 C# Key Vault resource sample ext:1092-1106
A2-52 CC:303 Vault URI deferred; emulator endpoint locally ext:1076; res:1358; kvtests:27,83
A2-53 CC:305 Certificate must exist, be exportable, and be registered; latest version used ext:1078-1079; README:702-705; microsoft-identity-web KeyVaultCertificateLoader.cs:86,99
A2-54 CC:309 Secrets User role insufficient; Certificate User role granted ext:1251-1258; kvtests:192
A2-55 CC:311 Run: added to vault defaults; ClearDefaultRoleAssignments first → nothing ext:1259-1272; kvtests:181,198
A2-56 CC:312 Publish: role per consumer, credential before or after reference; error otherwise ext:1275-1279,3099-3107; kvtests:105,209-218; src/Aspire.Hosting.Azure/AzureResourcePreparer.cs:224
A2-58 CC:316 Existing vault via RunAsExisting/PublishAsExisting README:699-700
A2-59 CC:320 URL overload: configure access yourself ext:1050-1066; README:707-708
A2-60 CC:326,333 URL samples ext:1116-1131; fixture:35
A2-61 CC:341 Store lookup on the workload machine ext:1133-1139; README:714-721
A2-62 CC:347-360 Thumbprint / distinguished-name samples ext:1140-1183; fixture:37-38
A2-63 CC:368 Paths are on the consumer; password must be secret; not for production ext:1186-1192; res:1453-1460
A2-64 CC:374-377 TypeScript withCertificateFromFile(path, {password}), withSignedAssertionFile({filePath}) ext:1193-1226; fixture:8,39-40
A2-65 CC:384-394 C# WithCredential; namespace Aspire.Hosting.Azure; FilePath, Password (ParameterResource) res:17,1435-1460,1490-1501; ext:1235-1237
A2-66 CC:400 Omitted path → AZURE_FEDERATED_TOKEN_FILE; C# WithCredential / TypeScript typed methods ext:1212,1234; res:1486-1488
A2-67 CC:404 x5c: rollover, certificate-only, opt-in ext:2219-2236
A2-68 CC:410,417 withSendX5C / WithSendX5C ext:2228; fixture:42
A2-69 CC:many Internal links and anchors resolve PR head files exist
A2-70 AR:9 Roles go in the roles claim; separate from scopes, consent, RBAC ext:1901-1902; README:345
A2-71 AR:11 Declares on created registrations; assigns to managed identities at publish; not users/groups/apps ext:1891,1990-1991; README:755
A2-72 AR:15 Declaring doesn't assign ext:1901-1902
A2-73 AR:20-35 TypeScript withAppRole(value, displayName, description, {allowedMemberTypes}) ext:1967-1975; fixture:74-79
A2-74 AR:40-55 C# EntraIdAppRole sample + using directive role:7,38; ext:1918-1921
A2-75 AR:60 TypeScript values + options; C# object ext:1924,1967
A2-76 AR:64 Value unique per application ext:1935-1938
A2-77 AR:65-66 displayName / description semantics role:26-27
A2-78 AR:67 Passed to Graph; default User role:29,49
A2-79 AR:68 Optional GUID; derived from resource name + value role:31-32,119; ext:1982-1984
A2-80 AR:69 isEnabled default true role:38; ext:1987
A2-81 AR:71 Value rules; spaces and double quotes rejected; no duplicate IDs role:100-104; ext:1940-1944
A2-82 AR:73 IDs stable; changing value or ID creates a new role ext:1905-1906
A2-83 AR:76 WithAppRole throws for existing ext:1932
A2-84 AR:81 Full appRoles collection sent and replaced ext:1909-1911; res:626-629
A2-85 AR:83-84 Omitted enabled role → CannotDeleteOrUpdateEnabledEntitlement; omitted disabled role → deleted ext:1910-1911; README:366
A2-86 AR:85 No roles declared → appRoles not sent res:626; README:366
A2-87 AR:91-92 Two-step retirement README:368; res:431-433
A2-88 AR:94 Disabled role still issued; not revocation role:35
A2-90 AR:98 Grants user-assigned identity on created API; no caller registration or federation ext:1991,2002-2003
A2-92 AR:102 Identity or workload; workload's identity attached or created ext:2052,2135-2138
A2-93 AR:107-131 TypeScript sample APIs exported src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs:265; ext:2094-2098,2360-2363,2209; fixture:44,54
A2-94 AR:136-164 C# sample ext:2030-2033,2071-2074; e2e:63-101
A2-95 AR:169 C# has two overloads; TypeScript has one union method ext:2029-2107
A2-96 AR:171 Default api://{clientId}; ID known only after deployment ext:2279-2287
A2-97 AR:177 Reference from the API workload README:410
A2-98 AR:178 ACL flag skips the roles/scp requirement microsoft-identity-web MicrosoftIdentityWebApiAuthenticationBuilderExtensions.cs:225-256; ext:3184-3187
A2-99 AR:179 Pass URL and application ID URI separately; /.default README:410
A2-100 AR:181 Azure Container Apps sets AZURE_CLIENT_ID = identity client ID src/Aspire.Hosting.Azure.AppContainers/BaseContainerAppContext.cs:70-78
A2-102 AR:195 No role → 403 e2e:163-165; README:412
A2-103 AR:197-216 API Program.cs pattern e2e:113-124
A2-104 AR:220 Graph permissions, admin consent, directory role ext:2012-2015; README:414
A2-105 AR:222 Assigned to principal ID ext:2002
A2-106 AR:225 No revocation; tokens cached ext:2007-2009; README:416
A2-107 AR:232 Throws for existing ext:2115-2118
A2-108 AR:233 No user/group/app assignment README:755
A2-109 AR:234 Can't delete last role README:756
A2-110 AR:links Links and #set-the-application-id-uri resolve expose-and-call-apis.mdx:73
A2-111 ER:9 Never creates, queries, or modifies existing registrations ext:358-359,419-420,452
A2-112 ER:13 IDs come from the Overview page ext:396-400
A2-113 ER:18-32 TypeScript sample ext:460-465; fixture:26
A2-114 ER:37-50 C# sample ext:371-375
A2-115 ER:55 Literal or parameter; TypeScript can mix ext:464-465; fixture:24
A2-116 ER:60-70 TypeScript mixed IDs + executable withReference({connectionName}) fixture:18,24,30,46
A2-117 ER:75-86 C# literals + WithReference(connectionName:) ext:433-437,3032-3036
A2-118 ER:91 C# accepts two literals or two parameters only ext:370-371,432-433
A2-119 ER:95 Tenant GUID or domain; client GUID; keywords rejected EntraIdValidation.cs:24-61; ext:403-417
A2-120 ER:97 Literal → ArgumentException; parameters at startup; Waiting → Running/FailedToStart ext:82-90,139-140,206-209,261,491-496,621-629; README:445
A2-121 ER:101-106 Approach table ext:37,391,519-521; README:475-477
A2-122 ER:108 AsExistingApplication keeps Azure setup ext:66,519-521; README:447-449,458-459
A2-123 ER:113-116 TypeScript asExistingApplication ext:603-607; fixture:50
A2-124 ER:121-124 C# parameter overload ext:532-535
A2-125 ER:129 Throws on registration-only config; IDs unchanged on failure res:140-165; ext:610-611
A2-126 ER:131 Excluded from manifest; no Bicep ext:643; res:189-194,242-247
A2-127 ER:135 Registration-changing settings throw InvalidOperationException with guidance res:173-179
A2-128 ER:139 Consumer credential methods supported ext:718-737,1140-1249,2192-2236
A2-129 ER:140 WithFederatedManagedIdentityCredential supported ext:760
A2-130 ER:141 Audience / sign-in audience / instance supported ext:1303-1395,2265
A2-131 ER:142 WithApplicationIdUri(uri), WithScope supported ext:2325-2327,2393-2394
A2-132 ER:143 WithApiPermissions supported (DownstreamApis only) ext:2587-2601; README:291
A2-133 ER:144 Redirect URIs and ID-token issuance throw ext:1404,1453,1513,1608,2180
A2-134 ER:145 Owner methods throw ext:1697,1720,1767,1787,1830,1845
A2-135 ER:146 Role methods throw ext:1932,2115-2118
A2-136 ER:147 Admin consent, pre-authorization, withExternalApiAdminConsent throw ext:2538,2729,2790,2831
A2-137 ER:148 WithApplicationIdUri() throws ext:2301
A2-138 ER:149 Local certificate / publish federation throw ext:688,869,926,979
A2-139 ER:151 Created registration can consent to an existing API or pre-authorize an existing client ext:2526,2729
A2-140 ER:155 Describe the existing API with its URI + scope ID ext:2392-2394; README:289
A2-141 ER:160-169 TypeScript sample fixture:54-55,110; ext:2451-2456
A2-142 ER:174-184 C# WithScope callback; scope.Id settable; WithApiPermissions params ext:2404-2408,2588-2591; src/Aspire.Hosting.Azure.EntraId/EntraIdApi.cs:407
A2-143 ER:189 Scope ID can't be derived; GetScopeUri throws without a URI EntraIdApi.cs:404-405; res:1006-1016
A2-144 ER:193-199 Existing caller needs a trusted credential; trust values; client ID ext:760-765
A2-145 ER:links Links resolve PR head files exist
Batch A3: expose-and-call-apis, secure-web-and-api, customize-infrastructure, and the PR-added Azure page lines
  • Total claims: 135 (121 checkable, 14 narrative)
  • Verified: 111
  • Verified with nuance: 9
  • Contradicted: 1
  • Unverifiable: 0

Abbreviations used for evidence. All microsoft/aspire paths are at origin/release/17.0 (cec195f).

  • EXT: src/Aspire.Hosting.Azure.EntraId/EntraIdResourceExtensions.cs
  • RES: …/EntraIdApplicationResource.cs
  • API: …/EntraIdApi.cs
  • ACC: …/EntraIdApiAccess.cs
  • PROV: …/Provisioning/EntraIdApiProvisioning.cs
  • SYM: …/Provisioning/EntraIdSymbolNames.cs
  • RM: …/README.md
  • FX: tests/PolyglotAppHosts/Aspire.Hosting.Azure.EntraId/TypeScript/apphost.mts
  • ATS: src/Aspire.Hosting.Azure.Provisioning.EntraId/AtsTypeMappings.cs
  • PRM: src/Aspire.Hosting.Azure.Provisioning.EntraId/README.md
  • SNAPn: tests/Aspire.Hosting.Azure.EntraId.Tests/Snapshots/EntraIdStarterScenarioPublishTests.Publish_StarterWithEntra_ConfiguresTheApiAndTheWebFrontEnd#0n.verified.bicep
  • STARTER: tests/Aspire.Hosting.Azure.EntraId.Tests/EntraIdStarterScenarioPublishTests.cs
  • MIW: AzureAD/microsoft-identity-web (local master d37ee59)
id file:line normalized_claim evidence
A3-1 expose:9 Scopes are explicit, not derived from caller permissions EXT:2384
A3-2 expose:9 Declaration, consent, and pre-auth are separate; consent only on request EXT:2517-2521, 2626-2628
A3-3 expose:13 WithScope exposes a delegated scope; default api://{clientId} unless set EXT:2372, 2385-2386
A3-4 expose:18-32 TS withScope {requiresAdminConsent}, addDotnetProject, withReference FX:91-102, 84; Dotnet/DotnetProjectHostingExtensions.cs:299
A3-5 expose:38-52 C# WithScope callback overload EXT:2404-2408
A3-6 expose:58 TS scope options names EXT:3247-3277; FX:95-102
A3-7 expose:58 C# EntraIdScope properties API:356-407
A3-8 expose:60 AzureAd__Scopes = space-separated enabled scopes EXT:3189-3195
A3-9 expose:60-68 RequiredScope reads the key only if named; needs [Authorize] MIW Policy/RequiredScopeAttribute.cs:36; Policy/ScopeAuthorizationHandler.cs:59-64; RM:233
A3-10 expose:75 Default URI set by a second update in the same deployment EXT:2286-2287; PROV:74-86
A3-11 expose:75 Custom URI via WithApplicationIdUri; unique in tenant EXT:2318
A3-12 expose:80-89 TS withApplicationIdUri({applicationIdUri}) / C# overload FX:54,93; EXT:2330, 2360-2363
A3-13 expose:94 Parameterless call or a scope → default URI EXT:2303-2304; RES:967
A3-14 expose:94 requestedAccessTokenVersion=2 exempts default policy; stricter policy fails EXT:2318-2322; RES:618
A3-15 expose:96 GetScopeUri returns full scope; resolves when URI known RES:983-1013; EXT:2487-2491
A3-16 expose:101-116 TS getScopeUri/withEnvironment; C# .Resource.GetScopeUri FX:103-104; RES:992
A3-17 expose:121 Scope IDs derived from names, stable everywhere; id adopts existing RES:1018-1039; API:404-405
A3-18 expose:125 WithApiPermissions only lists; prompt unless admin consent or pre-auth EXT:2568-2571
A3-19 expose:127 WithAdminConsent = all-users grant; declare first EXT:2704; EXT:2933-2940; PROV:164
A3-20 expose:132-143 TS withRedirectUris literal, withApiPermissions/withAdminConsent arrays FX:80,108,109
A3-22 expose:164 Created client may consent to an existing API EXT:2712
A3-23 expose:164 Existing client: only DownstreamApis config; WithAdminConsent throws EXT:2575, 2629, 2729, 2790
A3-24 expose:168 No consent → no extra privileges RM:273
A3-25 expose:170 Delegated consent roles/permission EXT:2764-2766
A3-26 expose:171 Graph app-permission consent roles; CAA/AA insufficient EXT:2766-2768
A3-27 expose:173 Directory.Read.All reaches whole tenant EXT:2769-2770
A3-28 expose:177-181 Grant declared in full; revocation semantics; no call → grant stays EXT:2715-2717, 2757-2759
A3-29 expose:182 App role assignment created, not deleted EXT:2760-2761
A3-30 expose:186-188 Delegated → DownstreamApis__{name}__Scopes__{i} ACC:74-93; EXT:3201-3207
A3-31 expose:189 {name}AppOnly, /.default, RequestAppToken=true ACC:89-91; EXT:3214-3216
A3-32 expose:190 {name} = referencing resources, else encoded registration name ACC:53-58; src/Shared/EnvironmentVariableNameEncoder.cs
A3-33 expose:190 First-party names; custom = letters/digits of display name ACC:61-63; API:109-125
A3-35 expose:193 Collisions rejected before start; remedies RES:106, 312-385
A3-36 expose:193 TS withEntraIdReference / C# downstreamApisPrefix EXT:3032-3036, 3074-3081; FX:127
A3-38 expose:215 AppHost API entry has no URL; Graph/ARM include BaseUrl ACC:86; API:110,117,124
A3-39 expose:217-226 Microsoft.Identity.Web web app + message handler sample compiles MIW WebAppExtensions/MicrosoftIdentityWebAppAuthenticationBuilderExtensions.cs:43-50; WebAppExtensions/MicrosoftIdentityWebAppAuthenticationBuilder.cs:60; TokenAcquisition/MicrosoftIdentityAppCallingWebApiAuthenticationBuilder.cs:37; TokenAcquisition/MicrosoftIdentityHttpClientBuilderExtensions.cs:409-412
A3-41 expose:230 One API per token; mixing fails AADSTS28000 EXT:2574; RM:247
A3-42 expose:234 Pre-auth skips prompt; separate; first-party clients EXT:2505, 2517-2521
A3-43 expose:239-252 withPreAuthorizedApplication TS array / C# params FX:105-106; EXT:2529-2533
A3-44 expose:257 Pre-auth + declaration rejected; existing client can be pre-authorized EXT:2523-2526, 2945-2955
A3-45 expose:261 Identified by app ID; known names; unknown rejected at authoring API:22-31, 204-245; EXT:2658
A3-46 expose:266-284 TS external API methods, enums, DTO type FX:1,111-114,123-126; EXT:2683-2690, 2824-2831
A3-48 expose:309 Delegated vs application; app always admin consent; TS default delegated EXT:2632-2634, 2866
A3-49 expose:311 Custom API: app ID, URI prefix, optional BaseUrl; explicit IDs; az ad sp show API:26-31, 153-196; EXT:3301-3326
A3-51 expose:347 Link #target-a-sovereign-cloud resolves redirect-uris-and-sign-in.mdx heading
A3-52 expose:351 WithAudience is consumer-only; URIs unchanged EXT:2265
A3-53 expose:356-365 withAudience TS/C# FX:29; EXT:2266-2269
A3-54 expose:372 Graph keeps omitted properties PROV:122-125
A3-55 expose:376-379 Two-deployment retire; disabled scope refs fail EXT:2389-2390, 2895-2898; RES:283-307
A3-57 expose:385 Declared API sends URIs, scopes, and pre-auth in full PROV:122-134; RES:967
A3-58 expose:387 Removal and "nothing declares" semantics RM:245
A3-59 expose:391 Existing API: supply URI and scopes; IDs required EXT:2393-2394; RES:1027-1031; RM:289
A3-60 expose:395-397 See-also links resolve files exist in PR
A3-61 secure:9 Dev cert locally, managed identity in Azure, no secret EXT:654-670, 820-842
A3-62 secure:11 Apps still need Microsoft.Identity.Web RM:145
A3-63 secure:15-16 Package names (EntraId, AppContainers) src/Aspire.Hosting.Azure.EntraId; tests/PolyglotAppHosts/Aspire.Hosting.Azure.AppContainers/TypeScript/apphost.mts:10
A3-64 secure:17 AddDotnetProject from Dotnet integration Dotnet/DotnetProjectHostingExtensions.cs:287
A3-65 secure:18 Local provisioning required RM:72
A3-66 secure:27-58 TS scenario sample APIs FX:83-86,94,108; Aspire.Hosting/ResourceBuilderExtensions.cs:3152-3153
A3-67 secure:63-91 C# scenario sample STARTER:33-53
A3-68 secure:98 WithScope gives default URI EXT:2385-2386
A3-69 secure:99 WithApiPermissions grants no consent EXT:2568
A3-70 secure:100 Run cert short-lived; publish federated EXT:654-655, 691-694, 820-842
A3-71 secure:101 WithReference settings and DownstreamApis; service discovery SNAP4 env
A3-72 secure:102 Redirects derived from endpoint; paths must match RM:107-116
A3-73 secure:106 API env: Instance/TenantId/ClientId/Scopes SNAP3
A3-74 secure:108-121 AddMicrosoftIdentityWebApi(IConfigurationSection) MIW WebApiExtensions/MicrosoftIdentityWebApiAuthenticationBuilderExtensions.cs:74-78
A3-75 secure:123-133 RequiredScope config key MIW ScopeAuthorizationHandler.cs:59-64
A3-76 secure:138 DownstreamApis__apiservice__Scopes__0 value and naming ACC:53-57; SNAP4
A3-77 secure:140-149 Web Program.cs sample as A3-39
A3-78 secure:151 Handler acquires token for entry scopes MIW MicrosoftIdentityHttpClientBuilderExtensions.cs:429-440
A3-79 secure:155-156 aspire run; prompt for subscription/RG/location; tenant-scoped suffix AzureProvisioningStrings.resx:133,157,160; RM:81
A3-80 secure:157 Running state; portal links RM:70; EntraIdUrls.cs:29-55
A3-82 secure:159 Code redeemed with dev cert EXT:656-657
A3-83 secure:161 Base64Encoded credential; dev-only; separate registration EntraIdLocalDeveloperCertificateCredential.cs:33,65; EXT:662-664
A3-84 secure:163 "Missing subscription configuration" error AzureProvisioningStrings.resx:446; EXT:162
A3-85 secure:167 aspire deploy RM:89
A3-86 secure:171 Registrations and web user-assigned identity deployed SNAP0 (webfrontend_identity module)
A3-87 secure:172 FIC issuer/subject/audience SNAP2; RES:699-705
A3-88 secure:173 Redirects use container app FQDN SNAP2; RM:108
A3-89 secure:174 Local cert call no-op on publish EXT:691-695
A3-90 secure:178-184 Container app settings table SNAP3; SNAP4; EXT:3051
A3-91 secure:188 Registrations survive resource group deletion RM:420
A3-92 secure:188 #required-permissions anchor lifecycle-and-permissions.mdx heading
A3-93 secure:163 #troubleshoot-entra-id-errors anchor lifecycle-and-permissions.mdx heading
A3-94 secure:100,161 client-credentials anchors resolve client-credentials.mdx headings
A3-95 secure:15,99 #prerequisites, #declare-permissions-and-consent anchors index.mdx; expose-and-call-apis.mdx headings
A3-96 custom:9 Module per created registration; Graph declarations RES:594-718; PROV:147-215
A3-97 custom:11 Existing registrations not provisioned RM:149
A3-98 custom:15 Public namespace; identifiers application/servicePrincipal Provisioning/MicrosoftGraphApplication.cs:18; RES:613,659; ATS:7
A3-99 custom:20-24 TS needs experimental package; aspire add PRM:4,16-20
A3-101 custom:50 get/set async; literals or Bicep values PRM:45; RM:173
A3-102 custom:55 C# needs no extra package Provisioning/*.cs in EntraId assembly
A3-103 custom:57-79 C# ConfigureInfrastructure sample RM:153-168; Aspire.Hosting.Azure/AzureProvisioningResourceExtensions.cs:42; MicrosoftGraphApplication.cs:148,156; RES:47
A3-104 custom:85 ASPIREAZUREPROVISIONING001 PRM:4; Provisioning.EntraId csproj (ExperimentalAssemblyInfo)
A3-105 custom:90 Tags are strings; serviceManagementReference RM:190
A3-106 custom:92 WindowsAzureActiveDirectoryIntegratedApp tag Provisioning/EntraIdBicepConstants.cs:44-51; RES:662
A3-107 custom:96 Second application declaration for default URI PROV:66-86; SYM:36-37
A3-108 custom:98-105 Six proxy types ATS:8-13
A3-109 custom:107 Aspire-modeled properties RES:613-629; PROV:89-104
A3-110 custom:111 Pinned extension ref; no bicepconfig RES:601; RM:74
A3-111 custom:112 Downloads from mcr.microsoft.com RM:74
A3-112 custom:113 Module outputs RES:708-717
A3-113 custom:115 #inspect-generated-bicep anchor customize-resources.mdx heading
A3-114 customize-resources (table row) Entra package and listed models ATS:8-11
A3-115 customize-resources (added paragraph) Proxies for Entra-defined Graph models, not an Azure SDK ATS:4,8-13; Provisioning.EntraId csproj ProjectReference
A3-116 customize-resources (link) customize-infrastructure link resolves file exists
A3-117 local-provisioning (link) Entra index link resolves index.mdx exists
A3-118 user-assigned-identity (link) app-roles#assign-roles-to-managed-identities app-roles.mdx heading
A3-119 key-vault (link) client-credentials#certificate-from-azure-key-vault client-credentials.mdx heading
A3-121 integrations.topics.ts All 9 Entra slugs resolve all 9 .mdx files present (index = Overview)

@eerhardt Eric Erhardt (eerhardt) left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Docs accuracy review: Microsoft Entra ID integration (doc-pr-reviewer)

Verdict: REQUEST_CHANGES (1 contradicted claim). It's posted as a COMMENT review because GitHub doesn't allow requesting changes on your own pull request.

Sources of truth (Phase A)

Repo Branch SHA
microsoft/aspire release/17.0 cec195f2d0bf3f1d714badf74f205fa855fdf963
AzureAD/microsoft-identity-web master d37ee59, only for the Microsoft.Identity.Web snippets
  • The Entra ID source directories on release/17.0 are identical to main.
  • CommunityToolkit/Aspire and Azure/azure-sdk-for-net weren't needed, because no claim routes to them.

Claims (Phase A): 455 extracted.

Verdict Count
verified 394
verified-with-nuance 20
unverifiable 4
contradicted 1
narrative 36

Doc-tester (Phase B): a blind new-user run against the local dev server at PR head 9bdd5c7, covering all 9 Entra ID routes and the sections this PR adds to 4 Azure pages. It found 0 critical issues and 17 warnings. Both testers' findings plus the reviewer's scan give 34 conciseness findings.

Bottom line

Accuracy is strong.

  • Every TypeScript method and option in the TS tabs is exported, and no C#-only API appears in a TS tab.
  • Links and anchors all resolve.
  • The one contradiction is a sample bug.

Size and relevance are the main problems.

  • The 9 pages total about 13,000 prose words. For comparison, the Keycloak page is about 1,500 and the Key Vault hosting page about 1,100.
  • A meaningful share of that text describes how Aspire works internally: Bicep modules and declarations, keyId, pipeline step names, deployment ordering, why workarounds exist, ID derivation. It doesn't tell a reader what to do.
  • The same facts also repeat across pages. The biggest one, "Aspire never modifies existing registrations", appears about 6 times.

The conciseness section below lists concrete cuts.


Phase A: Claim verification

Contradicted (1), with inline comment

  • A3-21 · expose-and-call-apis.mdx:158. The C# sample under "Declare permissions and consent" uses apiService, but the page's C# tab never assigns it: line 48 is builder.AddDotnetProject("apiservice", ...) with no variable. This is CS0103. The TypeScript tab is correct.

Unverifiable (4), with inline comments

  • A1-86 · redirect-uris-and-sign-in.mdx:242: "Sovereign-cloud provisioning and federation haven't been fully validated for the Aspire 17.0 preview." No source states this. It's product status that comes from epic microsoft/aspire#21060, not from code.
  • A1-146 · lifecycle-and-permissions.mdx:153: same claim as A1-86, repeated.
  • A1-147 · lifecycle-and-permissions.mdx:154: the roadmap non-features (External ID, CLI and template onboarding, registration picker, OIDC emulator). There's no source evidence, and the source is partly in tension with it: WithInstance documents https://contoso.ciamlogin.com/ for external tenants (EntraIdResourceExtensions.cs:1297).
  • A2-146 · app-roles.mdx:67: "Use User for users and groups and Application for applications and managed identities." The source only says the value is passed through to Graph and defaults to User (EntraIdAppRole.cs:29). The mapping is Graph semantics, so link it to Graph's appRole docs.

Verified with nuance (20)

ID Location Nuance Suggested fix
A1-16 index:96 The portal link only appears for known clouds (EntraIdUrls.cs:35-40, 60-61). "…and, for public and national clouds, to the app registration in the portal."
A1-40 index:164 The DownstreamApis prefix ignores the connection name only for .NET. Other resources nest it under the connection prefix (EntraIdResourceExtensions.cs:3110-3111). State both cases.
A1-60 redirect:65 The doc is right: the allocated origin is still used (EndpointReference.cs:423-431). The XML doc at EntraIdResourceExtensions.cs:1494 is stale and says the opposite. Keep the doc text (or cut it as detail). File an upstream XML-doc fix.
A1-97 lifecycle:24 The automatic Key Vault Certificate User role applies only to the vault-resource overload. The URL overload grants nothing. "When WithCertificateFromKeyVault references a Key Vault resource in the AppHost…"
A1-129 lifecycle:127 Missing IDs show as ?, not "unknown" (AzureProvisioningController.cs:805,1876). Fix it or cut it (see conciseness).
A1-149 lifecycle:160-162 The error codes and messages match the e2e helpers. The HTTP status numbers (403/404/400) appear nowhere in the source. Drop the HTTP numbers.
A2-47 client-credentials:266 It implies tokenExchangeUrl/tokenExchangeAuthority are TypeScript-only. C# can set them on EntraIdFederatedIdentityCredential through WithCredential (EntraIdApplicationResource.cs:1190,1198). Mention the C# path.
A2-57 client-credentials:314 WithRoleAssignments replacing the automatic role applies only when publishing. Locally, roles come from the vault defaults (EntraIdResourceExtensions.cs:1259-1288). "When you publish, … Locally, use ClearDefaultRoleAssignments on the vault."
A2-89 app-roles:94 You can remove the last role from the AppHost. Aspire just stops sending appRoles, so the role stays on the registration (README:756). It also duplicates app-roles:234. "Removing the last declared role doesn't delete it from the registration…" Keep one copy.
A2-91 app-roles:100 Role names are validated when PublishWithAppRoleAssignment is called, which requires WithAppRole first. "When you write the AppHost" is vague. "Declare the role with WithAppRole before calling PublishWithAppRoleAssignment."
A2-101 app-roles:183-216 Worker.cs and Program.cs fragments are missing usings (Azure.Core, Azure.Identity, Microsoft.Identity.Web, JwtBearer), and cancellationToken is undefined. Add the usings or label them as fragments.
A3-34 expose:191 The snake-case rule depends on the resource type (not a .NET program), not on the language (EntraIdResourceExtensions.cs:3002,3048). "Resources that aren't .NET programs…"
A3-37 expose:198-210 In the page flow, webFrontend already references entraWeb. This second reference duplicates AzureAd__* and emits DownstreamApis under two prefixes (:3097). Say "instead of withReference(entraWeb)" / "pass downstreamApisPrefix in the existing call".
A3-40 expose:228 AddDownstreamApis ships in the separate Microsoft.Identity.Web.DownstreamApi package. Name the package.
A3-47 expose:266-304 entraWeb is redeclared (JS SyntaxError / CS0128 if combined with the earlier samples). using Aspire.Hosting.Azure; sits mid-file. web and webfrontend both add ../Web/Web.csproj. Use distinct names, or present the snippets as standalone.
A3-50 expose:317-347 Inline comment. The sovereign-cloud Graph sample calls entraWeb.withExternalApiPermissions(...) on the same registration that already declared EntraIdWellKnownApi.MicrosoftGraph. Access is matched by application ID only (EntraIdApiAccess.cs:45, EntraIdResourceExtensions.cs:2659), so the US Government resourceUri/baseUrl are silently ignored and the entry keeps graph.microsoft.com. Use a different registration, and say "use a custom Graph definition instead of EntraIdApi.MicrosoftGraph, not alongside it."
A3-56 expose:381,387 The parameterless WithApplicationIdUri() resets a custom URI back to the default (:2303-2304). "keep a WithApplicationIdUri call (with your custom URI, if you use one)".
A3-81 secure-web-and-api:158,186 With no initial scopes, consent happens only if the app turns the token-acquisition failure into a challenge. MicrosoftIdentityMessageHandler doesn't do that for consent. Pass the scope to EnableTokenAcquisitionToCallDownstreamApi in the sample, or mention [AuthorizeForScopes].
A3-100 customize-infrastructure:35,40 Awaiting bicep() and parameter() is harmless but differs from the fixture and the package README. Optional: match the fixture.
A3-120 azure-key-vault-host (added line) The automatic role applies only when you pass the vault resource, and explicit consumer role assignments replace it. "When you pass the vault resource, … unless you configure their roles explicitly."

The full verified catalog (394 claims with repo path:line evidence) is in this comment, because it doesn't fit in one review body.

FYI, outside this PR's changed lines: the pre-existing Key Vault page text says AddAzureKeyVault defaults to Key Vault Administrator. The code defaults to Key Vault Secrets User (AzureKeyVaultResourceExtensions.cs:147-148; the XML doc at :32 is also stale). The Phase B tester noticed the two pages disagree. The Entra page is the correct one.

Version placeholders: no hard-coded Aspire versions, so no %ASPIRE_VERSION% changes are needed. Six release-scoped "17.0" mentions will age: index:17, redirect:242, lifecycle:153, 154, 164 and 168. Consider "this preview".


Conciseness and relevance

This is the reviewer's synthesis of Phase A (source readers), Phase B (blind testers), and a direct scan. The guiding rule: keep only what someone using the feature needs to know or do. It's ordered roughly by payoff.

1. Delete or collapse implementation-detail passages

Page:line Passage (abridged) Action
customize-infrastructure:109-113 "Know how the module is generated": the pinned br:mcr.microsoft.com/...:1.0.0 reference, temp or published output copies, module outputs Delete the section. Keep one line elsewhere: "The first deployment downloads the Microsoft Graph Bicep extension from mcr.microsoft.com, which must be reachable." (index:26 already says this.)
customize-infrastructure:96-105 "declares the application a second time, because the client ID is known only after…" plus the list of 6 proxy types Shorten to "Select the application by the identifier application; a registration with the default api://{clientId} URI has more than one MicrosoftGraphApplication." Drop the proxy list.
customize-infrastructure:9 "Aspire generates a Bicep module… uses the Microsoft Graph Bicep extension to declare…" Shorten to "Use ConfigureInfrastructure to set properties Aspire doesn't model, such as tags and the service management reference."
client-credentials:104-122 The three local-certificate subsections: lifetime, store path, env vars, keyCredentials ownership, "Graph assigns the certificate credential ID. Aspire doesn't set keyId…", "A failed Microsoft Graph update leaves the new PFX…" Collapse to about 4 bullets: valid 48 h and renewed at startup when ≤24 h remain (restart long sessions); stored at dev-certs/Entra/<name>.pfx in the AppHost store (delete it to reset); each run replaces all certificate credentials on the registration, so don't add your own; development registrations only.
client-credentials:69 "Aspire never provisions a private key into Entra." Delete (repeats the previous sentence).
client-credentials:177-183 "adds a Microsoft.Graph/applications/federatedIdentityCredentials resource to the generated Bicep with these values…" and "Deployment order is identity, then registration, then workload." Shorten to "Aspire adds a federated credential that trusts each workload's managed identity (Azure public, US Government, and China clouds)." Keep the issuer, subject, and audience values only under "Use a managed identity trust that you created", where users type them.
client-credentials:235 "A validation step runs after the azure-prepare-resources pipeline step…" Shorten to "Publishing fails with an error naming the workload if…"
client-credentials:237, 268, 303 "…doesn't make the registration depend on the web app", "doesn't enable mTLS proof-of-possession", "The vault URI remains a deferred resource reference…" Delete.
expose-and-call-apis:75 "…so Aspire sets the default api://{clientId} URI in a second update of the registration in the same deployment." Shorten to "Without a custom URI, Aspire uses api://{clientId}."
expose-and-call-apis:94 "Aspire always sets requestedAccessTokenVersion to 2, which exempts the URI…" Shorten to "A strict tenant identifier-URI policy can reject custom URIs; see …"
expose-and-call-apis:121 "Scope IDs derive from the registration and scope names…" Shorten to "Scope IDs stay the same across deployments. Set id to adopt an existing scope."
expose-and-call-apis:257 "Each registration deploys as its own module. Pre-authorization makes the API's module wait for…" Shorten to "A pair of registrations can use a declaration or pre-authorization, not both."
expose-and-call-apis:383-389 "What a deployment sends": "Aspire sends … in full, even when a list is empty. Graph replaces each list." Rewrite as the effect: "Portal edits to scopes, URIs, or pre-authorized clients are overwritten on the next deployment. Once nothing declares the API, Aspire leaves them in place."
expose-and-call-apis:190 The full {name} derivation rules for DownstreamApis Shorten to one concrete key example (DownstreamApis:apiservice:Scopes:0) plus one sentence.
app-roles:68, 73, 81, 85, 222 "derives a stable ID from…", "sends the complete appRoles collection, and Microsoft Graph replaces what's stored", "assigns the role to the identity's principal (object) ID, not to its client ID" Shorten to the effect ("each deployment replaces the registration's roles with what the AppHost declares"). Delete the principal-ID sentence.
existing-registrations:108, 129, 131, 189 "enables Azure provisioning before AsExistingApplication runs, and the fluent API doesn't undo that setup", "Aspire checks this before it changes the resource…", "isn't part of the publish manifest, so deployment generates no Bicep", "because a guessed URI would fail later as a token error" Delete or shorten. For 108: "AsExistingApplication keeps the Azure setup, so deployment can still require Azure authentication."
redirect-uris-and-sign-in:61-65, 122 "whether you configure them before or after…", "The registration depends on the compute environment, not on the web app", the 30-second/removed-URL edge cases, "The generated Bicep splits parameter values on commas" Delete the ordering and edge-case sentences. Change 122 to "Separate URIs with commas and no spaces."
redirect-uris-and-sign-in › Keep browser origins consistent A general endpoint API (PrimaryBrowserOrigin/BrowserOrigins), not Entra-specific Cut to one sentence with a link, or move it to the endpoints docs.
lifecycle-and-permissions:13, 41, 127 "with the Microsoft Graph Bicep extension…", "Aspire sends it in full, and Microsoft Graph replaces what's stored", "offers deployment reprovisioning, cancellation, and local-state commands… doesn't query Microsoft Graph…" Shorten to the effects. For cleanup: "Delete Azure resources doesn't delete registrations; it lists them with object IDs so you can delete them yourself."
lifecycle-and-permissions:156-164 "Deploy again after transient Graph failures": the module mechanics, HTTP codes, "tracked as an upstream … issue" Fold into the troubleshooting row: "Known transient Graph error right after creation; deploy again. If it persists, treat it as a real permissions issue."
lifecycle-and-permissions:153-154, 166-168 Roadmap non-features, a duplicate sovereign caution, and a "Preview status" section that duplicates index:16-18 Delete.
index:34, 103-160 The Python generator naming aside (add_entra_id_app), the five-bullet dashboard-state list, and the five connection-name normalization rules Shorten: keep the per-language-naming sentence, two state bullets with a link to troubleshooting, and one connection-name example plus one rule.

2. Give each repeated fact one home and link to it

  • "Aspire never modifies existing registrations" (about 6 times: redirect, client-credentials ×2, app-roles ×2, expose ×2, lifecycle) → keep it on Existing registrations only.
  • Consent and app-role-assignment privileges (expose › Required privileges, app-roles › Grant the deployer, lifecycle table) → keep the lifecycle permissions table and link to it.
  • "Use separate dev and prod registrations" (secure-web-and-api, client-credentials, lifecycle) → keep it once, under the local developer certificate.
  • "Registrations survive resource-group deletion" (secure-web-and-api, client-credentials, lifecycle) → keep it in lifecycle › Clean up.
  • Federated credential issuer, subject, and audience (client-credentials ×2, secure-web-and-api, existing-registrations) → keep it once, under "Use a managed identity trust that you created".
  • [RequiredScope] and message-handler code (expose-and-call-apis and secure-web-and-api) → keep it in the walkthrough and link from the other page.
  • "Existing API registrations" section in expose-and-call-apis → replace it with a link to existing-registrations › Describe an existing API.
  • App-roles limitations are stated twice on the same page (intro, Retire a role, Limitations) → keep them in one section.

3. Small clarity fixes that support the cuts (from Phase B)

  • "When you write the AppHost" is vague (expose and app-roles). Say "when the call runs" instead.
  • "consumers" is overloaded: it's a TenantId value and also means "apps that reference the registration". Use "referencing apps".
  • The TypeScript and C# samples diverge in places:
    • redirectHost vs host.
    • The app-roles TypeScript tab uses containers with no identity, while the C# tab uses projects plus a user-assigned managed identity.
    • The C# service principal lookup uses .Single(), while the prose says "look up by identifier".
  • Move the experimental ASPIREAZUREPROVISIONING001 aside into the TypeScript tab on customize-infrastructure, because C# doesn't need that package.

Phase B: Doc-tester results

The following are the two blind-tester reports, verbatim. Neither tester read microsoft/aspire or any other source. They used only the rendered local site at http://localhost:4322/ (PR head 9bdd5c7) through playwright-cli, in sessions entra-b1 and entra-b2.

Tester 1: overview, secure-web-and-api, redirect URIs and sign-in, client credentials, lifecycle and permissions

Documentation test report

Focus area: PR #2086, the Microsoft Entra ID integration docs (5 routes)
Date: 2026-11-10
Tester: doc-tester agent (testing as a new user who can only see the rendered site)
Site: http://localhost:4322/ (PR head 9bdd5c7)
Routes tested: /integrations/security/microsoft-entra-id/, .../secure-web-and-api/, .../redirect-uris-and-sign-in/, .../client-credentials/, .../lifecycle-and-permissions/
playwright-cli session: -s=entra-b1 (now closed)

Summary

Category Passed Failed Warnings
Content accuracy 5 0 5
Code examples 5 0 4
CLI commands 1 0 0
Links 5 0 0
Conciseness / relevance 0 — 14

Critical issues

None. Every page loaded, every internal link and anchor resolved, and every TypeScript/C# code group has both languages.

Warnings

Warning 1: Undefined variables in some snippets

Location: /client-credentials/, "Certificate from Azure Key Vault"
Issue: addExistingEntraApplication("entra-web", tenantId, webClientId) uses tenantId and webClientId. These are only defined in the earlier "Client secret" snippet, so someone jumping to this section can't run it.
Same pattern elsewhere: entraWeb, web and builder on /redirect-uris-and-sign-in/ from "Use a host parameter" onward.
Suggestion: Add the parameter lines, or a note such as "continues from Client secret".

Warning 2: TypeScript and C# samples don't match each other

Location: /redirect-uris-and-sign-in/, "Use a host parameter"
Issue: The same parameter is called redirectHost in TypeScript and host in C#.

Location: overview, "Add a registration and reference it"
Issue:

  • TypeScript calls .withRedirectUris(...) twice with one URI each.
  • C# passes both URIs in a single call.
  • The reason (TypeScript takes one value per call) is only explained on a different page: "In TypeScript, call withRedirectUris repeatedly to add more than one value."

Suggestion: Use the same names in both languages, and add a one-line note at the first place the TypeScript pattern appears.

Warning 3: TypeScript style changes from snippet to snippet

Issue: Two styles are mixed, sometimes on the same page:

  • Chaining on a call you haven't awaited yet: await builder.addDotnetProject(...).withReference(apiEntra).withHttpHealthCheck(...) (secure-web-and-api).
  • Awaiting first and then calling separately: const web = await builder.addDotnetProject(...); await web.withExternalHttpEndpoints(); (redirect-uris).

A new TypeScript user can't tell whether both forms are valid.

Warning 4: "consumers" means two different things

Location: /redirect-uris-and-sign-in/, "Choose a sign-in audience"
Issue: "consumers" is a TenantId value in the table ("PersonalMicrosoftAccount … consumers"). The next paragraph says "For existing registrations, it configures consumers only", meaning the apps that reference the registration. The same overloaded word appears in "Use WithInstance to point consumers at a sovereign cloud" and on /client-credentials/ ("files on the consumer", "the consumer's AZURE_FEDERATED_TOKEN_FILE setting").
Suggestion: Say "referencing workloads" or "apps that reference the registration".

Warning 5: The same thing has several names

Issue:

  • The registration is called "registration", "app registration", "Entra ID application" and "Entra ID resource" (client-credentials: "for each Entra ID resource").
  • The method names AddEntraIdApplication and AddExistingEntraApplication differ: one has "Id" and one doesn't. I couldn't tell whether this is a docs typo or the real API.
  • The suffix appears as "Tenant-scoped resource suffix" (secure-web-and-api, with no explanation or link), Azure:TenantResourceSuffix (client-credentials aside) and tenantResourceSuffix (lifecycle). Only the lifecycle page explains it.

Suggestion: Pick one noun for the registration. Link the first mention of the suffix to /lifecycle-and-permissions/#separate-registrations-with-a-tenant-scoped-suffix.

Warning 6: Prose uses C# method names while TypeScript is the default tab

Location: all pages
Issue: TypeScript is the default tab, but the prose says WithScope, RunWithLocalDeveloperCertificateCredential, WithRedirectUris and so on. The overview explains the naming convention once; other pages don't.

Warning 7: The secure-web-and-api walkthrough doesn't list the app's packages or usings

Location: /secure-web-and-api/, "Protect the API" and "Sign in users and call the API"
Issue:

  • Program.cs uses JwtBearerDefaults, OpenIdConnectDefaults, AddMicrosoftIdentityWebApi, AddMicrosoftIdentityMessageHandler, [RequiredScope] and WeatherApiClient.
  • None of the NuGet packages or using directives these need are mentioned, and WeatherApiClient is never defined.
  • Step 4 of "Run the scenario locally" ("Use a page of the web app that calls the API") assumes a page the walkthrough never builds.
Warning 8: Configuration code differs between the API and web samples

Issue:

  • API (secure-web-and-api): AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd"))
  • Web (same page): AddMicrosoftIdentityWebApp(builder.Configuration), with no section given.
  • Overview: AddAuthentication() with no scheme.

A reader may wonder whether these differences matter.

Warning 9: Ambiguous table row in "Choose a credential"

Location: /client-credentials/, "Choose a credential" table
Issue: The row "WithCertificateFromFile, WithSignedAssertionFile in TypeScript, WithCredential in C#" is ambiguous; it isn't clear which names belong to which language.
Related: "In TypeScript, an options object also accepts tokenExchangeUrl and tokenExchangeAuthority". The page doesn't say how C# users do the same thing.

Passed checks

Sidebar

  • "Security & identity › Microsoft Entra ID" renders, expanded, with 9 entries: Overview, Secure a web app and API, Redirect URIs and sign-in, Client credentials, Expose and call APIs, Application roles, Existing registrations, Customize infrastructure, Lifecycle and permissions.
  • aria-current="page" is set correctly, and all entries have trailing slashes.

Tabs

  • Every code group has TypeScript first and selected by default: overview ×2, secure ×1, redirect ×7, client-credentials ×10, lifecycle ×2.
  • Clicking C# in one group switched every group on the page (10 of 10 on client-credentials).
  • The choice persisted after navigating (starlight-synced-tabs__aspire-lang=C#).
  • The install tabs (Aspire CLI / #:package / PackageReference) render, showing aspire add azure-entraid.

Links

  • All internal links are site-relative with trailing slashes, return 200, and every cross-page anchor exists, including:
    • #settings-that-the-caller-receives
    • #declare-permissions-and-consent
    • #troubleshoot-entra-id-errors
    • #required-permissions
    • #local-developer-certificate
    • #call-microsoft-graph-and-other-first-party-apis
    • #required-privileges-for-consent
    • #grant-the-deployer-the-required-permissions
    • #understand-how-deployments-update-roles
    • #retire-scopes-and-understand-what-deployments-remove
  • The only failed anchor checks were the #tab-panel-N IDs, which are generated per render, so they are false positives.

Content

  • Prerequisites on the overview clearly separate "create registrations" from "reference existing".
  • The secure-web-and-api walkthrough has clear local and deploy steps.
  • The troubleshooting table is actionable.

Console: No content errors. The only console errors are from the dev server (dev-toolbar 504, /api/live 404).

Recommendations

  1. Priority fixes:
    • Make TypeScript and C# variable names match (W2).
    • Define, or point back to, the variables that snippets borrow from earlier sections (W1).
    • Stop using "consumers" to mean apps (W4).
    • Make the registration name and the suffix naming consistent (W5).
  2. Documentation gaps: NuGet packages and usings for the app-side code in the walkthrough, and how C# sets token-exchange options for other clouds (W7, W9).
  3. Product issues: Check whether the AddExistingEntraApplication / AddEntraIdApplication naming difference is intended (W5).
  4. Conciseness: Cut the implementation-detail passages listed below. The client-credentials local-certificate subsections and the lifecycle "transient Graph failures" and "Clean up" sections are the heaviest.

Knowledge gaps

Knowledge gap: Packages for the app-side code

What I needed to know: Which NuGet packages provide AddMicrosoftIdentityWebApi, AddMicrosoftIdentityMessageHandler, [RequiredScope] and JwtBearerDefaults.
Source of my knowledge: Prior knowledge, not the docs.
User impact: Anyone new to Microsoft.Identity.Web.
Recommendation: Add a short "App packages" note to /secure-web-and-api/.

Knowledge gap: TypeScript chaining before await

What I needed to know: Whether await builder.addX(...).withY(...) is valid in the TypeScript AppHost.
Source of my knowledge: Assumed from other Aspire TypeScript samples.
Recommendation: Use one style consistently.

Knowledge gap: Delegated vs application permissions

What I needed to know: What "delegated access" and "application identity" mean in "Application.ReadWrite.All for delegated access … Application.ReadWrite.OwnedBy".
Source of my knowledge: Prior Entra knowledge.
User impact: Non-Entra developers.
Recommendation: Link to the Entra permission types documentation.

Knowledge gap: When using Aspire.Hosting.Azure; is needed

What I needed to know: Only the file-credential C# sample includes this using. EntraIdSignInAudience (redirect page) uses the same type family without it, so I couldn't tell when the using is required.

Conciseness / relevance findings

# Route › heading Quoted passage Why it doesn't help a user Suggested change
1 overview › (preview aside) "The opt-in Aspire.Hosting.Azure.Provisioning.EntraId package, which customizes the generated infrastructure from TypeScript and other polyglot AppHosts, is experimental and reports ASPIREAZUREPROVISIONING001." An advanced package and diagnostic ID on the landing page. It is repeated verbatim in lifecycle › "Preview status". Keep "preview; APIs may change". Move the package detail to customize-infrastructure only. Delete lifecycle › "Preview status".
2 overview › Hosting integration "For example, Python's generator abbreviates Application to app, as in add_entra_id_app and with_app_owners." Describes code-generator internals. Cut, or keep only "Method names follow each language's conventions."
3 overview › Add a registration… Five-bullet dashboard state list ("starts in the Waiting state until its tenant ID and client ID are known, then validates its settings…") Long, and the Missing-subscription bullet is repeated on secure-web-and-api and in the lifecycle troubleshooting table. Shorten to two bullets (what you see; where to look on failure) and link to troubleshooting.
4 overview › Change the environment variable names The 5-bullet connection-name rules, e.g. "An empty connection name omits the prefix and its separator…", "ENTRA_CLIENT_CREDENTIALS_0_SOURCE_TYPE" Edge-case normalization rules most readers won't need. Keep the example and one rule. Collapse the rest into a details block.
5 redirect-uris › Derive redirect URIs… "If URL customization takes longer than 30 seconds to finalize, Aspire logs a warning and uses the allocated origin. If customization removes every browser URL…" and "The registration depends on the compute environment, not on the web app." Timeout internals and dependency-graph details; I couldn't act on them. Cut, or reduce to "If the registered URI doesn't match what the browser shows, supply explicit URIs."
6 redirect-uris › Use literal or parameter URIs "The generated Bicep splits parameter values on commas, so a URI can't contain a comma and entries can't have surrounding whitespace." Explains the rule through how the Bicep is generated. "Separate URIs with commas and no spaces."
7 redirect-uris › Keep browser origins consistent Whole section (PrimaryBrowserOrigin, BrowserOrigins, CORS) General endpoint API, not Entra-specific; off-topic here. Move to the networking/endpoints docs and link from one sentence.
8 client-credentials › Local developer certificate › Certificate lifetime / Where the certificate is stored / How the registration is updated "self-signed RSA certificate that is valid for 48 hours… reuses the certificate when more than 24 hours remain"; "passwordless PFX file… dev-certs/Entra/.pfx… honors Aspire:Store:Path and ASPIRE__STORE__PATH"; "Aspire owns the registration's entire keyCredentials collection"; "Microsoft Graph assigns the certificate credential ID. Aspire doesn't set keyId, which avoids targeting an immutable credential when you redeploy."; "A failed Microsoft Graph update leaves the new PFX file available for a retry." Mostly internals. Only three facts are actionable: restart within ~2 days, don't add your own certs to a dev registration, and where to delete the file. Collapse the three subsections into about four bullets.
9 client-credentials › Local developer certificate "Aspire never provisions a private key into Entra." Repeats the previous sentence ("registers only its public key"). Cut.
10 client-credentials › Create the trust… "Aspire adds a Microsoft.Graph/applications/federatedIdentityCredentials resource to the generated Bicep with these values: issuer… subject… audience…" and "Deployment order is identity, then registration, then workload." Generated-resource internals. The same issuer/subject/audience details also appear on secure-web-and-api › Deploy ("trusts the tenant's v2.0 issuer, uses the managed identity's principal ID as the subject…"). Keep the values only under "Use a managed identity trust that you created", where the user must type them. Cut them from the other two places.
11 client-credentials › Trust specific workloads… "A validation step runs after the azure-prepare-resources pipeline step and fails, naming the resource…" Names an internal pipeline step. "Publishing fails with an error naming the workload if…"
12 client-credentials › Use a managed identity trust… / Key Vault "It also doesn't enable mTLS proof-of-possession."; "The vault URI remains a deferred resource reference. A local run resolves the vault output, or its emulator endpoint…" Not something a user acts on. Cut both.
13 lifecycle › Clean up registrations "The registration offers deployment reprovisioning, cancellation, and local-state commands. It doesn't offer ARM resource inspection, relocation, or deletion… The report doesn't query Microsoft Graph to verify live objects, and it lists missing IDs as unknown." Command internals. "Delete Azure resources won't delete registrations; it lists them so you can delete them yourself."
14 lifecycle › Deploy again after transient Graph failures and Known limitations "Each registration deploys as one Bicep module. The module creates the application and, seconds later, sends more Microsoft Graph requests…"; "tracked as an upstream Microsoft Graph Bicep issue" (no link); "CLI and template onboarding, an existing-registration picker, and a local OpenID Connect emulator aren't part of 17.0." Explains the mechanism and roadmap; the three error codes are already in the troubleshooting table. Merge into the troubleshooting row ("Deploy again; this is a known transient Graph issue"). Drop the roadmap list.

Repeated across pages (pick one home for each):

  • "Existing registrations are never modified / throw InvalidOperationException": redirect intro, ID-token section, client-credentials (×2), lifecycle intro and Known limitations.
  • "Aspire never creates, stores, or rotates client secrets or certificates": client-credentials intro and lifecycle limitations.
  • "Use separate dev/prod registrations": secure-web-and-api, client-credentials aside, lifecycle.
  • Key Vault Certificate User role: client-credentials and lifecycle.
  • Application.ReadWrite.All / OwnedBy: client-credentials › How the registration is updated and the lifecycle permissions table.
  • "Registrations remain after deleting the resource group": secure-web-and-api, client-credentials limitations, lifecycle.
  • Owners: "Owners are appended… never removes" and the "Owners — Stay" table row, both on lifecycle.
Tester 2: expose and call APIs, application roles, existing registrations, customize infrastructure, PR-added Azure page sections

Documentation test report

Focus area: PR #2086, Microsoft Entra ID docs: Expose and call APIs, Application roles, Existing registrations, Customize infrastructure, and the PR-added parts of four Azure pages
Date: 2026-11-10
Tester: doc-tester agent (blind new user, rendered site only)
Site: http://localhost:4322/ (PR head 9bdd5c7)
playwright-cli session: -s=entra-b2 (closed when done; scratch files deleted)

Routes exercised:

  • /integrations/security/microsoft-entra-id/expose-and-call-apis/
  • /integrations/security/microsoft-entra-id/app-roles/
  • /integrations/security/microsoft-entra-id/existing-registrations/
  • /integrations/security/microsoft-entra-id/customize-infrastructure/
  • /integrations/cloud/azure/customize-resources/
  • /integrations/cloud/azure/local-provisioning/
  • /integrations/cloud/azure/user-assigned-identity/
  • /integrations/cloud/azure/azure-key-vault/azure-key-vault-host/
  • Link targets only: /client-credentials/#certificate-from-azure-key-vault, /microsoft-entra-id/, and /lifecycle-and-permissions/ (to check for repeated content)

Summary

Category Passed Failed Warnings
Content accuracy 8 0 5
Code examples 14 tab sets 0 6
CLI commands 1 (aspire add …Provisioning.EntraId shown) 0 0
Links 45 internal and external links and anchors 0 3

Critical issues

None. Nothing I tested was wrong in a way that would stop a user. I didn't run any code; Azure and Entra deployment was out of scope.

Warnings

Warning 1: The Key Vault default role contradicts itself across pages

Location: /integrations/cloud/azure/azure-key-vault/azure-key-vault-host/#role-based-access and the page its new sentence links to, /integrations/security/microsoft-entra-id/client-credentials/#certificate-from-azure-key-vault

  • The Key Vault page says: "By default, AddAzureKeyVault configures a Key Vault Administrator built-in role for the consuming project."
  • The linked Entra section says: "…which the vault's default Key Vault Secrets User role doesn't allow. Aspire grants the Key Vault Certificate User role automatically."

Issue: A user who follows the new link reads two different default roles. As a blind tester I can't tell which one is right.
Suggestion: Make the two pages agree.

Warning 2: The TypeScript and C# role-assignment samples aren't equivalent

Location: /app-roles/#assign-roles-to-managed-identities

Tab Caller (worker) API Identity
TypeScript addContainer("worker", "my-worker-image") addContainer("api", "my-api-image") No user-assigned identity; passes worker to publishWithAppRoleAssignment
C# AddDotnetProject AddDotnetProject AddAzureUserAssignedIdentity("caller-identity") passed to PublishWithAppRoleAssignment

Issue: The sections that follow show .NET Worker.cs and Program.cs code and rely on AZURE_CLIENT_ID from "a workload with a user-assigned identity". A TypeScript reader with a container and no explicit identity can't connect the sample to that code.
Suggestion: Make the TypeScript tab mirror the C# tab (add a user-assigned identity and use project resources), or explain the workload path explicitly.

Warning 3: The "Experimental API" aside is shown to C# readers

Location: /customize-infrastructure/#customize-the-application-and-service-principal

  • Inspecting the page shows the aside is outside the tab set, so it stays visible when C# is selected.
  • It says: "The Aspire.Hosting.Azure.Provisioning.EntraId package is experimental and reports the ASPIREAZUREPROVISIONING001 diagnostic."
  • The C# panel says: "In C#, the models are available with the Aspire.Hosting.Azure.EntraId package and need no extra package."
  • Three similar names appear together: Aspire.Hosting.Azure.Provisioning.EntraId (package), Aspire.Hosting.Azure.EntraId (package) and Aspire.Hosting.Azure.EntraId.Provisioning (namespace).

Suggestion: Move the aside inside the TypeScript tab. It doesn't explain how to acknowledge or suppress the diagnostic in a TypeScript AppHost.

Warning 4: Code is inconsistent if you combine the samples on one page

Location: /expose-and-call-apis/

  • The "Set the application ID URI" sample adds "web" at ../Web/Web.csproj. The "Declare permissions and consent" sample then adds "webfrontend" at the same ../Web/Web.csproj.
  • The "Call Microsoft Graph…" TypeScript sample declares const entraWeb again, after it was already declared under "Declare permissions and consent". It also has an import in the middle of the snippet.
  • On /customize-infrastructure/, the page says "Look them up by identifier", but the C# sample looks up the service principal with .OfType<MicrosoftGraphServicePrincipal>().Single(). The TypeScript sample uses getMicrosoftGraphServicePrincipalByIdentifier("servicePrincipal").
Warning 5: Prose uses C# method names while TypeScript is the default tab

Location: All four Entra pages.

  • The prose says WithScope, WithAdminConsent and WithApplicationIdUri() while the TypeScript tab shows withScope and withApplicationIdUri({ applicationIdUri }).
  • "keep WithApplicationIdUri() for the second deployment" (/expose-and-call-apis/#retire-a-scope) doesn't say what the TypeScript call with no URI looks like.
  • The placeholder is written two ways: api://{clientId} in most places and api://<client-id> under #validate-audiences.
Warning 6: The phrase "when you write the AppHost" is vague

Examples:

  • "Unknown names are rejected when you write the AppHost." (/expose-and-call-apis/#call-microsoft-graph-and-other-first-party-apis)
  • "Aspire validates the role names when you write the AppHost" (/app-roles/)
  • "Aspire rejects spaces and quotation marks when you write the AppHost." (/app-roles/)

Issue: I couldn't tell whether this means compile time, the moment the call runs, or aspire run startup. The Existing registrations page is precise ("when your AppHost runs the call, and throws an ArgumentException").
Suggestion: Use that precise wording everywhere.

Warning 7: Some sentences are hard to act on
  • /expose-and-call-apis/#settings-that-the-caller-receives: "Entries that would collide are rejected before anything starts. Reference API registrations that one client calls from different resources, and give one of two registrations that call the same API its own downstreamApisPrefix." I couldn't work out what to do from this.
  • /existing-registrations/#reference-an-existing-registration: "Use AddExistingEntraApplication when the AppHost only references existing registrations." This suggests it's wrong to mix it with created registrations, yet #describe-an-existing-api mixes them (entraWeb is a created registration).
  • /existing-registrations/: "In C#, pass either two literals or two parameters. To mix literals and parameters, use the TypeScript AppHost." Telling a user to switch languages is an odd fix.
Warning 8: Two external links redirect
  • https://learn.microsoft.com/entra/identity-platform/scenario-web-app-call-api-overview redirects to …scenario-web-app-call-api-app-configuration.
  • …/how-to-assign-app-role-managed-identity redirects to …/assign-app-role-managed-identity-azure-cli.

Both still return 200. Update them to the final URLs.

Passed checks

Tabs

  • On all four Entra pages, every tab set lists TypeScript first and C# second, with sync key aspire-lang.
  • Choosing C# on one tab set switched all 9 sets on the Expose page.
  • The choice persisted to /app-roles/, where both tab sets showed C#.

Links

  • All internal links on the four Entra pages resolve with HTTP 200, use site-relative paths and have trailing slashes.
  • All in-page and cross-page anchors exist, for example /redirect-uris-and-sign-in/#target-a-sovereign-cloud, /client-credentials/#managed-identity-federation and /customize-resources/#inspect-generated-bicep.
  • All 11 external Learn and Graph links return 200, and their anchors exist (#add-a-scope-requiring-admin-and-user-consent, #prerequisites, #app-roles-ui, #permissions).

PR-added bits on existing pages

  • customize-resources: the table row reads "Microsoft Entra ID | Aspire.Hosting.Azure.Provisioning.EntraId | MicrosoftGraphApplication, MicrosoftGraphServicePrincipal, MicrosoftGraphFederatedIdentityCredential". The paragraph "The Microsoft Entra ID package is the exception…" links to /customize-infrastructure/, and clicking it lands on that page's H1.
  • local-provisioning "See also": "Microsoft Entra ID integration" goes to /integrations/security/microsoft-entra-id/, H1 "Microsoft Entra ID integration".
  • user-assigned-identity "See also": the link goes to /app-roles/#assign-roles-to-managed-identities, and the H2 lands at the top of the viewport.
  • azure-key-vault-host "Role-based access": "Certificate from Azure Key Vault" goes to /client-credentials/#certificate-from-azure-key-vault, and the H2 lands at the top of the viewport.

Samples and pages

  • The complete AppHost samples define their variables and include imports (createBuilder, and using Aspire.Hosting.Azure where needed).
  • The partial snippets clearly continue from earlier samples.
  • Previous/Next navigation flows Client credentials → Expose and call APIs → Application roles.

Recommendations

  1. Priority fixes:
    • Resolve the Key Vault default-role contradiction (Warning 1).
    • Make the TypeScript and C# app-role assignment samples match (Warning 2).
    • Move the experimental aside into the TypeScript tab (Warning 3).
  2. Documentation gaps:
    • Show the TypeScript form of WithApplicationIdUri() with no URI.
    • Explain how to suppress ASPIREAZUREPROVISIONING001 in TypeScript.
    • Explain the second argument of AddMicrosoftIdentityMessageHandler.
    • Define "when you write the AppHost".
  3. Product issues: None observed. Not tested: I ran no code or deployments.

Knowledge gaps

Microsoft.Identity.Web conventions

  • What I needed to know: what [RequiredScope(RequiredScopesConfigurationKey = …)], AddMicrosoftIdentityMessageHandler(section, "DownstreamApis:apiservice"), IDownstreamApi and MapInboundClaims do.
  • Source: prior knowledge, not the docs.
  • User impact: non-.NET and new Entra users.
  • Recommendation: link to the Microsoft.Identity.Web docs instead of explaining inline.

The https+http:// service discovery scheme

  • It's used without explanation. A one-line link to the service discovery docs would cover it.

Delegated vs. application permissions and consent

  • These are explained adequately on the Expose and call APIs page. It's reasonable to assume the rest.

AADSTS28000, CannotDeleteOrUpdateEnabledEntitlement, "Enterprise applications list"

  • Entra-specific terms with no explanation. They're acceptable as error strings to search for.

Conciseness / relevance findings

# Route › heading Quoted passage Why it's not useful to a user Suggested cut or rewrite
1 expose-and-call-apis › Set the application ID URI "The client ID exists only after Microsoft Graph creates the registration, so Aspire sets the default api://{clientId} URI in a second update of the registration in the same deployment." Describes how deployment works internally; the user can't act on it. Cut. Keep "Without a custom URI, Aspire uses api://{clientId}."
2 expose-and-call-apis › Set the application ID URI "Aspire always sets requestedAccessTokenVersion to 2, which exempts the URI from the tenant's default identifier URI policy." Internal property detail. Rewrite: "If your tenant enforces a strict identifier URI policy, deployment can fail; see identifier URI formatting errors."
3 expose-and-call-apis › Set the application ID URI "Scope IDs derive from the registration and scope names, so they're the same in every deployment and tenant." How IDs are generated. Cut to "Set the scope's id to adopt an existing scope."
4 expose-and-call-apis › Pre-authorize a client "Each registration deploys as its own module. Pre-authorization makes the API's module wait for the client's ID, while a declaration makes the client's module wait for the API's ID." Module ordering is internal. Rewrite: "A pair of registrations can't use both pre-authorization and WithApiPermissions. Choose one."
5 expose-and-call-apis › Settings that the caller receives The paragraph starting "{name} is the name of each resource that references the API registration… If no resource references it, {name} is the registration's name with characters other than letters, digits, and underscores replaced by underscores… A custom API uses the letters and digits of the display name…" plus "Entries that would collide…" Very dense naming rules; most users only need one example key. Show one concrete key, such as DownstreamApis:apiservice:Scopes:0, and move the full naming rules to a reference table or cut them.
6 expose-and-call-apis › What a deployment sends (whole section) "While a registration is declared as an API… Aspire sends its application ID URIs, scopes, and pre-authorized clients in full… Graph replaces each list…" This describes how Aspire talks to Graph. The user-relevant fact is short. Replace with: "Portal edits to scopes, URIs, or pre-authorized clients are overwritten on the next deployment. Once nothing declares the API, Aspire stops managing these and leaves them in place."
7 expose-and-call-apis › Existing API registrations "Aspire doesn't modify existing registrations. To reference an existing API's scopes, supply its registered URI with WithApplicationIdUri and describe its scopes with WithScope. Set the scope's ID…" Near-verbatim repeat of existing-registrations › Describe an existing API. Replace with a one-line link.
8 expose-and-call-apis › Required privileges for consent and app-roles › Grant the deployer the required permissions e.g. "For delegated permissions, the identity needs a directory role such as Privileged Role Administrator, Cloud Application Administrator, or Application Administrator, or the DelegatedPermissionGrant.ReadWrite.All…" Repeated nearly word-for-word in the /lifecycle-and-permissions/ table ("A directory role such as Privileged Role Administrator, Cloud Application Administrator, or Application Administrator, or the DelegatedPermissionGrant.ReadWrite.All Graph permission."). Keep it in one place (Lifecycle and permissions) and link to it from both pages.
9 Several pages: existing-registrations intro, the existing-registrations table, app-roles Caution and Limitations, expose-and-call-apis twice, lifecycle "Aspire never creates, queries, or modifies an existing registration" / "Aspire never modifies an existing registration" / "Aspire doesn't modify an existing client registration" Repeated about 6 times across pages. State it once on Existing registrations and link to it elsewhere.
10 app-roles › intro, Retire a role, and Limitations "It doesn't assign roles to users, groups, or applications." (intro and Limitations); "You can't remove the last declared role…" (Retire a role) vs "Aspire can't delete the last declared role, because it sends no appRoles when none remain." (Limitations); "WithAppRole throws for registrations that you add with AddExistingEntraApplication" (Caution) vs "PublishWithAppRoleAssignment throws for existing registrations." (Limitations) The same limitations appear twice on one page. Keep each in one section only. Drop "because it sends no appRoles", which is an internal detail.
11 app-roles › Declare application roles (table) "passed through to Microsoft Graph"; "When omitted, Aspire derives a stable ID from the registration's resource name and the role value." Implementation detail. "Optional. Defaults to a stable ID."
12 app-roles › Grant the deployer… "Aspire assigns the role to the identity's principal (object) ID, not to its client ID." Internal detail unless you're troubleshooting in the portal. Cut, or move to a troubleshooting tip.
13 existing-registrations › Choose how to reference the registration "AddEntraIdApplication enables Azure provisioning before AsExistingApplication runs, and the fluent API doesn't undo that setup." Describes the internal call order. Rewrite: "With AsExistingApplication, deployment still requires Azure provisioning configuration."
14 existing-registrations › Choose how to reference the registration "Aspire checks this before it changes the resource, so a failed conversion leaves the IDs unchanged." and "An existing registration isn't part of the publish manifest, so deployment generates no Bicep for it." Internal guarantees and manifest detail. Cut the first. Shorten the second to "Nothing is deployed for an existing registration."
15 existing-registrations › Describe an existing API "Aspire needs the scope ID… because it can't derive the ID that the existing registration defines. Without an application ID URI, GetScopeUri throws, because a guessed URI would fail later as a token error." The rationale isn't needed. "Set the scope ID when another registration declares permissions to it. GetScopeUri requires an application ID URI."
16 existing-registrations › Validation "After validation, the resource moves from Waiting to Running. When a value is missing or malformed, the resource reports FailedToStart and logs the reason." Borderline; acceptable as troubleshooting, but long. Shorten to one sentence.
17 customize-infrastructure › Select the right declaration "A registration that exposes an API with the default api://{clientId} application ID URI declares the application a second time, because the client ID is known only after the first declaration deploys. The second declaration repeats the display name and unique name." Internal Bicep structure; the only action is "select by identifier". "Always select the application by its Bicep identifier application, because there can be more than one MicrosoftGraphApplication."
18 customize-infrastructure › Select the right declaration The list of six proxy model names Reference trivia; the samples only use two. Cut, or collapse into a sentence.
19 customize-infrastructure › Know how the module is generated (whole section) "The module declares the Microsoft Graph Bicep extension from a pinned registry reference, br:mcr.microsoft.com/…:1.0.0. You don't need a bicepconfig.json…" and "The module outputs clientId, tenantId, objectId, servicePrincipalId, and uniqueName…" Mostly implementation detail. The useful fact is network reachability. Keep one note: "The first deployment downloads the Microsoft Graph Bicep extension from mcr.microsoft.com, so that host must be reachable." Cut the rest.
20 customize-infrastructure › intro "The module uses the Microsoft Graph Bicep extension to declare the application, the service principal, and any federated credentials, permission grants, and role assignments…" Overlaps with #19. Trim to "Use ConfigureInfrastructure to set properties Aspire doesn't model, such as tags and the service management reference."

Apply the doc review findings: fix the expose-and-call-apis C# sample,
give the sovereign Graph sample its own registration, remove claims that
the source doesn't support, and cut implementation details. Qualify the
x5c rollover claim and add service defaults for the API health endpoint.

Co-authored-by: Copilot App <[email protected]>
Use endpoint-derived redirect URIs in the first examples, say app instead
of workload, put certificate and managed identity credentials before
client secrets, simplify the web app token acquisition sample, drop the
experimental diagnostic ID, and remove the Key Vault page cross-reference.

Co-authored-by: Copilot App <[email protected]>
Eric Erhardt (eerhardt) added a commit that referenced this pull request Nov 11, 2026
## Summary

Follow-up to #2086. These changes address the documentation gaps found
in the Entra ID hosting integration security review and threat model
(microsoft/aspire#21080). That review was an engineering review, not a
formal security sign-off.

- **Tenant-wide consent (`WithAdminConsent`)**
(`expose-and-call-apis.mdx`, `lifecycle-and-permissions.mdx`): Explain
that consent applies to the whole tenant without a prompt. Note that
Graph application permissions reach deployed apps through managed
identity federation. Recommend treating high-privilege permissions as
admin access, reviewing consent changes in PRs, and deploying from CI
with a least-privilege identity.
- **Grants and credentials are never revoked**
(`lifecycle-and-permissions.mdx`): Add a new "Revoke what remains"
section with Azure CLI and Graph commands that delete grants, app role
assignments, and certificate credentials.
- **Local developer certificate** (`client-credentials.mdx`): The tenant
resource suffix is empty by default. If a run reaches a production
registration, it replaces that registration's certificate credentials,
and publishing doesn't remove the dev key. The local PFX isn't password
protected and isn't cleaned up.
- **Vault-wide Key Vault Certificate User role**
(`client-credentials.mdx`, `lifecycle-and-permissions.mdx`): Add a
caution that the role covers every certificate in the vault, and
recommend a dedicated vault.
- **Redirect URIs** (`redirect-uris-and-sign-in.mdx`): Aspire passes
URIs through as they are, and Entra enforces its own restrictions.
Recommend exact HTTPS URIs and restricting who can set host parameters.

## Third-party links and affiliations

None. The new links point to Microsoft Learn
(`learn.microsoft.com/entra/identity-platform/reply-url`) and the
Microsoft Entra admin center.

## Validation

- Confirmed that every internal anchor (`#revoke-what-remains`,
`#role-assignments-for-certificate-access`,
`#managed-identity-federation`, `#required-permissions`) matches an
existing heading.
- `git diff --check`: passed.
- `prettier --check` on the changed files reported issues. It reports
the same issues on the unmodified baseline files, so I didn't reformat
them.
- I didn't run the site build or lint.

---------

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 68b00e03-418b-4839-88a1-d0ebfc318f60
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.

2 participants