cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Camicamomille
Frequent Visitor

Can't edit report from Report Server because of invalid credentials (Direct Query)

Hi,

I have a problem with a report published in my report server on premises.

When I try to edit it like this:

Camicamomille_0-1594220784390.png

 

I have this error message:

Camicamomille_1-1594220922666.png

And this one:

Camicamomille_2-1594220967262.png

And I am not able to change my credentials in Power BI desktop after this, because it did not open anything:

Camicamomille_3-1594221288393.png

 

Here are the details:

Feedback Type:
Frown (Error)

Error Message:
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:
at Microsoft.PowerBI.Client.Windows.AnalysisServices.DirectQueryConnectionStringBuilder.AddCredential(ResourceCredentialCollection credentialCollection, String globalPipe)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.PersistedModelSanitizer.AddCredentialsToConnectionStringBuilder(CredentialManager credentialManager, DirectQueryConnectionStringBuilder connectionStringBuilder, Boolean isV3Model)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.PersistedModelSanitizer.ApplyCredentialsToDataSource(CredentialManager credentialManager, IDataSource dataSource, ModelChange modelChange, Boolean isV3Model)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.PersistedModelSanitizer.TryRestoreModel(IDataModel dataModel, ModelChange& modelChange)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLocal.BuildActionToRestoreConnectionStringCredentials(Action& restoreCredentialsAction)
at Microsoft.PowerBI.Client.Windows.AnalysisServices.PersistedModelHelpers.PromptAndRestoreCredentials(Report report, IExceptionHandler exceptionHandler, IPowerBIWindowService windowService, IUIHost uiHost, IQueryServices queryServices, IEventAggregationService eventAggregationService)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.OpenFileInternal(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, IQueryServices queryServices, IOpenSaveUI openSaveUI, TelemetryUserActionId entryPoint, IPbixFile pbixFile, Boolean fromRecentFile)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.OpenFileFromSSRSService(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, IQueryServices queryServices, TelemetryUserActionId entryPoint, Uri reportUri, Boolean fromRecentFile)
at Microsoft.PowerBI.Client.Windows.MainWindow.OpenFromSSRSService()
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass2_6.<<Main>b__5>d.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 Microsoft.PowerBI.Client.Windows.MainWindow.<<OnMainWindowInitializationCompleted>b__204_2>d.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 Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()

Stack Trace Message:
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.

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.PowerBI.Client.Windows.Utilities.UIBlockingAwareExceptionHandler.HandleException(Exception e)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.HandleAwaitableAsyncExceptions(IExceptionHandler exceptionHandler, Func`1 asyncFunc)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAsyncExceptions>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.HandleAsyncExceptions(IExceptionHandler exceptionHandler, Func`1 asyncFunc)
at Microsoft.PowerBI.Client.Windows.MainWindow.<OnMainWindowInitializationCompleted>b__204_1()
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.WebDialogs.WebDialog.<>n__0(IWindowHandle owner)
at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass2_0.<Main>b__1()
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)


PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.81.5831.941","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.AnalysisServices.DirectQueryConnectionStringBuilder","Error":"Microsoft.PowerBI.Client.Windows.AnalysisServices.DirectQueryConnectionStringBuilderException","MethodDef":"AddCredential","ErrorOffset":"418"}

Snapshot Trace Logs:
C:\Users\camille_lecerf\AppData\Local\Microsoft\Power BI Desktop SSRS\FrownSnapShot471311072.zip

Model Default Mode:
Empty

Model Version:
PowerBI_V1

Is Report V3 Models Enabled:
False

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

Enabled Preview Features:
PBI_NewWebTableInference
PBI_hierarchicalSlicerCreation

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_inlineExplore
PBI_realTimeRefresh
PBI_showMinervaRibbon
PBI_showMinervaViewNavigator
PBI_v3ModelsPreview
PBI_relativeTimeSlicer
PBI_dataSearchCuration

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

Formulas:


section Section1;

Thank you for your help

 

Best regards,

 

Camille

4 REPLIES 4
saglamtimur
Resolver II
Resolver II

Did you try changing credentials under Manage > Data Sources for the report?

Yes, I changed it. When I test the connection it is ok

You do not have file locally right? If so try to download it and then edit permissions. Here is a short video which I have recorded, about how to do it.

Video Link 




If my post solved your problem, mark my post as a solution to help others to quickly find it and also please give it a 👍

Hi,

 

I looked at the credentials into the Data Source Settings of the broken report I downloaded. I change on the report server the credentials to match with, and my report works again. Yet I am still unable to edit it in Power BI Desktop. Is that a problem of version?

 

 

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.