Microsoft.Azure.Kusto.Data.NETStandard 包中缺少 WithAadUserPromptAuthentication

Lak*_*udi 4 .net-standard azure-data-explorer

我正在使用 NuGet 包 Microsoft.Azure.Kusto.Data.NETStandard(昨天发布的最新版本 6.1.4)。在以前的版本中,我经常遇到以下错误。

\n\n
\n

Kusto 连接字符串生成器具有一些无效或冲突的属性:指定的“AAD 用户名密码”身份验证方法设置了不正确的属性。\',\n 请查阅 Kusto 连接字符串文档:https://learn.microsoft.com/en-us/azure/kusto/api/connection-strings/kusto

\n
\n\n

但是,现在错误发生了变化,并为我提供了更多详细信息,如下所示。

\n\n
\n

Kusto 连接字符串生成器具有一些无效或冲突的属性:指定的“AAD 用户名密码”身份验证方法具有一些不正确的属性。缺少:[用户 ID、密码].. \',\n 请参阅 Kusto 连接字符串文档,网址为https://learn.microsoft.com/en-us/azure/kusto/api/connection-strings/kusto

\n
\n\n

一旦我提供了用户名和密码,就成功了。(我不想\xe2\x80\x99不想)

\n\n

我还使用了KustoConnectionStringBuilderMicrosoft.Azure.Kusto.Data NuGet 包 (.NET Framework) 中的类。这允许我使用 来连接而无需传递用户名和密码WithAadUserPromptAuthentication()

\n\n
var kustoConnectionStringBuilder = new KustoConnectionStringBuilder(\n    $"https://{serviceName}.kusto.windows.net")\n.WithAadUserPromptAuthentication(authority);\n
Run Code Online (Sandbox Code Playgroud)\n\n

为什么 .NetStandard 包中缺少此方法?

\n

bwm*_*ens 5

我认为当他们添加 .NETStandard 库时,该功能不可用。他们确实会在其“用户之声”网站上接受功能请求,因此我建议您在那里请求。

编辑:正如您启动的技术社区线程中所述,交互式 AAD 弹出窗口在 ADAL 库的 .NET 标准版本中不可用,因此 Kusto 无法利用它。如果这是一个重要的功能,那么最好的起点可能是向 ADAL 提出功能请求,尽管我不太确定他们如何在 .NET Standard 中设计该合同。