Microsoft Foundry SDK for JavaScript 2.8
Last reviewed Oct 25, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 746 lines · 1.5K tokens
- Microsoft Foundry SDK for JavaScript 2.854 lines · 2.4K tokens
Total303 lines · 12.4K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 77
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 200
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 426
- 444
- 459
- 471
- 488
- 494
- 502
- 522
- 524
- 532
- 598
- 602
- 639
- 653
- 732
- 770
- 807
- 829
- 838
- 841
- 862
- 863
- 908
- 915
- 916
- 918
- 922
- 942
- 943
- 1004
- 1321
- 1333
- 1427
Prompt Preview
Apply the Node.js 24 and TypeScript 7 prompts first. This pack covers @azure/ai-projects 2.8, checked against 2.8.0. Its boundary includes Foundry project resources, the authenticated OpenAI client, agent and toolbox execution, voice sessions, evaluation and optimization jobs, and preview APIs. Use a supported Node.js LTS runtime for server work.
Identity, endpoints, and credentials
- Construct
AIProjectClientfrom an application-owned HTTPS project endpoint and EntraTokenCredential. Reject caller control ofoptions.endpoint, credential scopes, API version, transport, proxy, pipeline policies, or per-callrequestOptions; these fields can redirect or reshape authenticated operations. - Use a managed or workload identity with only the Foundry and connected-service roles it needs. If production uses
DefaultAzureCredential, narrow the credential chain and verify the selected identity. Enforce the end user's project and resource authorization separately from the service token. - Keep
connections.getWithCredentials,connections.get(name, { includeCredentials: true }), andconnections.getDefault(type, { includeCredentials: true })behind explicit secret-read authorization. Use credential-free discovery where possible, and validate the actual connection target and authentication mode before an agent uses it. - Keep SAS URLs, connection credentials, WebSocket bearer tokens, model credentials, and telemetry connection strings out of prompts, datasets, tool results, browser responses, logs, and traces. Scope storage and retention of each secret to the