Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
objecto opened this issue Apr 26, 2023 · 7 comments · Fixed by #659
Open
Assignees
Labels
awaiting reply More information is needed bug Something isn't working

Comments

@objecto
Copy link

objecto commented Apr 26, 2023

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

@objecto objecto added bug Something isn't working untriaged A new issue requiring triage labels Apr 26, 2023
@albertospelta albertospelta self-assigned this Apr 26, 2023
@albertospelta albertospelta added awaiting reply More information is needed and removed untriaged A new issue requiring triage labels Apr 26, 2023
@albertospelta
Copy link
Collaborator

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?

@objecto
Copy link
Author

objecto commented Apr 26, 2023

Hi @albertospelta , thanks for the quick reply.

Yes it connects just fine.

image

@albertospelta
Copy link
Collaborator

@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 ?

@albertospelta
Copy link
Collaborator

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
Copy link
Author

objecto commented Apr 28, 2023 via email

@albertospelta
Copy link
Collaborator

@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 [email protected].
Thanks!

image

image

@objecto
Copy link
Author

objecto commented May 2, 2023 via email

@albertospelta albertospelta changed the title Internal Error 500: The connection either timed out or was lost HTTP error 403 (Forbidden) while connecting to a PBI dataset in a PRO licensed workspace May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply More information is needed bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants