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.

Reply
ChetanBorkar
Regular Visitor

Error opening PBIX file with online datsource

 

I have a published PBIX Report file which connects via DirectQuery mode to the Azure Server to generate and show the reports.

 

I want to transfer ownership of the PBIX file to my client. When I try to open the PBIX file on the client machine via Desktop Client, it gives me the following error

Alternate credentials for Windows authentication is not supported in DirectQuery mode. Use your current windows credentials, supply a database credential, or switch to import mode.

 

Stack Trace:
Microsoft.PowerBI.Client.Windows.AnalysisServices.DirectQueryConnectionStringBuilderException: Alternate credentials for Windows authentication is not supported in DirectQuery mode. Use your current windows credentials, supply a database credential, or switch to import mode.
at Microsoft.PowerBI.Client.Windows.AnalysisServices.DirectQueryConnectionStringBuilder.AddCredential(ResourceCredentialCollection credentialCollection)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.PersistedModelSanitizer.ApplyCredentialsToDataSource(CredentialManager credentialManager, ITable table, ModelChange modelChange)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.PersistedModelSanitizer.TryRestoreModel(IDataModel dataModel, IEnumerable`1 directQueryQueryNames, ModelChange& modelChange)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLocal.BuildActionToRestoreConnectionStringCredentials(IEnumerable`1 directQueryQueryNames, Action& restoreCredentialsAction)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.RestoreModelConnections(WindowsHost windowsHost, IWin32Window ownerWindow, Report report, IQueryServices queryServices)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.OpenLocalFileInternal(IWin32Window ownerWindow, WindowsHost windowsHost, IWindowService windowService, ExplorationClientHost reportingClientHost, IQueryServices queryServices, TelemetryUserActionId entryPoint, String filePath, Boolean fromRecentFile)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.OpenLocalFile(IWin32Window ownerWindow, WindowsHost windowsHost, IWindowService windowService, ExplorationClientHost reportingClientHost, IQueryServices queryServices, TelemetryUserActionId entryPoint, String filePath, Boolean fromRecentFile)
at Microsoft.PowerBI.Client.Windows.FloatingDialog.StartDialog.UseEntry(FileHistoryEntry entry)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)

Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace)
at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Nullable`1 errorCode, String requestId, Exception exception)
at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
at Microsoft.Mashup.Client.ClientShared.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.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClassb.<Main>b__0()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass7.<HandleExceptionsWithNestedTasks>b__6()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.Main(String[] args)

 

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_EnableReportTheme
PBI_numericSlicerEnabled
PBI_SpanishLinguisticsEnabled
PBI_daxTemplatesEnabled
CustomConnectors

Disabled DirectQuery Options:
PBI_DirectQuery_Unrestricted

 

Please Help.

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@ChetanBorkar

In your scenario, go to File->Options and settings->Data source settings, then edit your data source and specify a valid Windows credential or database credential. After that, click "Refresh" button in the PBIX file.

1.JPG2.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@ChetanBorkar

In your scenario, go to File->Options and settings->Data source settings, then edit your data source and specify a valid Windows credential or database credential. After that, click "Refresh" button in the PBIX file.

1.JPG2.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Many many thanks for that, I know the error was clear, but I did not realize how to overcome it.

Thank you for the solution!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors