问题描述
我正在尝试使用 adodbapi 在 Python 中连接到 Azure 分析服务。使用应用服务主体。
虽然我能够通过多因素身份验证使用我的个人凭据进行连接和执行。但是,我对如何使用 adodbapi
通过服务主体建立连接感到震惊以下代码仅供参考,我在阅读了几篇文章后尝试使用。但是,没有任何效果。
有人可以帮忙吗??
from azure.identity import ClientSecretCredential
import adodbapi as aasapi
def main(mytimer: func.TimerRequest) -> None:
# Retrieve the IDs and secret to use with ServicePrincipalCredentials
subscription_id = "xxxxx"
tenant = "xxxx"
client = "xxxx"
client_sec = "xxxx"
credential = ClientSecretCredential(tenant_id=tenant,client_id=client,client_secret=client_sec)
aasConn = aasapi.connect("Provider=MSOLAP;Data Source=asazure://<xxxx>.asazure.windows.net/<server>;Catalog=<TabularDatabase>;UID=;PWD={0}".format(credential))
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)