Skip to content

Critical: Remove UserSecretsId and update package references to latest versions #7

Description

🚨 Critical Updates Needed - Propagation from functions-quickstart-dotnet-azd PR #18

This issue tracks critical changes that need to be applied to maintain consistency across Azure Functions AZD templates, based on PR #18 merged on August 7, 2025.

Required Changes

1. 🔒 Remove UserSecretsId from .csproj

Security Issue: Templates should not include hardcoded UserSecretsId values.

<!-- REMOVE this line from any .csproj files -->
<UserSecretsId>09bd123b-3401-4507-b92c-0b283b95b537</UserSecretsId>

2. 📦 Update Package References to Latest Versions

Update all Azure Functions package references in .csproj files:

<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.3.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.2" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.5" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.23.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.0.0" />

3. 🏗️ Remove Application Insights from Bicep Outputs

Remove this line from infra/main.bicep:

// REMOVE this line
output APPLICATIONINSIGHTS_CONNECTION_STRING string = monitoring.outputs.name

Impact

  • Security: Removes exposed secrets from template
  • Compatibility: Updates to latest stable versions
  • Consistency: Aligns with current best practices across all Azure Functions AZD templates

Reference

Related Templates

This same issue applies to:

  • functions-quickstart-dotnet-azd-eventgrid-blob
  • functions-quickstart-dotnet-azd-cosmosdb
  • functions-quickstart-dotnet-azd-sql
  • durable-functions-quickstart-dotnet-azd

/cc Thiago Almeida (@nzthiago)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions