Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teams AI Bot can't find Connection Setting #322

Open
JonoSuave opened this issue Jun 14, 2023 · 1 comment
Open

Teams AI Bot can't find Connection Setting #322

JonoSuave opened this issue Jun 14, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@JonoSuave
Copy link

Describe the bug
I was able to get the Tutorial AI Bot up using OpenAI, and now I want to integrate it with Graph data. When I debug locally in Teams, however, I get the following error: The bot encountered unhandled error: Could not find Connection Setting with name GraphConnectionLocalBot

To Reproduce
Repo: https://github.com/JonoSuave/TutorialBot.git

Steps to reproduce the behavior:

  1. Spin up a Teams AI Bot with OpenAI
  2. Instantiate the the app in the index.ts like so:
const app = new Application<ApplicationTurnState>({
	storage,
	ai: {
		planner,
		moderator,
		promptManager,
		prompt: "chat",
		history: {
			assistantHistoryType: "text",
		},
	},
	authentication: {
		connectionName: config.connectionName,
		title: "Sign In",
	},
});
  1. Set up an app registration with Graph delegate permissions openid and profile
  2. Provision via Teams Toolkit so the resources are created in Azure, including the Azure bot
  3. Go to the Azure bot created in Azure Portal and navigate to the Configuration Settings
  4. Add your app registration with delegated Graph permissions to the OAuth Connection Settings
  5. Test the connection
  6. Add the name of the OAuth Connection setting to your Teams AI .env file like so: CONNECTION_NAME=GraphConnectionLocalBot
  7. Make sure you add the reference to the teamsapp.local.yml file as well
  8. Debug the application in Edge

Expected behavior
To communicate with the AI Bot and to have an authentication popup window display to login the user and grant permissions to their openid and profile data to the bot
Screenshot 2023-06-14 at 1 33 02 PM

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: iOS
  • Browser [Edge]
@JonoSuave JonoSuave added the bug Something isn't working label Jun 14, 2023
@JonoSuave
Copy link
Author

One thing I think would be helpful is to have a reference to how to set up the authentication between the Azure Bot an app registration in Azure Portal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant