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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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 ;).
xOIEmaj

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.
image
fabric-SUbadge
Proud to be a Super User!

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 ;).
xOIEmaj

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.
image
fabric-SUbadge
Proud to be a Super User!

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 ;).
xOIEmaj

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.
image
fabric-SUbadge
Proud to be a Super User!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.