从Python中的桌面应用程序连接到Azure SQL数据库:Azure AD授权
我有一个用Python编写的桌面应用程序,该应用将一些数据上传到Azure上托管的SQL数据库(SQL Server)。使用Azure AD MFA对访问进行身份验证。该应用程序使用PYODBC。这有点麻烦,因为每次使用该应用程序时,我都需要输入密码和授权代码。我希望该应用程序自动获得身份验证。我不想使用一些简单的解决方法,例如使应用程序直接访问数据库规避广告授权。 第二个问题是该应用程序继承了我所有的访问权限,这不需要,因为它将数据加载到临时表中。我了解我可以在Azure AD上注册该应用程序并获得访问令牌。但是,我不知道下一步该怎么做。
I have a desktop app written in Python which uploads some data to an SQL database (SQL Server) hosted on Azure. The access is authenticated using Azure AD MFA. The application uses pyodbc. This is a bit cumbersome because I need to type in my password and authorization code every time I use the application. I want the application to get authenticated automatically. I do not want to use some simple workarounds like giving the app direct access to the database circumventing AD authorization.
The second problem is that the application inherits all my access privileges, which it does not need since it loads data to temporary tables. I understand that I can register the application with the Azure AD and obtain an access token. However, I do not know what to do next.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)