Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Pass User Business Unit as a parameters to SSRS from CRM

Posted on by Microsoft Employee

Hello Everyone,

I have a critical problem with SSRS report. I have a report that have to show some user data based on user business unit. I used all recommended techniques to get current session user business unit from inside report procedure, like pre-filtered views, filtered views, CRM SQL functions. I followed all techniques at following links 

and much more.

The problem is that, all mentioned techniques did not return current session user (User that opens the Report). It is always returns user who opens the connection with SQL Server. This problem happens because CRM administrator configured Reports Data Source to use static credential option instead of shared credential.

SQLVM-Data-source.png

I don't know why he configured Data Source like attached configuration. 

My question now, how could I deal with this situation. Should CRM administrator change data source to first option (Credentials supplied by the user running the report)? Or there is another way to pass User Business Unit to report procedure regardless of the user who opens the connection to data source.

Thanks in Advance.

*This post is locked for comments

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Pass User Business Unit as a parameters to SSRS from CRM

    Hi Wael Mohsen,

    You should enter prompted credentials and check Credentials supplied by the user running the report in report data source connection. When you configure a report data source connection to use prompted credentials, each user who access the report must enter a user name and password to retrieve the data. This approach is recommended for reports that contain confidential data. Prompted credentials can be used only on reports that run on demand. Prompted credentials can be a Windows account or a database login.  To use Windows Authentication, you must select Use as Windows credentials when connecting to the data source. Otherwise, the report server passes credentials to the database server for user authentication. If the database server cannot authenticate the credentials that you provide, the connection will fail.

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Pass User Business Unit as a parameters to SSRS from CRM

    Hi Wael,

    I would suggest you change the Connect using setting to "Credentials supplied by the user running the report".  This will make sure, the report will only include information that user running the report is permitted to see based on Security Roles.

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

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

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans