简体   繁体   English

如何将 MFA 与嵌入在 MS Excel 文件中的 SQL 服务器数据源一起使用

[英]How to use MFA with SQL Server Datasource embedded in MS Excel file

I have an excel file that retrieves data from Azure SQL Database.我有一个 excel 文件,它从 Azure SQL 数据库中检索数据。 I want to force MFA on the connection.我想在连接上强制 MFA。 I have gone through MS documentation and set up connection string as recommended in the documentation.我已经阅读了 MS 文档并按照文档中的建议设置了连接字符串。

server=server;database=database;Authentication=ActiveDirectoryIntegrated;

When I use this in SSMS, it works like a charm.当我在 SSMS 中使用它时,它就像一个魅力。 I get text message with authentication code.我收到带有验证码的短信。 But when I use the same connection string inside excel file, it simply prompts with a login dialog box and asking to end credentials.但是当我在 excel 文件中使用相同的连接字符串时,它只会提示登录对话框并要求结束凭据。

Is there a way to enable MFA for SQL Server connection when it is embedded in Excel file?当 SQL 服务器连接嵌入到 Excel 文件中时,有没有办法为它启用 MFA?

These is no document talk about how to configure MFA as the default authentication when connect to Azure SQL database from Excel.这些没有文档讨论如何将 MFA 配置为从 Excel 连接到 Azure SQL 数据库时的默认身份验证。

But we can use MFA to connect to SQL database by some other ways.但是我们可以通过其他一些方式使用MFA连接到SQL数据库。 You could follow my steps:你可以按照我的步骤:

I'm using Excel 2016.我正在使用 Excel 2016。

1. Data-->From Other Sources-->From Data Connection Wizard: 1.数据-->来自其他来源-->来自数据连接向导:

在此处输入图像描述

2. Select: Other/Advanced 2. Select:其他/高级

在此处输入图像描述

3. Choose Microsoft OLEDB Driver for Sql Server, Next: 3.选择Microsoft OLEDB Driver for Sql Server,下一步:

在此处输入图像描述

4. We can using the MAF authentication to connect to the Azure SQL: 4.我们可以使用MAF认证连接Azure SQL:

在此处输入图像描述

5. Choose the table: 5.选择表:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM