diff --git a/src/Contracts/DataModels.ts b/src/Contracts/DataModels.ts index e71c63cd9..efd5ffb78 100644 --- a/src/Contracts/DataModels.ts +++ b/src/Contracts/DataModels.ts @@ -9,6 +9,7 @@ export interface DatabaseAccount { export interface DatabaseAccountExtendedProperties { documentEndpoint?: string; + disableLocalAuth?: boolean; tableEndpoint?: string; gremlinEndpoint?: string; cassandraEndpoint?: string; diff --git a/src/hooks/useDatabaseAccounts.tsx b/src/hooks/useDatabaseAccounts.tsx index 378d4639f..c120d6a71 100644 --- a/src/hooks/useDatabaseAccounts.tsx +++ b/src/hooks/useDatabaseAccounts.tsx @@ -15,7 +15,7 @@ export async function fetchDatabaseAccounts(subscriptionId: string, accessToken: let accounts: Array = []; - let nextLink = `${configContext.ARM_ENDPOINT}/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2020-06-01-preview`; + let nextLink = `${configContext.ARM_ENDPOINT}/subscriptions/${subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2021-06-15`; while (nextLink) { const response: Response = await fetch(nextLink, { headers }); diff --git a/src/hooks/useKnockoutExplorer.ts b/src/hooks/useKnockoutExplorer.ts index 3589b479a..e0729bc80 100644 --- a/src/hooks/useKnockoutExplorer.ts +++ b/src/hooks/useKnockoutExplorer.ts @@ -105,7 +105,9 @@ async function configureHostedWithAAD(config: AAD): Promise { aadToken = aadTokenResponse.accessToken; } try { - keys = await listKeys(subscriptionId, resourceGroup, account.name); + if (!account.properties.disableLocalAuth) { + keys = await listKeys(subscriptionId, resourceGroup, account.name); + } } catch (e) { if (userContext.features.enableAadDataPlane) { console.warn(e);