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

feat: ask for existing entra app id/secret if no permission #13244

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

nliu-ms
Copy link
Contributor

@nliu-ms nliu-ms commented Feb 20, 2025

https://msazure.visualstudio.com/Microsoft%20Teams%20Extensibility/_workitems/edit/30535047

aadapp2

  1. When user cancel input, it will have UserCancelError
    image
[2025-02-20T14:46:12.313] [DEBUG] TelemTest - debug-all {
  'project-id': '741d21ed-d86f-4905-8ed2-3de1795670b2',
  languages: 'js',
  'manifest-capabilities': 'staticTab',
  success: 'no',
  'debug-prelaunch-task-info': '{"Start Teams App Locally":[{"label":"Validate prerequisites","type":"teamsfx","command":"debug-check-prerequisites"},{"label":"Provision","type":"teamsfx","command":"provision"},{"label":"Deploy","type":"teamsfx","command":"deploy"},{"label":"Start application","type":"<unknown>","command":"npm run dev:teamsfx"}]}',
  component: 'extension',
  'is-existing-user': 'yes',
  'error-code': 'aadAppCreate.UserCancel',
  'error-type': 'user',
  'err-message': 'User canceled',
  'err-stack': 'CreateAadAppDriver.askForAADAppIdAndSecret | CreateAadAppDriver.executeInternal | CreateAadAppDriver.<anonymous> | CreateAadAppDriver.execute | _Lifecycle.executeImpl | _Lifecycle.execute | Coordinator.provision | Coordinator.<anonymous> | FxCore3.provisionResources | FxCore3.EnvWriterMW | FxCore3.ContextInjectorMW | FxCore3.ConcurrentLockerMW | envLoaderMWImpl | FxCore3.<anonymous> | FxCore3.ProjectMigratorMWV3 | FxCore3.ErrorHandlerMW | FxCore3.<anonymous> | runCommand | LifecycleTaskTerminal._do | _LocalTelemetryReporter.runWithTelemetryGeneric | _LocalTelemetryReporter.runWithTelemetryProperties',
  'error-name': 'UserCancel',
  'is-spfx': 'false',
  'settings-version': 'v1.7',
  'feature-flags': 'TEAMSFX_CHAT_PARTICIPANT;TEAMSFX_CHAT_PARTICIPANT_ENTRIES;TEAMSFX_TELEMETRY_TEST'
} 
  1. When user run F5 again, it will skip creation:
    image

  2. If user can use Test Tool, the behavior stay unchanged:
    image

  3. If .yml contains multiple aadApp/create action (e.g. custom-copilot-rag-m365), it will pop up twice, writing into different env variables:
    image

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 61.70213% with 18 lines in your changes missing coverage. Please review.

Project coverage is 90.23%. Comparing base (5512fab) to head (1df9bf9).
Report is 9 commits behind head on dev.

Files with missing lines Patch % Lines
...ackages/fx-core/src/component/driver/aad/create.ts 56.09% 12 Missing and 6 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #13244      +/-   ##
==========================================
- Coverage   90.26%   90.23%   -0.03%     
==========================================
  Files         603      603              
  Lines       35745    35826      +81     
  Branches     7118     6969     -149     
==========================================
+ Hits        32266    32329      +63     
- Misses       1514     1526      +12     
- Partials     1965     1971       +6     
Files with missing lines Coverage Δ
.../component/driver/aad/utility/aadManifestHelper.ts 93.71% <100.00%> (+0.20%) ⬆️
...core/src/component/driver/aad/utility/constants.ts 100.00% <100.00%> (ø)
...ackages/fx-core/src/component/driver/aad/create.ts 80.00% <56.09%> (-9.82%) ⬇️

... and 6 files with indirect coverage changes

@summzhan
Copy link
Contributor

Some typo:
User upper case in the title of input box.
image
image
image
and in the reminder message/description under the input line, replace "id" with "ID"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants