Skip to main content

Notifications

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

  • Maria Carrero Profile Picture
    Maria Carrero 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

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

    Thank you, The error is fixed

  • Erich Strelow F Profile Picture
    Erich Strelow F 1,642 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.

  • Suggested answer
    Mark E Profile Picture
    Mark E 6,405 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)

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans