Skip to main content

Notifications

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

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: MS Query from SQL to Excel Security

    You are most welcome Shelly

  • Community Member Profile Picture
    on at
    RE: MS Query from SQL to Excel Security

    This works perfectly! Thank you! =)

  • Community Member Profile Picture
    on at
    RE: MS Query from SQL to Excel Security

    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

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: MS Query from SQL to Excel Security

    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!!!

  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at
    RE: MS Query from SQL to Excel Security

    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,

  • Verified answer
    Mahmoud Saadi Profile Picture
    32,738 on at
    RE: MS Query from SQL to Excel Security

    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

  • Community Member Profile Picture
    on at
    RE: MS Query from SQL to Excel Security

    Yes exactly!

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: MS Query from SQL to Excel Security

    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,

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans