Forum Discussion

GuestUser's avatar
GuestUser
Helper V
7 years ago

Custom Authentication in Power BI Report Server

HI,

 

We have power BI Report Server Installed (On-prem)

 

We do not need Windows Authentication for login in to Power BI Application for  the Users


So we plan to implement Custom Authentciation as mentioned in below document

https://github.com/Microsoft/Reporting-Services/tree/master/CustomSecuritySample

 

Could anyone please help in elaborating which Steps to actually implement from the below since it is mentioned

"If we have Power Bi Report Server, then we need to just run Configure.ps1"

As I understand ,

Configure.ps1 is the code which is attached in the above link . Should I need to copy this file in any path on the server?
If yes, could you pls help me with the path
Also,
Is there any other steps that I need to do like copying files etc?

 

 

Thanks!!

6 Replies

  • luisrh's avatar
    luisrh
    Responsive Resident

    The github readme has the details on what to do under Step 3:  Deployment and Configuration.   If you follow those instructions it should work.  I suggest you tailor the code to deal with the type of auth you will be implementing.  If you are doing some type of SSO , there is extra work you'll need to do.

     

    • GuestUser's avatar
      GuestUser
      Helper V

      Thanks!!

       

      But I need to understand how do we run the Configure.ps1 command

      Should we set some path on command prompt and then run this Configure.ps1 ?

       

      Can someone please elaborate on it..?

       

      • saykasku's avatar
        saykasku
        Resolver I

        "All the steps are automated in a PowerShell Script, if you have a Power BI Report Server default installation you can run (the script is only valid for Power BI Report Server, for SSRS you need to follow the manual steps)

        .\Configure.ps1

        This configuration is not intended to use in production, you should generate your own strong name key and your own authentication key different of those used in the sample"

         

        I think u have default paths in this file so u can run it everywhere. You need to do this only once.

  • BoschRBEI's avatar
    BoschRBEI
    Regular Visitor

    We have configured the Power BI Report server for custom authentication. When we log in with the custom user we get the following error. Request your help in this regard and let us know on how to associate security roles to custom users

     

    Could not load folder contents

    You are not allowed to view this folder. Contact your administrator to obtain the necessary permissions.

  • Hello,

    we applied this authentication method to our system and it is working fine. We have 6 Report Server as ScaleOuted. But some of our Business Teams wants to be login portal with Windows Authentication.  Then we changed on of the servers authentication methods to Windows NTLM. But when we want to login to portal system give us "Could Not Load the Folder Content. Something went wrong Please Try later."

    I tried lots of things,

    * I removed server from scaled out ( did not run)

    * I added new portal url in ReportServerUrl string in reportserver.config

    does anyone have any idea what is wrong?

     

     

    in RSportal log we found below log

     

    2021-01-06 18:44:33.2056|ERROR|6|OData exception occurred: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AuthorizationExtensionException: An error occurred when invoking the authorization extension. ---> System.InvalidOperationException: (security): secDesc != null
    at Microsoft.ReportingServices.Diagnostics.Utilities.RSTrace.DefaultRSTraceInternal.Fail(String componentName, String message)
    at Microsoft.ReportingServices.Diagnostics.Utilities.RSTrace.Assert(Boolean condition, String message)
    at Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String userName, IntPtr userToken, Byte[] secDesc, FolderOperation requiredOperation)
    at Microsoft.ReportingServices.Library.Security.<>c__DisplayClass51_1.<CheckAccess>b__0()
    at Microsoft.ReportingServices.Diagnostics.ExtensionBoundary.Invoke(Method m)
    --- End of inner exception stack trace ---
    at Microsoft.ReportingServices.Diagnostics.ExtensionBoundary.Invoke(Method m)
    at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType catItemType, Byte[] secDesc, FolderOperation fldOper, ExternalItemPath folderPath)
    at Microsoft.ReportingServices.Library.SecurityCheckCache.CheckAccessForCachedPolicy(ItemType type)
    at Microsoft.ReportingServices.Library.CatalogItemDescriptorFactory.BuildFromDbRow(IDataReader reader, CatalogItemDescriptor& itemDescriptor)
    at Microsoft.ReportingServices.Library.DBInterface.FindFavoriteableItems(InstrumentedSqlCommand command, FavoriteableCatalogItemList& result, Security secMgr, IPathTranslator pathTranslator, Boolean appendMyReports)
    at Microsoft.ReportingServices.Library.DBInterface.FindFavoriteableItemsNonRecursive(ExternalItemPath objectName, FavoriteableCatalogItemList& children, Security secMgr, IPathTranslator pathTranslator, Boolean appendMyReports)
    at Microsoft.ReportingServices.Library.ListFavoriteableItemsAction.PerformActionNow()
    at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute()
    at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.TraverseFolder(IPrincipal userPrincipal, String itemPath, Boolean recursive)
    at Model.FolderRepository.LoadCatalogItems()
    at Model.Folder.get_CatalogItems()
    --- End of inner exception stack trace ---
    at Microsoft.ReportingServices.Portal.ODataWebApi.Controllers.SegmentHandlers.PropertySegmentHandler.Handle(Object source, ODataPathSegment segment)
    at Microsoft.ReportingServices.Portal.ODataWebApi.Controllers.Reflection.ReflectionODataController`1.Get(ODataPath oDataPath)
    at lambda_method(Closure , Object , Object[] )
    at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
    at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

     

     

    Thanks

     

    Sinan