Commit 59e3c40c by Oleksandr Barabash

reverted back to ManagedIdentityCredential

parent c1a5cf64
......@@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, List
import azure.cosmos.cosmos_client as cosmos_client
import azure.cosmos.exceptions as exceptions
from azure.cosmos import DatabaseProxy, ContainerProxy
from azure.cosmos import DatabaseProxy, ContainerProxy, documents
from azure.identity import ManagedIdentityCredential, DefaultAzureCredential
from botbuilder.core import TurnContext
from botbuilder.schema import ChannelAccount
......@@ -50,7 +50,7 @@ class CosmosClient:
""" Cosmos Client class """
def __init__(self, host: str, master_key: str):
self.executor = futures.ThreadPoolExecutor()
mgmt_credentials = DefaultAzureCredential()
mgmt_credentials = ManagedIdentityCredential()
self.client = cosmos_client.CosmosClient(host, mgmt_credentials)
# self.client = cosmos_client.CosmosClient(host,
# dict(masterKey=master_key))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment