I created a Xamarin Forms app that reads data from an Azure SQL database.
Currently i login into the SQL database with an username and an userpassword directly in the Sourcecode:
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
builder.DataSource = "tcp:nnnnnnnn.database.windows.net";
builder.UserID = "userID";
builder.Password = "userPassword";
builder.InitialCatalog = "databaseName";
To do that, I currently have a resource group in Azure that contains a computer with SQL-Server and a SQL-Database.
Now I want to switch from the test phase to the production phase.
My idea: What I need is to give my app access to the databse without enter username or password or any other credentials.
For this problem, must I create also an app-service in azure or a virtuell computer? Is Azure-Active-Directory the right way? Must I create Managed Identitys?
What is the right workflow to do this?
Thanks in advance for your help
Oskar