@@ -5,16 +5,18 @@ import { hooks } from "@feathersjs/hooks/lib";
5
5
import {
6
6
FxError ,
7
7
M365TokenProvider ,
8
+ Result ,
8
9
SystemError ,
9
10
UserError ,
10
11
err ,
11
12
ok ,
12
- Result ,
13
13
} from "@microsoft/teamsfx-api" ;
14
14
import axios from "axios" ;
15
15
import { Service } from "typedi" ;
16
16
import { GraphScopes } from "../../../common/constants" ;
17
+ import { AadSet } from "../../../common/globalVars" ;
17
18
import { getLocalizedString } from "../../../common/localizeUtils" ;
19
+ import { environmentNameManager } from "../../../core/environmentName" ;
18
20
import {
19
21
HttpClientError ,
20
22
HttpServerError ,
@@ -41,9 +43,6 @@ import {
41
43
questionKeys ,
42
44
telemetryKeys ,
43
45
} from "./utility/constants" ;
44
- import { AadSet } from "../../../common/globalVars" ;
45
- import { isTestToolEnabledProject } from "../../../common/tools" ;
46
- import { environmentNameManager } from "../../../core/environmentName" ;
47
46
48
47
const actionName = "aadApp/create" ; // DO NOT MODIFY the name
49
48
const helpLink = "https://aka.ms/teamsfx-actions/aadapp-create" ;
@@ -212,11 +211,10 @@ export class CreateAadAppDriver implements StepDriver {
212
211
getLocalizedString ( logMessageKeys . failExecuteDriver , actionName , message )
213
212
) ;
214
213
if ( error . response ! . status >= 400 && error . response ! . status < 500 ) {
215
- // When user don't have permission to create AAD app, and cannot use Test Tool, we will ask for AAD app id and secret
214
+ // When user don't have permission to create AAD app, we will ask for AAD app id and secret
216
215
if (
217
216
error . response ! . status === 403 &&
218
217
message . includes ( constants . insufficientPermissionErrorMessage ) &&
219
- ! isTestToolEnabledProject ( context . projectPath ) &&
220
218
process . env . TEAMSFX_ENV == environmentNameManager . getLocalEnvName ( )
221
219
) {
222
220
context . addTelemetryProperties ( {
0 commit comments