Commit 5dd4d87
feat: add foundry-proxy-agent VS C# template (#15320)
* feat: add foundry-proxy-agent VS C# template
Add foundry-proxy-agent template
Include Bicep infra for local and Azure deploy
Add README with architecture and quick start
Register template in fx-core
Add Azure AI User permission requirement
* test: add e2e test for foundry-proxy-agent VS C# template
* feat: add foundry CLI question infrastructure for foundry-proxy-agent template
- Add foundryEndpointQuestion() and foundryAgentIdQuestion() in create.ts
- Add foundryNode() with conditional agentId child in commonNodes.ts
- Register foundryNode in constructNode.ts
- Wire foundryNode into VS scaffold tree in createRootNode.ts
- Add foundry-endpoint and foundry-agent-id CLI options in CreateProjectOptions.ts
- Add localized strings for foundry questions in package.nls.json
- Register FoundryProxyAgent in templates metadata (templateNames.ts, vs.ts)
- Regenerate allTemplates.json and defaultGeneratorTemplates.json
- Update e2e test to pass foundry parameters and fix fs.pathExists usage
* fix: add resource group for foundry-proxy-agent local provision in e2e test
- Create local resource group before local provision
- Pass AZURE_RESOURCE_GROUP_NAME to local provision (needed for Bot Service + OAuth)
- Add cleanup for local resource group in after hook
* fix: move SSO app from Bicep to YAML aadApp actions
- Use aadApp/create + aadApp/update for SSO app
- Add aad.manifest.json.tpl for SSO app config
- Bicep only references existing app, creates FCI + SP
- Avoids Bicep PUT needing serviceManagementReference
- Remove unused bicep modules
* fix: add SSO_APP_ACCESS_AS_USER_PERMISSION_ID generation for aadApp/update
- Add script step to generate deterministic GUID based on app name
- Add SSO_APP_ACCESS_AS_USER_PERMISSION_ID to .env.local.tpl
- Apply to both m365agents.local.yml.tpl and m365agents.yml.tpl
- Fixes MissingEnvironmentVariablesError in CI provision
* fix: use AAD_APP_ACCESS_AS_USER_PERMISSION_ID for auto-generation
- Change from SSO_APP_ACCESS_AS_USER_PERMISSION_ID to AAD_APP_ACCESS_AS_USER_PERMISSION_ID
- aadApp/update driver automatically generates UUID for AAD_APP_* placeholders
- Remove invalid guid() helper attempts (not registered in Handlebars)
- Leave env var empty to trigger auto-generation on first provision
* fix: use appId instead of uniqueName to reference existing SSO app
- Change from uniqueName to appId for existing resource lookup
- Use existingSsoApp.id for federatedCredential name
- Fixes 'Cannot find requested resource' error in Bicep deployment
* fix: remove existing resource reference and use parameters directly
- Remove existingSsoApp resource declaration (cannot use appId in existing)
- Use ssoAppObjectId parameter directly for federatedCredential name
- Use ssoAppObjectId for aadAppObjectId output
- Fixes BCP173 error: appId cannot be used in existing resource declaration
* fix: use uniqueName instead of id to reference existing AAD app in Bicep
The Microsoft.Graph/applications existing resource in Bicep requires
uniqueName property (display name) and does not support id property
(object ID) according to Bicep validation error BCP173.
This change updates app-registration.bicep to:
- Add existingSsoApp resource using uniqueName: ssoAppName
- Use existingSsoApp.id for federated credential name and output
- Remove direct usage of ssoAppObjectId parameter
This fixes the "Cannot find requested resource" error in CI pipeline
for foundry-proxy-agent template provision.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: set uniqueName in aadApp/create for Bicep Microsoft Graph extension compatibility
This change resolves the "Cannot find requested resource" error when Bicep tries to reference
existing AAD applications created by aadApp/create action.
Root Cause:
- Bicep Microsoft Graph extension requires 'uniqueName' property to reference existing applications
- aadApp/create was not setting uniqueName when creating apps via Microsoft Graph API
- This caused Bicep deployment to fail when trying to create child resources (federated credentials)
Solution:
1. Added setUniqueName() method in AadAppClient to PATCH uniqueName property after app creation
2. Modified aadApp/create driver to call setUniqueName() immediately after creating the app
3. Updated app-registration.bicep to use 'existing' resource with uniqueName reference
4. Removed unnecessary ssoAppObjectId and ssoAppId parameters from Bicep modules
Benefits:
- Enables proper Bicep referencing of AAD apps created via YAML actions
- Allows creating federated credentials and service principals for existing apps
- Maintains separation of concerns (app creation via YAML, credentials/SP via Bicep)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: revert to use bicep to create sso aap
* test: add coverage for foundryNode, constructNode, and templateReplaceMap
* fix: add sso app id placeholder
* fix: the dev tunnel endpoint might change, so need to update bot service everytime debug
* ci: add same-tenant e2e pipeline for foundry proxy agent and exclude from main e2e
* ci: temp copy same-tenant workflow to sdk-e2e-test for manual trigger test
* ci: revert sdk-e2e-test.yml to dev branch version
* test: use ARM bot service validation instead of MOS API for foundry proxy agent e2e test
* fix: make enableAppInsights default to be false
* fix: change region to australiacentral
* fix: region
* fix: add well known env naimg convention
* fix: update e2e-test-same-tenant.yml and fix agentproxy test
* fix: update proxy agent manifest to 1.25
* fix: remove unused field in .env
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 2ebaf8c commit 5dd4d87
File tree
62 files changed
+6199
-6
lines changed- .github/workflows
- packages
- fx-core
- resource
- src
- component/generator/templates
- question
- options
- scaffold
- vs
- templates/metadata
- tests
- component/generator
- question
- tests/src
- commonlib
- e2e/vs
- utils
- templates
- src
- metadata
- vs/csharp/foundry-proxy-agent
- .{{NewProjectTypeName}}
- Agents
- Properties
- appPackage
- env
- infra
- modules
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
62 files changed
+6199
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
| |||
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
412 | 418 | | |
413 | 419 | | |
414 | 420 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1044 | 1062 | | |
1045 | 1063 | | |
1046 | 1064 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
152 | 162 | | |
153 | 163 | | |
154 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
0 commit comments