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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

MS Query from SQL to Excel Security

(0) ShareShare
ReportReport
Posted on by

Hello,

I recently ran a script to create a view, gave access to this view. Linked the MS query to this view. The report runs fine for SA but not for other users. What security does the users need to be able to access this excel report pulling data from sql?

Thanks for you help!

*This post is locked for comments

I have the same question (0)
  • Mahmoud Saadi Profile Picture
    32,738 on at

    Hello again ShellyAnn

    Are you talking about a normal Excel file being linked to SQL view ? Which prompts asking for authentication as shown below:

    Your feedback is highly appreciated,

  • Community Member Profile Picture
    on at

    Yes exactly!

  • Verified answer
    Mahmoud Saadi Profile Picture
    32,738 on at

    In this case, you need to use an SQL user with proper access on the view and its associated tables. Dynamics GP user will not work of course since it is a different thing

    You can consider saving the "sa" password on the Excel file for the users so that opening the file will not ask for the user name and password anymore, follow the steps below to save the password:

    1- On the Excel file, open the "Data" tab, click on connections

    2- One the connection string window is opening, click on the specific connection string and then "Properties"

    3- On the properties tab, open the "definition" tab and check the "Save Password" option

  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at

    Another option is to create an SQL user on the database level, which has appropriate access for the specific tables and view you created. Of course, this is definitely a better option to ensure that your "sa" password is not used and saved on separate Excel sheets across different computers.

    Your feedback is highly appreciated,

  • Suggested answer
    soma Profile Picture
    24,410 on at

    Why don't you try to connect the SQL server database with using window authentication?

    Better you can  provide SQL access to your windows users to SQL server database and the connect the database from EXCEL with using windows authentication mode instead of SQL server authentication.

    Hope this helps!!!

  • Community Member Profile Picture
    on at

    If you can implement Windows  Authentication to your SQL Server, you can try using stored procedure to implement the same view, and grant execute for your other windows credential to the stored procedure.

    Just make sure you create the stored procedure using your dbowner credential, then ownership chaining will take care of the permission

  • Community Member Profile Picture
    on at

    This works perfectly! Thank you! =)

  • Mahmoud Saadi Profile Picture
    32,738 on at

    You are most welcome Shelly

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans