You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Microsoft.AnalysisServices.Tabular.NetCore是否支持SQL Server用户认证?

Azure Analysis Services 是否支持SQL用户身份验证?

Azure Analysis Services 不支持SQL Server身份验证(即SQL用户账号登录),官方明确支持的认证方式仅包括:

  • Azure Active Directory(AAD)认证(含AAD用户、服务主体,但托管标识确实不被Analysis Services支持)
  • Windows集成身份验证(NTLM、Kerberos、通过EffectiveUserName模拟身份)

你当前尝试的SQL用户+密码连接方式无法成功,因为服务端不识别该认证类型。如果需要具备管理员权限的身份连接,可选择以下方案:

  • 使用AAD管理员账号:可以是AAD中的用户账号,或提前配置为Analysis Services服务器管理员的AAD服务主体
  • 使用Windows集成身份验证:通过具备Analysis Services管理员权限的域账号进行集成登录

你提供的示例代码采用SQL用户的连接字符串不符合服务要求,以下是AAD服务主体认证的调整示例:

// analysis services details
string serverName = "asazure://region.asazure.windows.net/myserver";
string databaseName = "mydb";
string tenantId = "你的租户ID";
string clientId = "你的服务主体客户端ID";
string clientSecret = Environment.GetEnvironmentVariable("SP_SECRET");

var connectionString = $"Provider=MSOLAP;Data Source={serverName};Initial Catalog={databaseName};User ID=app:{clientId}@{tenantId};Password={clientSecret};Persist Security Info=True;Impersonation Level=Impersonate;";

内容的提问来源于stack exchange,提问作者Muhammad Pathan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 00:56:00