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

Multiple local environments #11943

Open
goncafab opened this issue Jul 2, 2024 · 2 comments
Open

Multiple local environments #11943

goncafab opened this issue Jul 2, 2024 · 2 comments
Assignees
Labels

Comments

@goncafab
Copy link

goncafab commented Jul 2, 2024

Is your feature request related to a problem? Please describe.
I'm developing a Python Teams Copilot application that uses SSO, using the Teams AI library. To be able to use SSO, I need to setup a OAuth connection in my Azure Bot resource.

However, Teams Toolkit doesn't create a Azure Bot resource, but instead registers a bot using the Bot Framework, which does not allow to setup a OAuth connection. As I'm using a Microsoft 365 developer sandbox subscription, I do not have access to an associated Azure account to migrate the resource to.

As I have an enterprise Azure subscription with an Azure Bot resource setup with an OAuth connection, I can change the configurations to point to that resource, manually set up a dev tunnel to my machine, and change the message endpoints to it. However, this process is quite slow, so I'd like to automate it. I've setup a bicep definition to update my Azure Bot resource every time I run the VSCode debug task.

The issue here is that I had chose between either changing the default teamsapp.yml, or the teamsapp.local.yml, and in turn losing the setup of my remote resources, or having a stable local development environment when working as a team, as some tasks might not need to have SSO enabled.

Describe the solution you'd like

I'd like to be able to run different steps for provision and deploy, depending on the what I'm targeting.

When running local and resulting in loading teamsapp.local.yml, I'd like for the current behavior to be maintained, as it enables each developer to use their own developer account independently.

When running dev and resulting in loading teamsapp.yml, I'd like for provision to happen of all my remote resources, as well deployment and publishing of the application.

When running myenv and resulting in loading teamsapp.myenv.yml if it exists, I'd like to run a set of custom steps for my provision and deploy cycles.

Describe alternatives you've considered

I've tried using multiple variables in my .env files to control with conditions which resources are deployed or updated, but it gets extremely confusing and doesn't cover all cases.

I've ended up changing the default steps in the teamsapp.yml file, but then I lose the provisioning setup of my other resources, and not only the Azure Bot definition.

Copy link
Contributor

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Jul 2, 2024
@adashen adashen added investigating TA:Auth Team Area: Auth labels Jul 3, 2024
@blackchoey
Copy link
Contributor

@goncafab My understanding to your myenv environment is you want to use an Azure Bot Service when debugging your app locally. You're able to achieve this by customizing the teamsapp.local.yml file. Here's an example you can refer to update your project's teamsapp.local.yml: https://github.com/microsoft/teams-ai/blob/main/js/samples/05.authentication/b.oauth-bot/teamsapp.local.yml.
In this way, you should be able to avoid introducing the third myenv environment. For people who want to use their own developer account, they can login to Teams Toolkit using the developer account. For people who want to use their enterprise account, they can login to Teams Toolkit using the enterprise account.

@blackchoey blackchoey removed the needs attention This issue needs the attention of a contributor. label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants