web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

error running sp from SL EXECUTE permission was denied on the object 'spname'

(0) ShareShare
ReportReport
Posted on by 150

Hi,

I created an stored procedure for one screen custom with vs tools for Dynamics SL. The screen has a button, the when the user click in the button the application execute a stored procedure.

I used call sql for execute the stored procedure. If I do login with SYSADMIN the stored works fine, but the another users get the error "EXECUTE permission was denied on the object ". 

The stored procedure has permission to the MSDynamicsSL and for the user [E8F575915A2E4897A517779C0DD7CE] because the sp has the instruction WITH EXECUTE AS 'E8F575915A2E4897A517779C0DD7CE'

Which other permission is missing?

Thanks,

Mary

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mark E Profile Picture
    6,451 on at
    RE: error running sp from SL EXECUTE permission was denied on the object 'spname'

    I always put these permissions at the end of each custom proc:

    GRANT EXECUTE ON [dbo].[myproc] TO [E8F575915A2E4897A517779C0DD7CE]

    GO

    GRANT CONTROL ON [dbo].[myproc] TO [MSDSL]

    GO

    GRANT EXECUTE ON [dbo].[myproc] TO [TrustedWebService]

    (last one is if you are using Web Services)

  • Erich Strelow F Profile Picture
    16 on at
    RE: error running sp from SL EXECUTE permission was denied on the object 'spname'

    What does the sp do?

    If it needs to "jump" between databases, as in calling a msdb.* sp or doing a select on the SL SYS database, you should use the WITH EXECUTE AS '07718158D19D4f5f9D23B55DBF5DF1' instead.

  • Maria Carrero Profile Picture
    150 on at
    RE: error running sp from SL EXECUTE permission was denied on the object 'spname'

    Thank you, The error is fixed

  • Maria Carrero Profile Picture
    150 on at
    RE: error running sp from SL EXECUTE permission was denied on the object 'spname'

    I am using the user E8F575915A2E4897A517779C0DD7CE because I am using SL 2015. The sp call the bulk insert instruction

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans