Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Unable to connect to Sharepoint with P-BI in remote-mode

Hi,

 

I get this messages when I'm trying to connect to our Sharepoint with Power BI i remote desktop-mode
"Something went wrong

Acces is denied
Copy information to clipping"

 

 

Information from the clipping:

 

Feedback Type:
Frown (Error)

Error Message:
Access is denied

Stack Trace:
System.Net.HttpListenerException
   at System.Net.HttpListener.AddAllPrefixes()
   at System.Net.HttpListener.Start()
   at Microsoft.Mashup.Client.UI.Extensions.Windows.SystemBrowserOAuthDialog.Authorize(Uri logoutUri, Uri authorizationUri)
   at Microsoft.Mashup.Client.UI.Shared.OAuthManager.OpenOAuthDialog(IWindowHandle parentWindowHandle, ITelemetryService telemetryService, String resourceKind, String accessToken, String resourceUrl)
   at Microsoft.Mashup.Client.UI.Shared.OAuthManager.<>c__DisplayClass6_0.<OpenOAuthDialog>b__0()
   at Microsoft.Mashup.Client.UI.Shared.OAuthManager.<>c__DisplayClass7_0.<AsyncGetOAuthResult>b__0()
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

Stack Trace Message:
Access is denied

Invocation Stack Trace:
   at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
   at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
   at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
   at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
   at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
   at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at Microsoft.Mashup.Client.UI.Windows.DialogWindowBase.ShowModal(IWindowHandle windowHandle)
   at Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.<>n__0(IWindowHandle owner)
   at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
   at Microsoft.Mashup.Client.UI.Shared.Ux.CredentialsChallengeResolver.ShowResolveDialog(IWindowHandle owner, IUIHost uiHost)
   at Microsoft.Mashup.Client.UI.Shared.Ux.FloatingDialog.BuilderDialog.Js_HandleCredentialChallengeAndCloseBuilder(String dialogData)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Mashup.Client.UI.Shared.JsExportWrapper.<>c__DisplayClass13_0.<InvokeMember>b__0()
   at Microsoft.Mashup.Client.UI.Windows.JsErrorHandler.WrapInvokeHost(Func`1 invokeHost)
   at System.Windows.Forms.UnsafeNativeMethods.IDispatch.Invoke(Int32 dispIdMember, Guid& riid, Int32 lcid, Int32 dwFlags, tagDISPPARAMS pDispParams, Object[] pVarResult, tagEXCEPINFO pExcepInfo, IntPtr[] pArgErr)
   at System.Windows.Forms.UnsafeNativeMethods.IDispatch.Invoke(Int32 dispIdMember, Guid& riid, Int32 lcid, Int32 dwFlags, tagDISPPARAMS pDispParams, Object[] pVarResult, tagEXCEPINFO pExcepInfo, IntPtr[] pArgErr)
   at System.Windows.Forms.HtmlDocument.InvokeScript(String scriptName, Object[] args)
   at Microsoft.Mashup.Client.UI.Windows.JsErrorHandler.WrapInvokeScript(Func`1 invokeScript)
   at Microsoft.Mashup.Client.UI.Shared.AjaxHost.AjaxHandler.<>c__DisplayClass11_0.<OnProcessAjaxAsync>b__0()
   at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass2_1.<SendAndMarshalExceptions>b__0(Object null)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at Microsoft.Mashup.Client.UI.Windows.DialogWindowBase.ShowModal(IWindowHandle windowHandle)
   at Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.<>n__0(IWindowHandle owner)
   at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
   at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
   at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModalWithInitialReentrancyLock(FloatingDialog floatingDialog, ILegacyUIHost uiHost, Func`1 showModalFunction)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.ShowBuilderDialog(PackageReference packageReference, FormulaPath formulaPath, FormulaPartInfo formulaPartInfo, Query query, Action`2 successCallback, Action failureCallback, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.ResolveQuerySettings(Query query, Action`2 successCallback, Action failureCallback, ResolutionSetting resolutionSetting, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.HandleImportEvaluationException(ExceptionResult exceptionView, Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
   at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass87_1.<OnQuerySettingsResolved>b__0()
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
   at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_1.<Main>b__3()
   at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   at Microsoft.PowerBI.Client.Program.Main(String[] args)


Error Code:
5 (0x5)

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.111.590.0","ModuleName":"Microsoft.Mashup.Client.UI.Extension.dll","Component":"Microsoft.Mashup.Client.UI.Extensions.Windows.SystemBrowserOAuthDialog","Error":"System.Net.HttpListenerException","MethodDef":"Authorize","ErrorOffset":"159"}

Snapshot Trace Logs:
C:\Users\isak.classon\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot204fd1c0-81ce-4b2f-8f49-47bf2f469a49.zip

Model Default Mode:
Import

Model Version:
PowerBI_V3

Performance Trace Logs:
C:\Users\isak.classon\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Enabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_azureMapVisual
PBI_enhancedTooltips
PBI_enableWebView2
PQ_WebView2Connector
PBI_sparklines
PBI_scorecardVisual
PBI_fieldParametersSuperSwitch

Disabled Preview Features:
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_compositeModelsOverAS
PBI_b2bExternalDatasetSharing
PBI_NlToDax
PBI_horizontalFusion
PBI_optimizeTabRibbon
PBI_relationshipEditPane

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

PowerBIUserFeedbackServices_IsReported:
True

 

 

Thank's

Status: Investigating

Hi @IsakCL ,

 

1.Did you get data from Sharepoint online or on-premise SharePoint? If you installed and configured gateway for schedule refresh correctly, please check if it is online statue.

 

2.If your dataset is only from on-premise SharePoint, you need to install and configure gateway following the steps in the link: https://docs.microsoft.com/en-us/power-bi/service-gateway-onprem, then configure the schedule refresh, see: https://docs.microsoft.com/en-us/power-bi/refresh-scheduled-refresh .

 

3.If your dataset is only from Sharepoint online, you needn't to install gateway. While if there are other on premise data sources beside the Sharepoint online (there are on premise data sources and cloud data source mixed in same dataset) , you need to install and configure gateway following the steps in the link above, especially don't forget to configure it to "Allow users 'cloud data sources to refresh through this gateway cluster".

 

vxiaoyanmsft_0-1680067991987.png

 

4.Upgrade the gateway to the latest version, and try it again .

 

For original post, you may refer to Unable to connect to the remote server - Microsoft Power BI Community

 

Best regards.
Community Support Team_ Caitlyn

Comments
v-xiaoyan-msft
Community Support
Status changed to: Investigating

Hi @IsakCL ,

 

1.Did you get data from Sharepoint online or on-premise SharePoint? If you installed and configured gateway for schedule refresh correctly, please check if it is online statue.

 

2.If your dataset is only from on-premise SharePoint, you need to install and configure gateway following the steps in the link: https://docs.microsoft.com/en-us/power-bi/service-gateway-onprem, then configure the schedule refresh, see: https://docs.microsoft.com/en-us/power-bi/refresh-scheduled-refresh .

 

3.If your dataset is only from Sharepoint online, you needn't to install gateway. While if there are other on premise data sources beside the Sharepoint online (there are on premise data sources and cloud data source mixed in same dataset) , you need to install and configure gateway following the steps in the link above, especially don't forget to configure it to "Allow users 'cloud data sources to refresh through this gateway cluster".

 

vxiaoyanmsft_0-1680067991987.png

 

4.Upgrade the gateway to the latest version, and try it again .

 

For original post, you may refer to Unable to connect to the remote server - Microsoft Power BI Community

 

Best regards.
Community Support Team_ Caitlyn