Skip to content

Commit 184af06

Browse files
author
Shreyas-Microsoft
committed
Added permissions, env reuse, resource naming, troubleshooting and success criteria with golden path workflow
1 parent 1e3269f commit 184af06

File tree

3 files changed

+445
-8
lines changed

3 files changed

+445
-8
lines changed

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Content processing solution accelerator
2-
Extract data and apply schemas across your multi-modal content, with confidence scoring and user validation enabling greater speed of data ingestion. Process claims, invoices, contracts and other documents quickly and accurately by extracting information from unstructured content and mapping it to a structured format. This template supports text, images, tables and graphs.
2+
Extract data and apply sche### How to install or deploy
3+
Follow the quick deploy steps on the deployment guide to deploy this solution to your own Azure subscription.
4+
5+
> **⚠️ Prerequisites Check:** Ensure you have **Owner + User Access Administrator** roles in your Azure subscription for smooth deployment. See [Prerequisites](#prerequisites-and-costs) below for details.
6+
7+
> **Note:** This solution accelerator requires **Azure Developer CLI (azd) version 1.18.0 or higher**. Please ensure you have the latest version installed before proceeding with deployment. [Download azd here](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd).
8+
9+
**🚀 Quick Start:**
10+
1. **Check Prerequisites** - Verify your Azure permissions and quota availability
11+
2. **Create Environment** - Use `azd env new <environment-name>` (max 14 chars, alphanumeric only)
12+
3. **Deploy** - Run `azd up` and follow the prompts
13+
4. **Validate** - Use our deployment validation checklist to ensure success
14+
15+
[📖 **Click here for the complete deployment guide**](./docs/DeploymentGuide.md)ross your multi-modal content, with confidence scoring and user validation enabling greater speed of data ingestion. Process claims, invoices, contracts and other documents quickly and accurately by extracting information from unstructured content and mapping it to a structured format. This template supports text, images, tables and graphs.
316

417
These capabilities can be applied to numerous use cases including: contract processing, claims processing, invoice processing, ID verification, and clinician-patient visit record summarization.
518

@@ -84,10 +97,32 @@ Follow the quick deploy steps on the deployment guide to deploy this solution
8497
> ⚠️ **Important: Check Azure OpenAI Quota Availability**
8598
<br/>To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./docs/quota_check.md) before you deploy the solution.
8699
100+
> 🛠️ **Need Help?** Check our [Troubleshooting Guide](./docs/TroubleShootingSteps.md) for solutions to 25+ common deployment issues.
101+
87102
<br/>
88103

89104
### Prerequisites and costs
90-
To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups, resources, app registrations, and assign roles at the resource group level**. This should include Contributor role at the subscription level and Role Based Access Control role on the subscription and/or resource group level. Follow the steps in [Azure Account Set Up](./docs/AzureAccountSetup.md).
105+
106+
#### Required Permissions
107+
To deploy this solution accelerator, you need **Azure subscription access** with the following permissions:
108+
109+
**✅ Recommended Permissions (Simplest Setup):**
110+
- **Owner** role at the subscription or resource group level
111+
- **User Access Administrator** role at the subscription or resource group level
112+
113+
> **Note:** These elevated permissions are required because the deployment creates Managed Identities and assigns roles to them automatically.
114+
115+
**⚠️ Alternative Least-Privilege Setup:**
116+
If you cannot use Owner + User Access Administrator roles, you'll need the following minimum permissions:
117+
118+
| Permission | Required For | Scope |
119+
|------------|-------------|-------|
120+
| **Contributor** | Creating and managing Azure resources | Subscription or Resource Group |
121+
| **User Access Administrator** | Assigning roles to Managed Identities | Resource Group |
122+
| **Application Administrator** (Azure AD) | Creating app registrations for authentication | Tenant |
123+
| **Role Based Access Control Administrator** | Managing role assignments | Resource Group |
124+
125+
> **Important:** With least-privilege setup, you may need to perform some manual steps during deployment. Follow the steps in [Azure Account Set Up](./docs/AzureAccountSetup.md) for detailed guidance.
91126
92127
Here are some example regions where the services are available: East US, East US2, Australia East, UK South, France Central, Africa.
93128

docs/DeploymentGuide.md

Lines changed: 203 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,27 @@
22

33
## **Pre-requisites**
44

5-
To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups, resources, app registrations, and assign roles at the resource group level**. This should include Contributor role at the subscription level and Role Based Access Control role on the subscription and/or resource group level. Follow the steps in [Azure Account Set Up](./AzureAccountSetup.md).
5+
### Required Permissions & Access
6+
7+
To deploy this solution accelerator, you need **Azure subscription access** with the following permissions:
8+
9+
**✅ Recommended Permissions (Simplest Setup):**
10+
- **Owner** role at the subscription or resource group level
11+
- **User Access Administrator** role at the subscription or resource group level
12+
13+
> **Note:** These elevated permissions are required because the deployment creates Managed Identities and assigns roles to them automatically.
14+
15+
**⚠️ Alternative Least-Privilege Setup:**
16+
If you cannot use Owner + User Access Administrator roles, you'll need the following minimum permissions:
17+
18+
| Permission | Required For | Scope |
19+
|------------|-------------|-------|
20+
| **Contributor** | Creating and managing Azure resources | Subscription or Resource Group |
21+
| **User Access Administrator** | Assigning roles to Managed Identities | Resource Group |
22+
| **Application Administrator** (Azure AD) | Creating app registrations for authentication | Tenant |
23+
| **Role Based Access Control Administrator** | Managing role assignments | Resource Group |
24+
25+
> **Important:** With least-privilege setup, you may need to perform some manual steps during deployment. Follow the steps in [Azure Account Set Up](./AzureAccountSetup.md) for detailed guidance.
626
727
Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=all&regions=all) page and select a **region** where the following services are available:
828

@@ -34,6 +54,20 @@ This will allow the scripts to run for the current session without permanently c
3454

3555
⚠️ To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./quota_check.md) before you deploy the solution.
3656

