microsoft / microsoft/copilot-camp

Lab BAF1 - Setup of Azure Resources - Execution issue

Open
#833 2 comments 0 reactions 1 assignee View on GitHub

@PaoloPia is already working on this.

Since Feb 3, 2026.

bug on hold
Dominant language
C#
Stars
664
Forks
175
Avg merge
1m
Merged PRs (30d)
7

Description

Lab BAF1 - Exercise 3: Build and Run your first agent > Step 1

I had this error when provisioning resources. I will try again and see if anything was missed.

2026-01-30T15:50:34.581Z] [Info] - Microsoft 365 Agents Toolkit extension is now active!
[2026-01-30T16:01:51.017Z] [Info] - Running 'Validate prerequisites' Visual Studio Code task.

(Total: 2 Steps) Microsoft 365 Agents Toolkit is checking the required prerequisites.

(1/2) Checking Node.js ...
(2/2) Checking ports occupancy ...

Summary:

(√) Done: Node.js version (v20.19.6) is installed 
(√) Done: Ports (3978, 9239, 56150) are not occupied 

Visit https://aka.ms/teamsfx-tasks/check-prerequisites to get more info about 'Validate prerequisites' task.

[2026-01-30T16:01:51.041Z] [Info] - Finished 'Validate prerequisites' Visual Studio Code task in 0.03 seconds.
[2026-01-30T16:02:30.013Z] [Info] - Running 'Validate prerequisites' Visual Studio Code task.

(Total: 2 Steps) Microsoft 365 Agents Toolkit is checking the required prerequisites.

(1/2) Checking Node.js ...
(2/2) Checking ports occupancy ...

Summary:

(√) Done: Node.js version (v20.19.6) is installed 
(√) Done: Ports (3978, 9239, 56150) are not occupied 

Visit https://aka.ms/teamsfx-tasks/check-prerequisites to get more info about 'Validate prerequisites' task.

[2026-01-30T16:02:30.035Z] [Info] - Finished 'Validate prerequisites' Visual Studio Code task in 0.02 seconds.
[2026-01-30T16:04:47.834Z] [Info] - Running 'Validate prerequisites' Visual Studio Code task.

(Total: 2 Steps) Microsoft 365 Agents Toolkit is checking the required prerequisites.

(1/2) Checking Node.js ...
(2/2) Checking ports occupancy ...

Summary:

(√) Done: Node.js version (v20.19.6) is installed 
(√) Done: Ports (3978, 9239, 56150) are not occupied 

Visit https://aka.ms/teamsfx-tasks/check-prerequisites to get more info about 'Validate prerequisites' task.

[2026-01-30T16:04:47.855Z] [Info] - Finished 'Validate prerequisites' Visual Studio Code task in 0.02 seconds.
[2026-01-30T16:09:53.019Z] [Info] - Running 'Validate prerequisites' Visual Studio Code task.

(Total: 3 Steps) Microsoft 365 Agents Toolkit is checking the required prerequisites.

(1/3) Checking Node.js ...
(2/3) Checking Microsoft 365 Account ...
(3/3) Checking ports occupancy ...

Summary:

(√) Done: Node.js version (v20.19.6) is installed 
(√) Done: Microsoft 365 Account (paul.bullock@<redacted>.onmicrosoft.com) is logged in and custom app upload permission is enabled 
(√) Done: Ports (3978, 9239) are not occupied 

Visit https://aka.ms/teamsfx-tasks/check-prerequisites to get more info about 'Validate prerequisites' task.

[2026-01-30T16:09:55.294Z] [Info] - Finished 'Validate prerequisites' Visual Studio Code task in 2.28 seconds.
[2026-01-30T16:10:23.608Z] [Info] - Running 'Validate prerequisites' Visual Studio Code task.

(Total: 3 Steps) Microsoft 365 Agents Toolkit is checking the required prerequisites.

(1/3) Checking Node.js ...
(2/3) Checking Microsoft 365 Account ...
(3/3) Checking ports occupancy ...

Summary:

(√) Done: Node.js version (v20.19.6) is installed 
(√) Done: Microsoft 365 Account (paul.bullock@<redacted>.onmicrosoft.com) is logged in and custom app upload permission is enabled 
(√) Done: Ports (3978, 9239) are not occupied 

Visit https://aka.ms/teamsfx-tasks/check-prerequisites to get more info about 'Validate prerequisites' task.

[2026-01-30T16:10:25.494Z] [Info] - Finished 'Validate prerequisites' Visual Studio Code task in 1.89 seconds.
[2026-01-30T16:11:18.083Z] [Info] - check whether azure account is signed in.
[2026-01-30T16:11:19.107Z] [Info] - subscription is not selected, try to select.
[2026-01-30T16:11:30.614Z] [Info] - Running 'Validate prerequisites' Visual Studio Code task.

(Total: 3 Steps) Microsoft 365 Agents Toolkit is checking the required prerequisites.

(1/3) Checking Node.js ...
(2/3) Checking Microsoft 365 Account ...
(3/3) Checking ports occupancy ...

Summary:

(√) Done: Node.js version (v20.19.6) is installed 
(√) Done: Microsoft 365 Account (paul.bullock@<redacted>.onmicrosoft.com) is logged in and custom app upload permission is enabled 
(√) Done: Ports (3978, 9239) are not occupied 

Visit https://aka.ms/teamsfx-tasks/check-prerequisites to get more info about 'Validate prerequisites' task.

[2026-01-30T16:11:31.676Z] [Info] - Finished 'Validate prerequisites' Visual Studio Code task in 1.06 seconds.
[2026-01-30T16:11:40.229Z] [Info] - check whether azure account is signed in.
[2026-01-30T16:11:41.513Z] [Info] - subscription is not selected, try to select.
[2026-01-30T16:11:49.050Z] [Info] - successful to select subscription: <redacted>bbfeb
[2026-01-30T16:12:18.046Z] [Info] - Executing provision 

