If I create a Powerapp with SQL Server as the datasource/connector, I want to be able to create a trace in the SQL Server Profiler to create a trace on transactions to a certain SQL Server database, which I can do. However, I want the user to show up in the "LoginName" field of the trace table (or trace file). However, for PowerApps I have setup the connection to SQL Server using "Basic" authentication instead of "Windows" authentication. Can I assume that since I use "Basic" authentication, that is the reason why the same user shows up as the "LoginName" in the trace? This user is a database user I created solely to create this connection. Can I assume that using "Windows" authentication would allow whatever user is logged into PowerApps to appear as the "LoginName" in the trace file. Also, would I need to add this windows user as a user in the SQL Server database as well?
Hi @agigliotti ,
Firstly, let me explain about the Authentication type of SQL Server.
If you choose Windows Authentication, then you need to fill in data with your windows user account and password.
In this situation, you need to fill in authentication information of the user created in Windows (when you open your computer, the username and password that you need to enter in).
The windows user account format is usually: domain\username
If you choose SQL Server Authentication, then you need to fill in data with your sql server user account and password.
In this situation, you need to fill in authentication information of the user that you create in SQL Server.
Secondly, when you create connection with SQL Server in powerapps, firstly you need to choose Authentication type of SQL Server.
You need to fill in authentication information based on the type you entered.
If you choose Windows Authentication, enter windows user information.
If you choose SQL Server Authentication, enter SQL Server user information.
Thirdly, answer your questions.
1) Would I need to add this windows user as a user in the SQL Server database as well?
No, you do not need to. Windows user and sql server user are two different types of user.
2)about the "LoginName" in the trace
If you choose Windows Authentication when you connected with sql server, it will show as windows user name in sql profile when you use this connection.
If you choose SQL Server Authentication when you connected with sql server, it will show as sql user in sql profile when you use this connection.
Best regards,
MS.Ragavendar
32
Michael E. Gernaey
19
Super User 2025 Season 1
Rajkumar_M
16
Super User 2025 Season 1