You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(deploy): resolve auth + sample-bundle issues uncovered in e2e
configure_auth.sh / configure_auth.ps1:
- Set globalValidation (requireAuthentication, unauthenticatedClientAction,
redirectToProvider) directly in the authConfig PUT — the CLI flags were not
reliably populating redirectToProvider, leaving the Web app responding 401
to browser users instead of redirecting to AAD.
- Explicitly POST oauth2PermissionGrants to grant the API user_impersonation
scope to the Web service principal. 'az ad app permission admin-consent'
silently consents Microsoft Graph only and skips custom-API delegated
scopes, which made MSAL acquireTokenSilent fail and rendered a blank SPA
after successful login.
- Override APP_WEB_AUTHORITY env var on the Web container app so MSAL.js
uses a properly-formed authority URL.
- Restart Web + API container revisions after secrets/env updates so the
new values take effect without a manual restart.
infra/main.bicep:
- Drop redundant slash in APP_WEB_AUTHORITY composition; loginEndpoint
already has a trailing slash, so '${loginEndpoint}/${tenantId}' produced
a double-slash URL that broke MSAL.
infra/scripts/post_deployment.sh:
- Fix bash array iteration in Step 4b schema-id lookup. The previous
'for RID in $REGISTERED_IDS' de-references the array as a scalar (only
the first element), causing only one file per sample bundle to upload.
Switched to indexed iteration with ${!REGISTERED_IDS[@]} and a name
lookup against REGISTERED_NAMES[$i].
# - Both: reset allowedAudiences to only the clientId, normalize openIdIssuer
329
359
patch_authconfig() {
330
360
local ca_name="$1"
331
361
local client_id="$2"
332
-
local add_web_allowed="$3"# "true" / "false"
362
+
local add_web_allowed="$3"# "true" (API side) / "false" (Web side)
333
363
local url="/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${RESOURCE_GROUP}/providers/Microsoft.App/containerApps/${ca_name}/authConfigs/current?api-version=2024-03-01"
0 commit comments