microsoft / microsoft/copilot-camp

Custom Engine Agent Environment Issue

Open
#580 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'm having some issues of environment variables on the Lab "Build a custom Engine Agent" on the SSO exercise.

In the tutorial, it went straight in creating the "aad.manifest.json" file with variables like
AAD_APP_OBJECT_ID, SECRET_AAD_APP_CLIENT_SECRET, AAD_APP_OAUTH_AUTHORITY or AAD_APP_OAUTH_AUTHORITY_HOST .... without explaining where to get it or save it (I'm a beginner)

If not providing these variables, when debugging, i have some errors like

    return new ClientAuthError(errorCode, additionalMessage);
           ^
ClientAuthError: invalid_client_credential: Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential
    at createClientAuthError (C:\Users\tri.le\Documents\Code\TeamsAgent-Azure\node_modules\@azure\msal-common\dist\error\ClientAuthError.mjs:255:12)
    at ConfidentialClientApplication.setClientCredential (C:\Users\tri.le\Documents\Code\TeamsAgent-Azure\node_modules\@azure\src\client\ConfidentialClientApplication.ts:279:19)
    at new ConfidentialClientApplication (C:\Users\tri.le\Documents\Code\TeamsAgent-Azure\node_modules\@azure\src\client\ConfidentialClientApplication.ts:71:14)
    at new Authentication (C:\Users\tri.le\Documents\Code\TeamsAgent-Azure\node_modules\@microsoft\teams-ai\src\authentication\Authentication.ts:71:26)
    at new AuthenticationManager (C:\Users\tri.le\Documents\Code\TeamsAgent-Azure\node_modules\@microsoft\teams-ai\src\authentication\Authentication.ts:244:40)
    at new Application (C:\Users\tri.le\Documents\Code\TeamsAgent-Azure\node_modules\@microsoft\teams-ai\src\Application.ts:290:36)
    at Object.<anonymous> (C:\Users\tri.le\Documents\Code\TeamsAgent-Azure\src\app\app.ts:32:13)
    at Module._compile (node:internal/modules/cjs/loader:1734:14)
    at Module.m._compile (C:\Users\tri.le\Documents\Code\TeamsAgent-Azure\node_modules\ts-node\src\index.ts:1618:23)
    at loadTS (node:internal/modules/cjs/loader:1826:10) {
  errorCode: 'invalid_client_credential',
  errorMessage: 'Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential',
  subError: ''
}

I have figured my way to register an App on Azure, then fill some variables in .env.local.user like AAD_APP_CLIENT_ID, AAD_APP_CLIENT_SECRET, but after that it still has some error about missing Microsoft ID , probably about those variables BOT_ID, BOT_TYPE, BOT_TENANT_ID.

Can you instruct me on this ?

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.

Research direction

Start with the "Build a custom Engine Agent" SSO exercise, the aad.manifest.json variables, and the .env.local.user settings mentioned in the report; use the src/app/app.ts stack-trace entry point to trace which values are required. Document where the Azure app and bot values come from and how to configure them so debugging no longer reports missing credentials or Microsoft identity settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, node.js, typescript
Domain
authentication, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.