sql-bi / Bravo

Bravo for Power BI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP error 403 (Forbidden) while connecting to a PBI dataset in a PRO licensed workspace

objecto opened this issue · comments

Describe the problem

After switching to Dev branch to avoid error "No right to call Discover method" , now I get "The connection either timed out or was lost" instead. I'm accessing a dataset on a "Pro" workspace, in a tenant where I'm the admin. Didn't have this problem a while ago. Last time I used Bravo to check those datasets must have been 2-3 months back.

The complete error stack is as follows:

{"name":"[HOST] UnhandledException","objects":["Microsoft.AnalysisServices.AdomdClient.AdomdConnectionException: The connection either timed out or was lost.\r\n ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).\r\n at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()\r\n at Microsoft.AnalysisServices.AdomdClient.HttpStream.HttpChannelController.GetResponseMessageImpl(HttpStream owner, Object context, Task1 pendingResponse)\r\n at Microsoft.AnalysisServices.AdomdClient.HttpStream.HttpChannelController.CompleteHttpClientBasedOperation(HttpStream owner, Object context, Task1 pendingResponse)\r\n at Microsoft.AnalysisServices.AdomdClient.HttpStream.HttpXmlaOperation.HttpClientOperationManager.GetResponse(HttpXmlaOperation operation)\r\n at Microsoft.AnalysisServices.AdomdClient.HttpStream.LegacyController.HttpClientXmlaOperation.GetResponseImpl()\r\n at Microsoft.AnalysisServices.AdomdClient.HttpStream.HttpXmlaOperation.EnsureCanRead()\r\n at Microsoft.AnalysisServices.AdomdClient.HttpStream.LegacyController.LegacyXmlaOperation.EnsureCanRead()\r\n at Microsoft.AnalysisServices.AdomdClient.HttpStream.HttpXmlaOperation.GetResponseDataType()\r\n at Microsoft.AnalysisServices.AdomdClient.HttpStream.GetResponseDataType()\r\n --- End of inner exception stack trace ---\r\n at Microsoft.AnalysisServices.AdomdClient.XmlaClient.EndRequest(Boolean useBinaryXml)\r\n at Microsoft.AnalysisServices.AdomdClient.XmlaClient.EndRequest()\r\n at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility)\r\n at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Discover(String requestType, String requestNamespace, ListDictionary properties, IDictionary restrictions, Boolean sendNamespacesCompatibility, IDictionary requestProperties)\r\n at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SupportsProperties(IList1 propertyList)\r\n at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)\r\n at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect()\r\n at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.ConnectXmla()\r\n at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)\r\n at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()\r\n at Sqlbi.Bravo.Infrastructure.Services.AdomdConnectionWrapper.<.ctor>b__0_0() in D:\\a\\1\\s\\src\\Infrastructure\\Services\\ConnectionWrapper.cs:line 79\r\n at Sqlbi.Bravo.Infrastructure.Helpers.ProcessHelper.RunOnUISynchronizationContext(Action action) in D:\\a\\1\\s\\src\\Infrastructure\\Helpers\\ProcessHelper.cs:line 78\r\n at Sqlbi.Bravo.Infrastructure.Services.AdomdConnectionWrapper..ctor(String connectionString, String databaseName) in D:\\a\\1\\s\\src\\Infrastructure\\Services\\ConnectionWrapper.cs:line 79\r\n at Sqlbi.Bravo.Infrastructure.Services.AdomdConnectionWrapper.ConnectTo(PBICloudDataset dataset, String accessToken) in D:\\a\\1\\s\\src\\Infrastructure\\Services\\ConnectionWrapper.cs:line 121\r\n at Sqlbi.Bravo.Services.AnalyzeModelService.GetDatabase(PBICloudDataset dataset, String accessToken, CancellationToken cancellationToken) in D:\\a\\1\\s\\src\\Services\\AnalyzeModelService.cs:line 77\r\n at Sqlbi.Bravo.Controllers.AnalyzeModelController.GetDatabase(PBICloudDataset dataset, CancellationToken cancellationToken) in D:\\a\\1\\s\\src\\Controllers\\AnalyzeModelController.cs:line 81\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Hellang.Middleware.ProblemDetails.ProblemDetailsMiddleware.Invoke(HttpContext context)"],"time":1682496325809}

Bravo version

1.0.2-internal-20230412.1-main-308e7834fcee7ccec2134658206e2924322f56fd (1.0.8502.21762)

Tabular model

Power BI Dataset

Power BI

Service version:13.0.20534.70

Steps to reproduce the behavior

    • Open
  1. Datasets on powerbi.com
  2. Dataset selection
  3. After a few seconds the error occurs

Additional context

No response

Screenshots

image

Anything else ?

No response

Hi @objecto, thanks for reporting!

The inner error message indicates that the request was not authorized by the server

System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden)

Would it be possible for you to test using DaxStudio and let us know if you get the same error?

Hi @albertospelta , thanks for the quick reply.

Yes it connects just fine.

image

@objecto Does the error also occur with other datasets or only with this one?
Is this dataset is configured to import mode? Or other modes such as direct query or composite ?

Which version of DaxStudio did you use for this test ? The latest version (3.0.7) or an earlier one?

Yes it connects just fine.

image

@objecto Unfortunately, I cannot reproduce the problem on my side. In order to identify the cause and try to reproduce the error, it would be helpful for me to know what the properties are and the differences between this dataset and another one that you have tried successfully through Bravo.

You can view dataset properties in the diagnostics panel after enabling the verbose diagnostics level. Once diagnostics are enabled you can copy dataset metadata via the "Copy Message" function.

The information that would be helpful for me to know would be the information highlighted in the orange boxes for these diagnostic events:

  • [HOST] PBICloudService.GetDatasetsAsync.cloudWorkspaces
  • [HOST] PBICloudService.GetDatasetsAsync.cloudSharedModels

If you prefer to share them privately, feel free to email me here alberto.spelta@sqlbi.com.
Thanks!

image

image