diff --git a/src/Common/CosmosClient.ts b/src/Common/CosmosClient.ts index 9d35b15e5..4256c31a3 100644 --- a/src/Common/CosmosClient.ts +++ b/src/Common/CosmosClient.ts @@ -91,7 +91,7 @@ export const tokenProvider = async (requestInfo: Cosmos.RequestInfo) => { userContext.masterKey, ); return decodeURIComponent(headers.authorization); - } else { + } else if (userContext.dataPlaneRbacEnabled == false) { const { databaseAccount: account, subscriptionId, resourceGroup } = userContext; const keys: DatabaseAccountListKeysResult = await listKeys(subscriptionId, resourceGroup, account.name);