diff --git a/specs/persistence/mapiObjectStorage.spec.ts b/specs/persistence/mapiObjectStorage.spec.ts index 79b3cb40b..63833f7b5 100644 --- a/specs/persistence/mapiObjectStorage.spec.ts +++ b/specs/persistence/mapiObjectStorage.spec.ts @@ -1,10 +1,10 @@ import { MapiClient } from "./../../src/services/mapiClient"; import { MapiObjectStorage } from "../../src/persistence/mapiObjectStorage"; -import { assert, expect } from "chai"; +import { expect } from "chai"; describe("MAPI Object Storage", async () => { it("Correctly translates resources", async () => { - const mapiClient = new MapiClient(null, null, null, null); + const mapiClient = new MapiClient(null, null, null); const mapiObjectStorage = new MapiObjectStorage(mapiClient); const pageResource = mapiObjectStorage.paperbitsKeyToArmResource("pages/somepage"); diff --git a/src/components/operations/operation-details/ko/runtime/operation-details.ts b/src/components/operations/operation-details/ko/runtime/operation-details.ts index 6e5a08187..23b96d435 100644 --- a/src/components/operations/operation-details/ko/runtime/operation-details.ts +++ b/src/components/operations/operation-details/ko/runtime/operation-details.ts @@ -131,9 +131,12 @@ export class OperationDetails { const api = await this.apiService.getApi(`apis/${apiName}`); this.api(api); - if (this.authorizationServers) { + const associatedServerId = api.authenticationSettings?.oAuth2?.authorizationServerId || + api.authenticationSettings?.openid?.openidProviderId; + + if (this.authorizationServers && associatedServerId) { const associatedAuthServer = this.authorizationServers - .find(x => x.name === api.authenticationSettings?.oAuth2?.authorizationServerId); + .find(x => x.name === associatedServerId); this.associatedAuthServer(associatedAuthServer); }