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
Copy file name to clipboardExpand all lines: docs/AVMPostDeploymentGuide.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ After successfully deploying the Content Processing Solution Accelerator using t
14
14
2.**Process sample files** — upload and process sample claim bundles for verification
15
15
3.**Configure authentication** — set up app registration for secure access
16
16
17
-
> **Note:**When deploying via `azd up`, schema registration and sample processing happen automatically through a post-provisioning hook. AVM deployments require the manual steps below.
17
+
> **Note:**Post-deployment data setup and authentication are manual steps for both `azd` and AVM deployments. Run the scripts in this guide after infrastructure provisioning.
18
18
19
19
## Prerequisites
20
20
@@ -85,7 +85,7 @@ The workflow for each bundle:
85
85
86
86
You can perform these steps via the web UI or the API directly. See the [API documentation](./API.md) and [Golden Path Workflows](./GoldenPathWorkflows.md) for details.
87
87
88
-
> **Note:**When deploying via `azd up`, sample file processing happens automatically as Step 4 of the post-provisioning hook.
88
+
> **Note:**In `azd` and AVM flows, sample file processing runs when you execute the post-deployment script manually.
Copy file name to clipboardExpand all lines: docs/ConfigureAppAuthentication.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,17 @@
1
1
# Set up Authentication in Azure Container App
2
2
3
-
> ### ✅ Automatic configuration is now the default
3
+
> ### ✅ Recommended: run the authentication script first
4
4
>
5
-
> As of the latest release, `azd up`**automatically** performs all of the steps below via the `infra/scripts/configure_auth.{sh,ps1}` post-provisioning hook. You should not need to follow this document in most cases.
5
+
> `azd up`no longer runs authentication setup automatically. Run the script below after deployment:
6
6
>
7
-
> See [DeploymentGuide.md § 5.2](./DeploymentGuide.md#52-configure-authentication-automatic) for details, including how to opt out with `azd env set AZURE_SKIP_AUTH_SETUP true`.
>- You set `AZURE_SKIP_AUTH_SETUP=true` before running `azd up`
11
-
> - The automatic script reported an error (most commonly: your identity lacks permission to grant admin consent — a tenant admin still has to consent, but the rest of the configuration is already complete)
10
+
> See [DeploymentGuide.md § 5.2](./DeploymentGuide.md#52-configure-authentication-manual-script) for details.
11
+
>
12
+
> Follow the portal/manual steps below if:
12
13
> - Your tenant policy prohibits programmatic app registration or secret creation
14
+
> - The script reports a permission or policy failure that cannot be resolved in your current identity
13
15
14
16
This document provides step-by-step instructions to configure Azure App Registrations for the front-end and back-end applications.
Copy file name to clipboardExpand all lines: docs/CustomizeSchemaData.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ The response returns a Schema `Id` — **save this** for Step 3.
166
166
167
167
### Option B: Register via script (batch)
168
168
169
-
> **Note:**The default sample schemas are registered **automatically** during `azd up` via the post-provisioning hook. You only need to run the script manually if you are adding custom schemas or if automatic registration was skipped.
169
+
> **Note:**Default sample schemas are registered when you run the post-deployment script manually (see Deployment Guide Step 5.1). Run this script again whenever you add or update schemas.
170
170
171
171
For bulk registration, use the provided script with a JSON manifest. The script performs three steps automatically:
172
172
1.**Registers** individual schema files via `/schemavault/`
> Want to customize the schemas for your own documents? [Learn more about adding your own schemas here.](./CustomizeSchemaData.md)
306
+
> Want to customize the schemas for your own documents? [Learn more about adding your own schemas here.](./CustomizeSchemaData.md)
307
307
308
-
Schema registration happens **automatically** as part of the `azd up` post-provisioning hook — no manual steps required. After infrastructure is deployed, the hook:
308
+
`azd up` now provisions infrastructure and application containers only. Post-provision data setup is split into **separate manual steps** so you can run, retry, or skip them independently.
309
309
310
-
1. Waits for the API container app to be ready
311
-
2. Registers the sample schema files (auto claim, damaged car image, police report, repair estimate)
312
-
3. Creates an **"Auto Claim"** schema set
313
-
4. Adds all registered schemas into the schema set
314
-
5. Processes sample file bundles (`claim_date_of_loss/` and `claim_hail/`) — creates claim batches, uploads files with their mapped schemas, and submits them for processing
310
+
Run schema registration first to:
315
311
316
-
After successful deployment, the terminal displays container app details and schema registration output:
312
+
1. Wait for the API container app to be ready
313
+
2. Register the sample schema files (auto claim, damaged car image, police report, repair estimate)
Starting with this release, authentication is configured **automatically** as part of the `azd up` post-provisioning hook. The hook:
323
+
**macOS/Linux:**
390
324
391
-
1. Creates two Entra ID app registrations (`<env>-web-app`, `<env>-api-app`) with the correct redirect URIs, exposed scopes, and required permissions
392
-
2. Grants admin consent (best effort — see note below)
393
-
3. Mints client secrets and stores them in Container Apps secrets
394
-
4. Enables the Microsoft identity provider on both the Web and API container apps
395
-
5. Restricts the API to only accept tokens from the Web app (`allowedApplications`)
396
-
6. Sets the `APP_WEB_CLIENT_ID`, `APP_WEB_SCOPE`, `APP_API_SCOPE`, and `APP_AUTH_ENABLED` environment variables on the Web container
325
+
```bash
326
+
sed -i 's/\r$//' ./infra/scripts/register_schemas.sh
327
+
bash ./infra/scripts/register_schemas.sh
328
+
```
397
329
398
-
You will see an **`🔐 Configuring Entra ID authentication`** section in the `azd up` output, ending with a summary of both client IDs and scopes.
330
+
The script is idempotent and safe to re-run.
399
331
400
-
>**Note:** EasyAuth can take up to 10 minutes to fully propagate. If the Web app returns 500/401 immediately after deployment, wait a few minutes and retry.
332
+
### 5.2 Run Sample Data Upload (Manual)
401
333
402
-
#### When automatic configuration is not possible
334
+
After schema registration completes, upload the sample bundles as a separate explicit step. This step:
403
335
404
-
Automatic configuration requires permission to:
405
-
- Create Entra ID app registrations (**Application Administrator** or equivalent)
406
-
- Grant admin consent for delegated permissions (**Cloud Application Administrator** or **Global Administrator**)
336
+
1. Resolves the existing **Auto Claim** schema set and registered schema IDs
337
+
2. Creates sample claim batches for`claim_date_of_loss` and `claim_hail`
338
+
3. Uploads each file with its mapped schema
339
+
4. Submits each claim batch for processing
407
340
408
-
If your identity cannot grant admin consent, the script prints a clear manual action message like:
341
+
**Windows (PowerShell):**
409
342
343
+
```powershell
344
+
./infra/scripts/upload_sample_data.ps1
410
345
```
411
-
⚠️ Admin consent failed. Sign-in may fail until a tenant admin runs:
412
-
az ad app permission admin-consent --id <web-client-id>
413
-
Or visit: https://login.microsoftonline.com/<tenant>/adminconsent?client_id=<web-client-id>
346
+
347
+
**macOS/Linux:**
348
+
349
+
```bash
350
+
sed -i 's/\r$//' ./infra/scripts/upload_sample_data.sh
351
+
bash ./infra/scripts/upload_sample_data.sh
414
352
```
415
353
416
-
In that case, share the command/URL with your tenant administrator.
354
+
### 5.3 Configure Authentication (Manual Script)
355
+
356
+
Run authentication setup as an explicit step after post-deployment data setup:
357
+
358
+
**Windows (PowerShell):**
417
359
418
-
#### Skipping automatic auth configuration
360
+
```powershell
361
+
./infra/scripts/setup_auth.ps1
362
+
```
419
363
420
-
If your tenant blocks programmatic app registration, or you prefer to configure authentication manually, disable the automation before running `azd up`:
364
+
**macOS/Linux:**
421
365
422
366
```bash
423
-
azd env set AZURE_SKIP_AUTH_SETUP true
367
+
sed -i 's/\r$//' ./infra/scripts/setup_auth.sh
368
+
bash ./infra/scripts/setup_auth.sh
424
369
```
425
370
426
-
Then follow the manual instructions: [App Authentication Configuration (manual)](./ConfigureAppAuthentication.md).
371
+
The auth script is idempotent and performs preflight validation before making changes.
- Grant admin consent: **Cloud Application Administrator** or **Global Administrator**
377
+
- Update Container Apps auth/secret settings: **Contributor** on the deployment resource group
427
378
428
-
#### Re-running
379
+
If permissions are insufficient, the script exits early (or warns before consent) with clear remediation guidance.
429
380
430
-
The automation is idempotent: re-running `azd up` reuses the existing app registrations (IDs are persisted in`AZURE_AUTH_WEB_CLIENT_ID` / `AZURE_AUTH_API_CLIENT_ID`in the azd environment) and does not rotate client secrets.
381
+
>**Note:** EasyAuth can take up to 10 minutes to fully propagate. If the Web app returns 500/401 immediately after setup, wait a few minutes and retry.
431
382
432
383
#### WAF (Well-Architected Framework) deployments
433
384
434
-
The automation is fully compatible with the WAF / production profile (`main.waf.parameters.json`, which enables `enablePrivateNetworking`, `enableRedundancy`, and `enableScalability`). The Web and API container apps keep external ingress in the default WAF profile, so the redirect URIs registered by the script (`https://<fqdn>/.auth/login/aad/callback`) remain the correct public entry points. All script operations use the Azure management plane (Graph + ARM) and are unaffected by the private networking applied to backend resources such as Storage, Cosmos DB, and ACR.
385
+
Authentication script execution is fully compatible with the WAF / production profile (`main.waf.parameters.json`, which enables `enablePrivateNetworking`, `enableRedundancy`, and `enableScalability`). The Web and API container apps keep external ingress in the default WAF profile, so registered redirect URIs (`https://<fqdn>/.auth/login/aad/callback`) remain valid public entry points.
435
386
436
-
> If you further customize the WAF deployment to make the Web or API container app ingress **internal-only**, automatic configuration still runs, but end-user access to the sign-in page will require reaching the private endpoint (e.g., via the deployed jumpbox or a VPN).
387
+
> If you customize WAF to make Web or API ingress internal-only, run the auth script from an environment that can reach those private endpoints (for example, the deployed jumpbox or a VPN-connected host).
437
388
438
-
### 5.3 Verify Deployment
389
+
### 5.4 Verify Deployment
439
390
440
391
1. Access your application using the **Web App Endpoint** from the deployment output.
441
392
2. Confirm the application loads successfully.
442
393
3. Verify you can sign in with your authenticated account.
443
394
444
-
### 5.4 Test the Application
395
+
### 5.5 Test the Application
445
396
446
-
>**Note:**The post-deployment hook automatically uploads and processes two sample claim bundles (`claim_date_of_loss` and `claim_hail`). You can verify the results in the web app immediately after deployment.
397
+
>**Note:**If you ran [Step 5.2](#52-run-sample-data-upload-manual), two sample claim bundles (`claim_date_of_loss` and `claim_hail`) should already be processed in the web app.
447
398
448
399
**Quick Test Steps:**
449
400
1. **Check Processed Results**: Open the web app — you should see the two sample claim batches already processed with extracted data.
0 commit comments