57+
### **🛠️ Troubleshooting & Common Issues**
58+
59+
**Before you start deployment**, be aware of these common issues and solutions:
60+
61+
| **Common Issue** | **Quick Solution** | **Full Guide Link** |
62+
|-----------------|-------------------|---------------------|
63+
| **ReadOnlyDisabledSubscription** | Check if you have an active subscription | [Troubleshooting Guide](./TroubleShootingSteps.md#readonlydisabledsubscription) |
64+
| **InsufficientQuota** | Verify quota availability | [Quota Check Guide](./quota_check.md) |
65+
| **ResourceGroupNotFound** | Create new environment with `azd env new` | [Troubleshooting Guide](./TroubleShootingSteps.md#resourcegroupnotfound) |
66+
| **InvalidParameter (Workspace Name)** | Use compliant names (3-33 chars, alphanumeric) | [Troubleshooting Guide](./TroubleShootingSteps.md#workspace-name---invalidparameter) |
67+
| **ResourceNameInvalid** | Follow Azure naming conventions | [Troubleshooting Guide](./TroubleShootingSteps.md#resourcenameinvalid) |
68+
69+
> **🚨 If you encounter deployment errors:** Check the [complete troubleshooting guide](./TroubleShootingSteps.md) with 25+ common error solutions.
70+
3771
<br/>
3872

3973

@@ -146,6 +180,60 @@ To adjust quota settings, follow these [steps](./AzureGPTQuotaSettings.md).
146180

147181
Once you've opened the project in [Codespaces](#github-codespaces), [Dev Containers](#vs-code-dev-containers), or [locally](#local-environment), you can deploy it to Azure by following these steps:
148182
183+
#### **🔄 Important: Environment Management for Redeployments**
184+
185+
> **⚠️ CRITICAL:** If you're redeploying or have deployed this solution before, you **MUST** create a fresh environment to avoid conflicts and deployment failures.
186+
187+
**Choose one of the following before deployment:**
188+
189+
**Option A: Create a completely new environment (Recommended)**
190+
```shell
191+
azd env new <new-environment-name>
192+
```
193+
194+
**Option B: Reinitialize in a new directory**
195+
```shell
196+
# Navigate to a new directory
197+
cd ../my-new-deployment
198+
azd init -t microsoft/content-processing-solution-accelerator
199+
```
200+
201+
> **💡 Why is this needed?** Azure resources maintain state information tied to your environment. Reusing an old environment can cause naming conflicts, permission issues, and deployment failures.
202+
203+
#### **📝 Environment Naming Requirements**
204+
205+
When creating your environment name, follow these rules:
206+
- **Maximum 14 characters** (will be expanded to meet Azure resource naming requirements)
207+
- **Only lowercase letters and numbers** (a-z, 0-9)
208+
- **No special characters** (-, _, spaces, etc.)
209+
- **Must start with a letter**
210+
- **Examples:** `cpsapp01`, `mycontentapp`, `devtest123`
211+
212+
**Invalid names:** `cps-app`, `CPS_App`, `content-processing`, `my app`
213+
**Valid names:** `cpsapp01`, `mycontentapp`, `devtest123`
214+
215+
> **🛠️ Need help generating a compliant name?** Use our name generator script:
216+
> ```powershell
217+
> .\infra\scripts\generate-environment-name.ps1
218+
> ```
219+
> Or run interactively: `.\infra\scripts\generate-environment-name.ps1 -Interactive`
220+
221+
#### **🧹 Environment Cleanup**
222+
223+
> **💡 Tip:** If you have old environments that failed deployment or are no longer needed, use our cleanup script:
224+
> ```powershell
225+
> # List all environments
226+
> .\infra\scripts\cleanup-environments.ps1 -ListOnly
227+
>
228+
> # Clean up a specific environment
229+
> .\infra\scripts\cleanup-environments.ps1 -EnvironmentName "oldenvname"
230+
>
231+
> # Clean up environment AND Azure resource group
232+
> .\infra\scripts\cleanup-environments.ps1 -EnvironmentName "oldenvname" -DeleteResourceGroup
233+
> ```
234+
235+
#### **🚀 Deployment Steps**
236+
149237
1. Login to Azure:
150238

151239
```shell
@@ -171,7 +259,7 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
171259
```
172260
> **Note:** This solution accelerator requires **Azure Developer CLI (azd) version 1.18.0 or higher**. Please ensure you have the latest version installed before proceeding with deployment. [Download azd here](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd).
173261

174-
3. Provide an `azd` environment name (e.g., "cpsapp").
262+
3. **Provide an `azd` environment name** - Use the naming requirements above (e.g., "cpsapp01").
175263
4. Select a subscription from your Azure account and choose a location that has quota for all the resources.
176264
- This deployment will take *4-6 minutes* to provision the resources in your account and set up the solution with sample data.
177265
- If you encounter an error or timeout during deployment, changing the location may help, as there could be availability constraints for the resources.
@@ -308,9 +396,118 @@ To help you get started, here's the [Sample Workflow](./SampleWorkflow.md) you c
308396
- Copy the necessary environment variable values and paste them into your local `.env` file.
309397
310398
399+
## 🎯 Deployment Success Validation
400+
401+
After deployment completes, use this checklist to verify everything is working correctly:
402+
403+
### **✅ Deployment Validation Checklist**
404+
405+
**1. Basic Deployment Verification**
406+
- [ ] `azd up` completed successfully without errors
407+
- [ ] All Azure resources are created in the resource group
408+
- [ ] Both Web and API container apps are running
409+
410+
**2. Container Apps Health Check**
411+
```powershell
412+
# Test Web App (replace <your-web-app-url> with actual URL from deployment output)
413+
curl -I https://<your-web-app-url>/
414+
415+
# Test API App (replace <your-api-app-url> with actual URL)
416+
curl -I https://<your-api-app-url>/health
417+
```
418+
**Expected Result:** Both should return HTTP 200 status
419+
420+
**3. Authentication Configuration**
421+
- [ ] App authentication is configured (see [App Authentication Guide](./ConfigureAppAuthentication.md))
422+
- [ ] You can access the web application without errors
423+
- [ ] Login flow works correctly
424+
425+
**4. Sample Data Processing Test**
426+
```powershell
427+
# Navigate to API samples directory
428+
cd src/ContentProcessorAPI/samples/schemas
429+
430+
# Register sample schemas (use your API endpoint)
431+
./register_schema.ps1 https://<your-api-endpoint>/schemavault/ .\schema_info_ps1.json
432+
433+
# Upload sample documents (use returned schema IDs)
434+
cd ../
435+
./upload_files.ps1 https://<your-api-endpoint>/contentprocessor/submit .\invoices <Invoice-Schema-ID>
436+
```
437+
**Expected Result:** Files upload successfully and appear in the web interface
438+
439+
**5. End-to-End Workflow Test**
440+
- [ ] Can select a schema in the web interface
441+
- [ ] Can upload a document successfully
442+
- [ ] Document processes to "Completed" status
443+
- [ ] Can view extracted data in the web interface
444+
- [ ] Can modify and save extracted data
445+
- [ ] Can view process steps and logs
446+
447+
### **🧪 Sample Test Commands**
448+
449+
**API Health Check:**
450+
```bash
451+
curl https://<your-api-endpoint>/health
452+
```
453+
454+
**Web App Accessibility:**
455+
```bash
456+
curl -I https://<your-web-endpoint>/
457+
```
458+
459+
**Schema Registration Verification:**
460+
```bash
461+
curl https://<your-api-endpoint>/schemavault/schemas
462+
```
463+
464+
### **📊 Success Indicators**
465+
466+
**Deployment is successful when:**
467+
- ✅ Web app loads without errors
468+
- ✅ API health endpoint returns `{"status": "healthy"}`
469+
- ✅ Sample schemas register successfully
470+
- ✅ Sample documents upload and process completely
471+
- ✅ Authentication works (after configuration)
472+
- ✅ All container apps show "Running" status in Azure Portal
473+
474+
### **🔍 Troubleshooting Failed Validation**
475+
476+
**If any checks fail:**
477+
1. Check Azure Portal → Resource Group → Container Apps for error logs
478+
2. Review deployment logs: `azd show`
479+
3. Verify all post-deployment steps are completed
480+
4. Check [Troubleshooting Guide](./TroubleShootingSteps.md) for specific error solutions
481+
311482
## Next Steps
312483
313-
Now that you've completed your deployment, you can start using the solution. Try out these things to start getting familiar with the capabilities:
314-
* Open the web container app URL in your browser and explore the web user interface and upload your own invoices.
315-
* [Create your own schema definition](./CustomizeSchemaData.md), so you can upload and process your own types of documents.
316-
* [Ingest the API](API.md) for processing documents programmatically.
484+
Now that you've validated your deployment, you can start using the solution:
485+
486+
### **🚀 Getting Started**
487+
* **Try the Sample Workflow:** Follow our [Sample Workflow Guide](./SampleWorkflow.md) for a step-by-step walkthrough
488+
* **Upload Your Own Documents:** Open the web container app URL and explore the user interface
489+
* **Create Custom Schemas:** [Learn how to add your own document schemas](./CustomizeSchemaData.md)
490+
* **API Integration:** [Explore programmatic document processing](API.md)
491+
492+
### **🎯 Golden Path Workflows**
493+
494+
For the best experience, follow our **[Golden Path Workflows Guide](./GoldenPathWorkflows.md)** which includes:
495+
496+
1. **Invoice Processing Golden Path:**
497+
- Complete step-by-step invoice processing workflow
498+
- Learn confidence scoring and validation features
499+
- Practice data modification and approval processes
500+
501+
2. **Property Claims Golden Path:**
502+
- Advanced form processing with complex data structures
503+
- Multi-modal content extraction (text, images, tables)
504+
- Validation rule application and quality assurance
505+
506+
3. **Custom Document Processing:**
507+
- Create and test your own document schemas
508+
- Optimize extraction quality through iterative refinement
509+
- Scale to production volumes with best practices
510+
511+
> **📖 [Complete Golden Path Workflows Guide](./GoldenPathWorkflows.md)** - Detailed step-by-step instructions, expected outcomes, and best practices.
512+
513+
> **💡 Pro Tip:** The solution includes confidence scoring and human-in-the-loop validation. Use the confidence thresholds to determine which documents need manual review. The golden path workflows will teach you how to interpret and act on these scores effectively.

0 commit comments

Comments
 (0)