diff --git a/src/Common/CosmosClient.ts b/src/Common/CosmosClient.ts index 2d3c82778..0dc2737d0 100644 --- a/src/Common/CosmosClient.ts +++ b/src/Common/CosmosClient.ts @@ -19,7 +19,10 @@ const _global = typeof self === "undefined" ? window : self; export const tokenProvider = async (requestInfo: Cosmos.RequestInfo) => { const { verb, resourceId, resourceType, headers } = requestInfo; - if (userContext.features.enableAadDataPlane || (userContext.dataPlaneRbacEnabled && userContext.apiType === "SQL")) { + if ( + (userContext.features.enableAadDataPlane && userContext.databaseAccount.properties.disableLocalAuth) || + (userContext.dataPlaneRbacEnabled && userContext.apiType === "SQL") + ) { if (!userContext.aadToken) { logConsoleError( `AAD token does not exist. Please use "Login for Entra ID" prior to performing Entra ID RBAC operations`,