Lifecycle stage: provision(11 step(s) in total). The following actions will be executed: 
(1/11) Action teamsApp/create: create app.
(2/11) Action aadApp/create: Create a Microsoft Entra app to authenticate users
(3/11) Action aadApp/update: Apply Microsoft Entra app manifest to an existing app
(4/11) Action arm/deploy: Deploy the given ARM templates to Azure.
(5/11) Action script
(6/11) Action file/createOrUpdateJsonFile: Create or update JSON file.
(7/11) Action teamsApp/validateManifest: validate app.
(8/11) Action teamsApp/zipAppPackage: build app package.
(9/11) Action teamsApp/validateAppPackage: validate app.
(10/11) Action teamsApp/update: update app.
(11/11) Action teamsApp/extendToM365: acquire Microsoft 365 title with the app package

[2026-01-30T16:12:18.046Z] [Info] - Executing lifecycle provision
[2026-01-30T16:12:25.658Z] [Info] - Executing action aadApp/create
[2026-01-30T16:12:25.922Z] [Info] - Environment variable BOT_ID does not exist, creating a new Microsoft Entra app...
[2026-01-30T16:12:26.976Z] [Info] - Created Microsoft Entra application with object id <redacted>3c437
[2026-01-30T16:12:26.976Z] [Info] - Environment variable SECRET_BOT_PASSWORD does not exist, generating client secret for Microsoft Entra app...
[2026-01-30T16:12:27.537Z] [Info] - Generated client secret for Microsoft Entra application with object id 9271ffc1-8734-47b5-9b70-d1487793c437
[2026-01-30T16:12:27.537Z] [Info] - Action aadApp/create executed successfully
[2026-01-30T16:12:27.540Z] [Info] - Executing action aadApp/update
[2026-01-30T16:12:27.542Z] [Warning] - Microsoft Entra manifest has following issues that may potentially break the app:
[2026-01-30T16:12:27.542Z] [Warning] - accessTokenAcceptedVersion is 1
[2026-01-30T16:12:27.542Z] [Warning] - optionalClaims is missing
[2026-01-30T16:12:27.543Z] [Info] - Build Microsoft Entra app manifest completed, and app manifest content is written to /Users/pkbullock/Git/Learn/copilot-camp/src/agent-framework/begin/infra/entra/build/entra.bot.manifest.local.json
[2026-01-30T16:12:28.572Z] [Info] - Applied manifest ./infra/entra/entra.bot.manifest.json to Microsoft Entra application with object id 9271ffc1-8734-47b5-9b70-d1487793c437
[2026-01-30T16:12:28.572Z] [Info] - Action aadApp/update executed successfully
[2026-01-30T16:12:28.573Z] [Info] - Executing action arm/deploy
[2026-01-30T16:12:32.094Z] [Info] - Downloading and installing the portable version of Bicep v0.9.1, which will be installed to /Users/pkbullock/.fx/bin/bicep/v0.9.1/bicep and will not affect your environment.
[2026-01-30T16:12:37.220Z] [Info] - Bicep (v0.9.1) installed successfully.
[2026-01-30T16:13:55.814Z] [Info] - Action arm/deploy executed successfully
[2026-01-30T16:14:08.371Z] [Error] - Failed to Execute lifecycle provision due to failed action: script. ScriptExecutionError:Execute command failure: node ./infra/scripts/create-service-principal-wrapper.js "<redacted>3f68144f" "<redacted>-9651e89bbfeb" "_"
. Env output: {"TEAMS_APP_ID":"<redacted>27669d6fd","TEAMS_APP_TENANT_ID":"<redacted>627c","BOT_ID":"<redacted>3f68144f","BOT_OBJECT_ID":"<redacted>7793c437","BOT_TENANT_ID":"<redacted>3627c","BOT_AUTHORITY":"https://login.microsoftonline.com/cb056806-0ed1-4a92-afd6-647acd53627c","SECRET_BOT_PASSWORD":"******","AAD_APP_ACCESS_AS_USER_PERMISSION_ID":"<redacted>83dd7b"}
[2026-01-30T16:14:08.374Z] [Info] - Execution summary:

Summary:
(×) Error: Lifecycle stage provision failed.
  (√) Done: teamsApp/create executed successfully.
    (√) Done: app 4e27f428-d583-4623-8b65-49427669d6fd created successfully
  (√) Done: aadApp/create executed successfully.
    (√) Done: Created Microsoft Entra application with object id <redacted>c437
    (√) Done: Generated client secret for Microsoft Entra application with object id <redacted>c437
  (√) Done: aadApp/update executed successfully.
    (√) Done: Applied manifest ./infra/entra/entra.bot.manifest.json to Microsoft Entra application with object id 9271ffc1-8734-47b5-9b70-d1487793c437
  (√) Done: arm/deploy executed successfully.
  (×) Error: script failed.
    (×) Error: Execute command failure: node ./infra/scripts/create-service-principal-wrapper.js "<redacted>8144f" "<redacted>9bbfeb" "_"

  (!) Warning: file/createOrUpdateJsonFile was not executed.
  (!) Warning: teamsApp/validateManifest was not executed.
  (!) Warning: teamsApp/zipAppPackage was not executed.
  (!) Warning: teamsApp/validateAppPackage was not executed.
  (!) Warning: teamsApp/update was not executed.
  (!) Warning: teamsApp/extendToM365 was not executed.

My environment:

  • M365 Agents Toolkit Version: 6.4.3.
  • OS: MacOs Tahoe 26.2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.