Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
EaglesTony
Post Prodigy
Post Prodigy

Cannot execute a stored procedure

Hi,

 

  I have a stored procedure RPT.MarketValue.

 

  When I go to Get the SQLServer data, I enter the server, the database and Import and put "EXEC  RPT.MarketValue" , but it gives me the error "The EXECUTE persmission was denied", however when I copy and paste the SQL instead it works ???

 

Is it because it is a stored procedure instead of a view maybe ?

1 ACCEPTED SOLUTION

If the stored proc provides the data you need, I would get permissions added to the account that is going to be refreshing the data. If that's going to be a service principal, you may need execute access added to your account, at least temporarily, while you are developing.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

4 REPLIES 4
v-nmadadi-msft
Community Support
Community Support

Hi @EaglesTony ,
Thanks for reaching out to the Microsoft fabric community forum.

Thank you to @KNP  for some valuable points, 
Please check this article on how to grant a user acces to stored procedure: Grant Permissions on a Stored Procedure - SQL Server | Microsoft Learn
it will help give you access to the stored procedure and will resolve the error.

If this post helps, then please consider Accepting as solution to help the other members find it more quickly and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thank you

KNP
Super User
Super User

It sounds like your account doesn't have EXECUTE permission on the database.

 

Have you tried executing the stored procedure in SSMS/Azure Data Studio?

I suspect you'll get the same error.

You'll need to get your DBA to alter your permissions.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

I think your are correct, as I am trying to convert an SSRS report to PowerBI and think the SSRS was running under a service account, where I am running under my windows login assigned to a AD-Group which has certain permissions.

 

I can run views though or copy/paste the sql from the stored procedure and that works.

If the stored proc provides the data you need, I would get permissions added to the account that is going to be refreshing the data. If that's going to be a service principal, you may need execute access added to your account, at least temporarily, while you are developing.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.