I'm trying out Azure. I'm hosting a C# .NET Core 8 MVC Web Application as a Azure App Service WebApp (Free Plan) and it should access a Azure SQL Server Database (Free Plan).
When the WebApp was created a User Managed Service Identity was created as well.
When the WepApp tries to access the Database im getting a Error as below
I do have the connection string in the app settings defined as below
"Server=tcp:sqlserveraddress.database.windows.net,1433;Initial Catalog=SQLDBName;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;Authentication="Active Directory Default";"
Does anyone know how to grant the User Managed Service Identity access to the database itself? The Database doesn't have a IAM Screen.
Can't believe I do need to use TSQL to administrate add the USMI as a user and login with permissions?
EDIT: I've created a user for the UMSI and granted it db_datareader, db_datawriter, db_ddladmin as the App has to create tables from the migration. Didnt help. Error is still the same.
Thanks to Bhavani for referring me to this
I had to enable and create a System Managed Identity. Only the System Managed Identity is then created within Entra / ADD. After this the Application was able to access the Database. The User Managed Identity is not created in Entra / ADD.