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

teamsApp/create action register a new Teams app even if TEAMS_APP_ID exists in the env #12546

Open
Benjiiim opened this issue Oct 18, 2024 · 6 comments
Assignees
Labels

Comments

@Benjiiim
Copy link

Describe the bug
According to Use your existing Teams app ID, we can use an existing Teams app ID instead of registering a new one with Teams Toolkit. We should be able to do this by setting the TEAMS_APP_ID environment variable. When TEAMS_APP_ID exist, the teamsApp/create action shouldn't register a new Teams app.
Unfortunately, that doesn't seem to be the case and a new Teams app is registered in the Teams Developer Portal with the provided TEAMS_APP_ID

To Reproduce
Steps to reproduce the behavior:

  1. In any Teams Toolkit project, generate a GUID and use it as a value to TEAMS_APP_ID
  2. Execute the provision stage of a Teams Toolkit project using the teamsApp/create action
  3. Go to the Teams Developer portal and see that an entry has been created there

Expected behavior
I was expecting that teamsApp/create would skip the Teams app creation when it sees that a TEAMS_APP_ID is provided as an environment variable.

CLI Information (please complete the following information):

  • microsoft/teamsapp-cli version 3.0.4

Additional context
This is problematic as I would like to use an existing teamsapp.yml project (having the teamsApp/create action configured in the provision step) to provision resources in a specific environment for which the Teams app should not be registered in the Teams Developer Portal (it is managed in Partner Center).

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Oct 18, 2024
@adashen adashen added investigating TA:E2E Team Area: E2E labels Oct 21, 2024
@anchenyi
Copy link
Contributor

Hi @Benjiiim, thank you for reporting. Is the TEAMS_APP_ID you set the Teams app ID of an existing entry in the Teams Developer Portal? The design is that if you set the ID of an existing app, Teams Toolkit will not create a new app. If you generate a new GUID and set the environment, Teams Toolkit will still create a new app with the provided ID.

@Benjiiim
Copy link
Author

I do generate a new GUID outside of the Teams Developer Portal.
I don't want the action to create a new entry in the Teams Developer Portal (for a specific environment, this is why I keep the action in the yml file).

@anchenyi
Copy link
Contributor

hi @Benjiiim , I think you can use the teamsapp.local.yml and remove the teamsApp/create action for the specific environment.

@adashen adashen removed the needs attention This issue needs the attention of a contributor. label Oct 23, 2024
@Benjiiim
Copy link
Author

Thanks @anchenyi, I will try to find the best workaround for my scenario.

May I suggest to improve the wording in Use your existing Teams app ID?

When TEAMS_APP_ID exist, the teamsApp/create action won't register a new Teams app, the Teams manifest.json file can reference TEAMS_APP_ID.
=>
When TEAMS_APP_ID has already been registered in the Teams Developer Portal, the teamsApp/create action won't register a new Teams app. The Teams manifest.json file can reference TEAMS_APP_ID.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Oct 24, 2024
@anchenyi
Copy link
Contributor

hi @Benjiiim, thank you for this great suggestion. It will make things clearer for users with this improvement. @MuyangAmigo could you help to confirm this wording change?

@adashen adashen removed the needs attention This issue needs the attention of a contributor. label Oct 28, 2024
@MuyangAmigo
Copy link
Collaborator

@Benjiiim Thanks for the suggestion! @anchenyi I have updated the docs.

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