[英]Azure app registrations - SQL Server permission for C# App
I have created a C# app with an MSOL authentication prompt.我创建了一个带有 MSOL 身份验证提示的 C# 应用程序。 This auth prompt authenticates the user to my app and to my Asana integration.此身份验证提示向我的应用程序和我的 Asana 集成验证用户身份。 This works fine.这工作正常。
I now need to give my app permissions to access SQL databases in my Azure App Registration, but I can't find the API listed in the "Request API Permissions" section.我现在需要在我的 Azure 应用注册中授予我的应用访问 SQL 数据库的权限,但我找不到“请求 API 权限”部分中列出的 API。
Does anyone know how I am supposed to grant my app access to SQL?有谁知道我应该如何授予我的应用程序访问 SQL 的权限? Currently I get an error from my app stating that it does not have access to the database.目前,我从我的应用程序中收到一条错误消息,指出它无权访问数据库。 I have already set my AAD account as an admin of the DB but I still cannot access it.我已经将我的 AAD 帐户设置为数据库的管理员,但我仍然无法访问它。
Edit: This is the problem I am facing.编辑:这是我面临的问题。 Should be an option for SQL server.应该是 SQL 服务器的一个选项。
Figured it out.弄清楚了。
For the Azure SQL Database option to show in the API Permissions you first need to create an Azure SQL Database and add yourself as either an admin or user and then login to that database via SQL Server Management Studio using Azure AD Credentials.要在 API 权限中显示 Azure SQL 数据库选项,您首先需要创建一个 Azure SQL 数据库并将自己添加为管理员或用户,然后使用 Azure AD 凭据通过 SQL Server Management Studio 登录到该数据库。
Once you have done that, the API still will not show without manually searching for "Azure SQL Database".完成此操作后,如果不手动搜索“Azure SQL 数据库”,API 仍不会显示。
Microsoft should really make this stuff clear in their documentation.微软应该在他们的文档中明确说明这些内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.