Add Azure Functions TypeScript deployment guidance for Event Hubs and enterprise policies#769
Draft
Add Azure Functions TypeScript deployment guidance for Event Hubs and enterprise policies#769
Conversation
…icy compliance Co-authored-by: paulyuk <1968137+paulyuk@users.noreply.github.com>
…e token counts Co-authored-by: paulyuk <1968137+paulyuk@users.noreply.github.com>
Co-authored-by: paulyuk <1968137+paulyuk@users.noreply.github.com>
…ghting Co-authored-by: paulyuk <1968137+paulyuk@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update guidance for Azure Functions TypeScript deployment issues
Add Azure Functions TypeScript deployment guidance for Event Hubs and enterprise policies
Feb 4, 2026
Member
|
Suggest we keep this blocked. Functions and AZD owners are deciding on design decision for integration, which may turn server/remote build off by default. That would change skills guidance. ETA for decision 1-2 days. |
kvenkatrajan
requested changes
Feb 11, 2026
Collaborator
There was a problem hiding this comment.
Blocked due to possible design changes in azd
CC: @rajeshkamal5050
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Four deployment failures with TypeScript Azure Functions + Event Hub triggers: (1)
RequestDisallowedByPolicyerrors from missingdisableLocalAuth, (2) agent wrote Bicep instead of using existing templates, (3)tsc: Permission deniedfrom incorrect.funcignore, (4) no Application Insights telemetry with identity-based auth.Changes
Template Selection
azure-prepare/SKILL.md: requireazd init -t <template>when templates existTypeScript Build Configuration
typescript-funcignore.mdwith remote vs local build guidancenode_modules/, do NOT exclude*.tsortsconfig.jsonfor remote buildstsc: Permission deniedtoazure-deploy/errors.mdEnterprise Policy Compliance
enterprise-policy.mdwith required Bicep properties:disableLocalAuth: trueallowSharedKeyAccess: falseDisableLocalAuth: trueApplication Insights Identity Auth
appinsights-auth.mdwith complete setup:File Organization
Original prompt
This section details on the original issue you should resolve
<issue_title>Skill Updates: Azure Functions TypeScript Deployment Issues</issue_title>
<issue_description>## Background
During deployment of a TypeScript Azure Function with Event Hub trigger, several issues were encountered that could have been prevented with better skill guidance. This document captures the learnings and proposed updates.
Issues Encountered
Issue 1: Policy Violation - Event Hub Local Auth
Error:
Root Cause: Generated Bicep for Event Hub namespace did not include
disableLocalAuth: true.Resolution: Added the property to Bicep.
Issue 2: Did Not Use Existing Template
What Happened: Agent wrote Bicep from scratch instead of using
azd init -t <template>.Root Cause: The decision tree in
functions-templates.mdpointed to a generic samples page URL rather than specificazd initcommands. The agent did not follow through to find the actual template.Existing Templates Found:
Azure-Samples/functions-quickstart-dotnet-azd-eventhubAzure-Samples/functions-quickstart-python-azd-eventhubIssue 3: TypeScript Remote Build Failure
Error:
Actual Root Cause: The
.funcignorefile had incorrect entries that:*.tsfiles - preventing Oryx from seeing TypeScript sourcetsconfig.json- preventing Oryx from compilingnode_modules/- uploading local binaries with wrong permissionsCorrect
.funcignore(enables remote build):Reference: Azure-Samples/remote-mcp-functions-typescript#35
Issue 4: Application Insights Not Receiving Traces
Symptom: No traces appearing in Application Insights after deployment.
Root Cause: When
DisableLocalAuth: trueis set on Application Insights (required by enterprise policy), identity-based authentication requires:APPLICATIONINSIGHTS_AUTHENTICATION_STRINGwith valueClientId=<managed-identity-client-id>;Authorization=AADMonitoring Metrics Publisherrole assigned to the managed identity on the Application Insights resourceProposed Skill File Updates
File 1:
azure-prepare/references/recipes/azd/functions-templates.mdUpdate 1A: Event Hubs Template Section (lines 55-57)
Replace with:
Update 1B: Add New Section - TypeScript .funcignore Configuration
Add guidance on correct
.funcignorefor TypeScript with remote build:node_modules/*.tsortsconfig.jsonUpdate 1C: Add New Section - Enterprise Policy Compliance
Add default
disableLocalAuth: truefor Event Hubs, Storage, App Insights, Service Bus.Update 1D: Add New Section - Application Insights Identity-Based Authentication
Add required app settings and RBAC role for identity-based App Insights auth.
File 2:
azure-prepare/SKILL.mdUpdate 2A: Add Rule 7 - Template-First Requirement
File 3:
azure-prepare/references/recipes/azd/azure-yaml.mdUpdate 3A: Add TypeScript and .funcignore Guidance
Document two valid approaches (remote build vs local build) and common errors.
Summary of Changes
functions-templates.mdazd initcommandsfunctions-templates.mdfunctions-templates.mdfunctions-templates.mdSKILL.mdazure-yaml.mdReferences
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.