none
Which user SSRS Custom code authenicate to access database? RRS feed

  • Question

  •  

    Hi, I have a custom assembly code that resides on reporting server (integrated with SharePoint).  To access sql server database from assembly, if I create an internal user within SQL Server, in Settings.settings of assembly for connection properties use SQL Server Authentication mode and enter username and password then assembly can access the database. 

    If I use windows authentication and I (have full rights to database) execute the report, it does not access the database.

    If I use windows authentication within a custom assembly, what user it tries to access the database?  I am assuming user who executed the report but want to be sure as some are suggesting the user which reporting services running as.

    The policy configuration file has been modified too.

    thanks.

    Friday, December 21, 2012 6:42 PM

Answers

  • Hello,

    It should work the same way as with connections in reports. If you set integrated security (Windows Authentication) the users account should be used.
    In this case though you might have double hop situation and you would need to configure Kerberos.

    You could check in the SQL Server Profiler Trace what user is used to connect on SQL Server.
    ANONYMOUS LOGON would confirm that the connection problem is caused by missing Kerberos configuration.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Thanks,
    Orsi
    Microsoft Online Community Support

    • Marked as answer by rv7a99cv Friday, January 25, 2013 9:47 PM
    Friday, January 25, 2013 10:27 AM
    Answerer

All replies

  • Hello,

    Thank you for your question.
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.

    Regards,
    Fanny Liu


    Fanny Liu
    TechNet Community Support

    Thursday, December 27, 2012 2:15 AM
    Moderator
  • After some test, I noticed (I think) it uses SSRS sevices user to access database.  So if give SSRS services user rights to the tables then you can use windows authentication mode.  But want to make sure if this is correct!

    thanks

    Friday, December 28, 2012 4:16 PM
  • Hello Rv7a99cv,

    I will work on this and get back to you.


    Many thanks| Harsh Chawla | Personal Blog:- SQL-blogs
    |Team Blog:- Team Blog

    Wednesday, January 2, 2013 12:54 PM
  • thank you.
    Wednesday, January 2, 2013 4:38 PM
  • Hello,

    It should work the same way as with connections in reports. If you set integrated security (Windows Authentication) the users account should be used.
    In this case though you might have double hop situation and you would need to configure Kerberos.

    You could check in the SQL Server Profiler Trace what user is used to connect on SQL Server.
    ANONYMOUS LOGON would confirm that the connection problem is caused by missing Kerberos configuration.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Thanks,
    Orsi
    Microsoft Online Community Support

    • Marked as answer by rv7a99cv Friday, January 25, 2013 9:47 PM
    Friday, January 25, 2013 10:27 AM
    Answerer