cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Log User to SQL Server

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?

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Log User to SQL Server

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.

3310.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,744)