title: Custom Form Authentication in SSRS 2012
body: <p>I'm new to SSRS and have been asked to add custom authentication for access to Report Server and Report Manager on SQL Server 2012</p>
  
  <p>I have been following the instructions by <a href="https://msftrsprodsamples.codeplex.com/wikipage?title=SS2012!Security%20Extension%20Sample" rel="nofollow">Microsoft's security extension sample</a> close to the teeth. The only modifications I have made are to the actual UILogin.aspx and Login.aspx and the UserAccounts database and that wmi namespace v11 is used. The Project is compiled in Debug mode (<strong>GetUserInfo</strong> modified to not include Assert and null reference exception)</p>
  
  <p>I'm successful able to add a custom login and assign it as administrator in /ReportServer/rsreportserver.config under the <strong>&lt;Security&gt;&lt;Extension&gt;&lt;Configuration&gt;&lt;AdminConfiguration&gt;&lt;UserName&gt;</strong> configuration element. This user is able to connect to both Report Manager (<strong>https:&#47;&#47;&lt;domain&gt;/Reports</strong>) and Report Server view (<strong>https:&#47;&#47;&lt;domain&gt;/ReportServer</strong>) [Have configured to use https and seems to work. The idea to use custom form authentication is so we can access the reports remotely]</p>
  
  <p>I then register a new user in the UserAccounts database and want the user to have access to the Report Manager as well. Login to Report Manager with the first setup user and go to <strong>Site Settings->Security->New Role Assignment</strong> and add the new user (not a domain user) with "System Administration" and "System User" roles. I expect this should give the user access to both login types. But trying to login with the new user is giving errors:</p>
  
  <p>Report Manager errors with: </p>
  
  <blockquote>
    <p>User '' does not have required permissions. Verify that sufficient
    permissions have been granted and Windows User Account Control (UAC)
    restrictions have been addressed</p>
  </blockquote>
  
  <p>Report Server view errors with (user name masked):</p>
  
  <blockquote>
    <p>The permissions granted to user '&lt;user name&gt;' are insufficient
    for performing this operation. (rsAccessDenied)</p>
  </blockquote>
  
  <p>I have debugged the project to attached process and the custom login verification code is succeed as expected.</p>
  
  <p>If I then modify the <strong>&lt;Security&gt;&lt;Extension&gt;&lt;Configuration&gt;&lt;AdminConfiguration&gt;&lt;UserName&gt;</strong> configuration element mentioned above to use the new user login, then it works. </p>
  
  <p><em>This doesn't seems to be correct that we can only set up one user for custom authentication. Has anyone been able to do this for multiple custom user logins?</em></p>
  
  <hr>
  
  <p>Report Server Log dump (Report Manager login):</p>
  
  <pre><code>library!ReportServer_0-26!1524!02/26/2014-11:04:24:: i INFO: Call to GetItemTypeAction(/).
  library!ReportServer_0-26!1524!02/26/2014-11:04:24:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: , Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'enp' are insufficient for performing this operation.;
  library!ReportServer_0-26!17bc!02/26/2014-11:07:28:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: , Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: The Authentication Extension threw an unexpected exception or returned a value that is not valid: identity==null.;
  library!ReportServer_0-26!d14!02/26/2014-11:07:58:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: , Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: The Authentication Extension threw an unexpected exception or returned a value that is not valid: identity==null.;
  library!ReportServer_0-26!1518!02/26/2014-11:08:44:: i INFO: Call to GetPermissionsAction(/).
  ui!ReportManager_0-25!1524!02/26/2014-11:08:44:: e ERROR: Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User '' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.
     at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)
     at System.EventHandler.Invoke(Object sender, EventArgs e)
     at System.Web.UI.Control.OnInit(EventArgs e)
     at System.Web.UI.Page.OnInit(EventArgs e)
     at System.Web.UI.Control.InitRecursive(Control namingContainer)
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  library!ReportServer_0-26!6c0!02/26/2014-11:08:44:: i INFO: Call to GetSystemPermissionsAction().
  ui!ReportManager_0-25!1524!02/26/2014-11:08:44:: e ERROR: HTTP status code --&gt; 500
  -------Details--------
  Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User '' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.
  
     at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)
  
     at System.EventHandler.Invoke(Object sender, EventArgs e)
  
     at System.Web.UI.Control.OnInit(EventArgs e)
  
     at System.Web.UI.Page.OnInit(EventArgs e)
  
     at System.Web.UI.Control.InitRecursive(Control namingContainer)
  
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  library!ReportServer_0-26!6e0!02/26/2014-11:08:44:: i INFO: Call to GetSystemPropertiesAction().
  ui!ReportManager_0-25!1524!02/26/2014-11:08:44:: e ERROR: System.Threading.ThreadAbortException: Thread was being aborted.
     at System.Threading.Thread.AbortInternal()
     at System.Threading.Thread.Abort(Object stateInfo)
     at System.Web.HttpResponse.End()
     at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
  </code></pre>
  
  <p>Report Server Log dump (Report view login - user name masked):</p>
  
  <pre><code>library!ReportServer_0-26!117c!02/26/2014-10:56:08:: i INFO: Call to GetItemTypeAction(/).
  library!ReportServer_0-26!117c!02/26/2014-10:56:08:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: , Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user '&lt;user name&gt;' are insufficient for performing this operation.;
  </code></pre>