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

Connecting to on premise SQL with Powerapps: you don't have permission to view this data

When connecting to the SQL Server database, powerapps is able to retrieve the correct tables. Only problem is that when making an connection like an dropdown ,it shows an error in viewing the corresponding data.

 

The following runtine error is showing:

 

You don't have permission to view this data.

Server response: (table.name) 

failed: Permission Exception
inner exception:

Internal error: DataSourceCredentials

 

We are using an SQL on premise connection with a gateway and have access to both. The SQL account connected to the data created the tables and should have the right permissions. Anyone got pointers on how to solve this? Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

It has been resolved by deleting the old connection and reinstalling the connection with the correct gateway.

Seems like editing the connection did not apply for this case. Thanks for your help.

View solution in original post

5 REPLIES 5
timl
Super User
Super User

@Shark1986 

I'm not sure why you're seeing this problem, particularly if you're using the SQL account that created tables, with the correct permissions.

Are you seeing this error in design view?

To diagnose this further, if you were to add a gallery control and set it to the table where you see this permissions error, does the gallery control correctly populate with data? This would at least confirm whether the issue relates only to certain controls, such as a drop down.

This error is showing in design view. Gallery has the same issue. The homepage has a gallery which shows the same error. My co-worker has set up the gateway and connected it to the environment and the app.

Due too security resasons the current gateway isn't shared with my account.

 

Because of this my account has no gateway shown in my connections, but he gave me ownership to the application for further development and I can also see the SQL Server in data connections. Can this be the problem?

 

I am wondering if I can use the connection this way or need more permission in the gateway? Eventually this application is supposed to be shared with multiple users within the organization to submit data, so it needs to be save to use without granting them too much access.

 

timl
Super User
Super User

Hi @Shark1986 

Thanks for the additional details.

The fact that the gateway isn't shared with your account may be a contributing factor.

However, arguably, this shouldn't be the case, particularly if you can view one table but not another. I can't think of any other additional settings that you could apply at the gateway.

Just to confirm, can you definitely view the data in both tables if you were to connect to the database in Management Studio using the credentials that your co-worker specified in the connection?

I'm not sure what the answer is to this - perhaps someone else here might have some ideas?

I tried to access the app with his credentials. He has the gateway mentioned under data/gateway and is added as gateway admin. Still the data shows the same error and gives us no permission to view the data in edit mode. We checked region for the environment and gateway and both is Europe. Could it have something with the app saying were using implicitly shared connections?

 

It has been resolved by deleting the old connection and reinstalling the connection with the correct gateway.

Seems like editing the connection did not apply for this case. Thanks for your help.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,121)