简体   繁体   English

Azure 应用程序注册 - C# 应用程序的 SQL Server 权限

[英]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 服务器的一个选项。 尝试将 SQL Server 添加为 API 权限

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.

相关问题 在C#应用程序中模仿SQL Server Profiler? - Imitating SQL Server Profiler in a C# app? C#应用程序中的Sql Server连接错误 - Sql Server Connection Error in C# app 我正在尝试在 C# 应用程序上运行一些 powershell 脚本以授予 Azure AD 应用程序的权限,它适用于 Powershell 但不适用于 C# 应用程序 - I am trying to run some powershell script on C# app to grant permission on Azure AD App, it works on Powershell but not on C# app C#Web应用程序未通过Azure混合连接连接到本地SQL Server - C# web app not connecting to on premise SQL Server through Azure hybrid Connection Blazor C# App如何连接到Azure Z9778840A0100CB30C982876741B0数据库? 苹果系统 - How to connect Blazor C# App to Azure SQL Database? MacOS 部分C#应用程序的管理员权限 - Administrator permission for part of C# app C#:通过Azure SDK在Azure Function App中管理Azure SQL数据库 - C#: Manage Azure SQL databases through Azure SDK in an Azure Function App C#Web App与SQL Server的安全连接 - C# Web App secure connection to SQL Server 是否可以从C#应用程序访问SQL Server Service Broker? - Is it possible to access SQL Server Service Broker from a C# app? 通过网络将C#应用程序与SQL Server 2008连接 - Connect C# app with SQL Server 2008 via network
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM