Adds disableLocalAuth check for listKeys call (#931)
This commit is contained in:
parent
71113e403e
commit
4614ab3427
|
@ -9,6 +9,7 @@ export interface DatabaseAccount {
|
||||||
|
|
||||||
export interface DatabaseAccountExtendedProperties {
|
export interface DatabaseAccountExtendedProperties {
|
||||||
documentEndpoint?: string;
|
documentEndpoint?: string;
|
||||||
|
disableLocalAuth?: boolean;
|
||||||
tableEndpoint?: string;
|
tableEndpoint?: string;
|
||||||
gremlinEndpoint?: string;
|
gremlinEndpoint?: string;
|
||||||
cassandraEndpoint?: string;
|
cassandraEndpoint?: string;
|
||||||
|
|
|
@ -15,7 +15,7 @@ export async function fetchDatabaseAccounts(subscriptionId: string, accessToken:
|
||||||
|
|
||||||
let accounts: Array<DatabaseAccount> = [];
|
let accounts: Array<DatabaseAccount> = [];
|
||||||
|
|
||||||
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) {
|
while (nextLink) {
|
||||||
const response: Response = await fetch(nextLink, { headers });
|
const response: Response = await fetch(nextLink, { headers });
|
||||||
|
|
|
@ -105,7 +105,9 @@ async function configureHostedWithAAD(config: AAD): Promise<Explorer> {
|
||||||
aadToken = aadTokenResponse.accessToken;
|
aadToken = aadTokenResponse.accessToken;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
keys = await listKeys(subscriptionId, resourceGroup, account.name);
|
if (!account.properties.disableLocalAuth) {
|
||||||
|
keys = await listKeys(subscriptionId, resourceGroup, account.name);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (userContext.features.enableAadDataPlane) {
|
if (userContext.features.enableAadDataPlane) {
|
||||||
console.warn(e);
|
console.warn(e);
|
||||||
|
|
Loading…
Reference in New Issue