Skip to content

Commit 07eb349

Browse files
committed
fix(core): remove playground support condition
1 parent 3227169 commit 07eb349

File tree

1 file changed

+4
-6
lines changed
  • packages/fx-core/src/component/driver/aad

1 file changed

+4
-6
lines changed

packages/fx-core/src/component/driver/aad/create.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ import { hooks } from "@feathersjs/hooks/lib";
55
import {
66
FxError,
77
M365TokenProvider,
8+
Result,
89
SystemError,
910
UserError,
1011
err,
1112
ok,
12-
Result,
1313
} from "@microsoft/teamsfx-api";
1414
import axios from "axios";
1515
import { Service } from "typedi";
1616
import { GraphScopes } from "../../../common/constants";
17+
import { AadSet } from "../../../common/globalVars";
1718
import { getLocalizedString } from "../../../common/localizeUtils";
19+
import { environmentNameManager } from "../../../core/environmentName";
1820
import {
1921
HttpClientError,
2022
HttpServerError,
@@ -41,9 +43,6 @@ import {
4143
questionKeys,
4244
telemetryKeys,
4345
} from "./utility/constants";
44-
import { AadSet } from "../../../common/globalVars";
45-
import { isTestToolEnabledProject } from "../../../common/tools";
46-
import { environmentNameManager } from "../../../core/environmentName";
4746

4847
const actionName = "aadApp/create"; // DO NOT MODIFY the name
4948
const helpLink = "https://aka.ms/teamsfx-actions/aadapp-create";
@@ -212,11 +211,10 @@ export class CreateAadAppDriver implements StepDriver {
212211
getLocalizedString(logMessageKeys.failExecuteDriver, actionName, message)
213212
);
214213
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
216215
if (
217216
error.response!.status === 403 &&
218217
message.includes(constants.insufficientPermissionErrorMessage) &&
219-
!isTestToolEnabledProject(context.projectPath) &&
220218
process.env.TEAMSFX_ENV == environmentNameManager.getLocalEnvName()
221219
) {
222220
context.addTelemetryProperties({

0 commit comments

Comments
 (0)