apis and embedding
236 TopicsConverting Binary to hex value or numeric value
Hi, I have Hex Value showing up as a Binary content in PBI desktop (ConversationIndex in MSExchange Attribute object) On expanding this Binary column, I get to see some Unicode characters and not exactly numeric/ hexadecimal values. Is there a way I can convert the Binary content to Hex or interger/ numeric value? Thanks, MannuSolved14KViews0likes7CommentsREST API for subscriptions V2
Hi all, I came across some Power BI REST APIs related to subscriptions, but they seem incomplete and are not working as expected. Has anyone else encountered this issue? Are these APIs officially supported or still in development? Any insights would be helpful. Subscriptions - REST API (Power bi report) | Microsoft Learn Thanks!Solved2KViews0likes6CommentsUnable to embed base 64 images
When attempting to add more than 7 new card visuals with a base64 image. We get the following error message Feedback Type: Frown (Error) Timestamp: 2025-03-17T09:04:37.2970015Z Local Time: 2025-03-17T09:04:37.2970015+00:00 Session ID: d51bd590-95a6-4efc-a3c1-0d07106fd003 Release: February 2025 Product Version: 2.140.1476.0 (25.02)+e8c6a85d1d09735c5c055c3244a60ff4076cd2cf (x64) Error Message: UserErrorDetails doesn't make sense if the error is not caused by the user Stack Trace: System.InvalidOperationException at Microsoft.PowerBI.Modeling.Common.Contract.FailCore(String msg) at Microsoft.PowerBI.Client.Windows.ExceptionHandling.PowerBIException..ctor(String message, ErrorSource errorSource, UserErrorDetails userErrorDetails, Exception innerException, String errorCode, Dictionary`2 telemetryValues) at Microsoft.PowerBI.Client.Windows.Services.BiProjectOperationHandler.<SaveReportIntoProjectRelatedFile>d__39.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.Services.BiProjectOperationHandler.<TrySaveArtifact>d__30.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.Services.CurrentArtifactManager.<TrySaveFileAndSetAsCurrent>d__46.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.Services.UIBlockingService.<>c__DisplayClass17_0`1.<<BlockUIAndRun>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.WaitOnUIThreadForTaskCompletion[T](Task`1 task) at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.BlockUIAndRun[T](Func`1 asyncMethod, PowerBIProgress progress) at Microsoft.PowerBI.Client.Windows.LocalFileOpenSaveUI.ShowSaveUIAndWait(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, IPowerBIArtifactInfo artifactInfo, Func`2 performSaveMethod) at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.<TrySaveFile>d__51.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: UserErrorDetails doesn't make sense if the error is not caused by the user 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.PowerBIUnexpectedExceptionHandler.HandleException(Exception e) at Microsoft.PowerBI.Client.Windows.Utilities.PowerBIFormUnexpectedExceptionHandler.HandleException(Exception e) at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext() 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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted) at System.Threading.Tasks.Task`1.TrySetException(Object exceptionObject) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception) at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.<TrySaveFile>d__51.MoveNext() 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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task`1.TrySetResult(TResult result) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result) at Microsoft.PowerBI.Client.Windows.Report.<CommitUIState>d__88.MoveNext() 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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task`1.TrySetResult(TResult result) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result) at Microsoft.PowerBI.Client.Windows.Views.MinervaInterop.DaxQueryViewClientHost.<GetDocumentContent>d__11.MoveNext() 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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task`1.TrySetResult(TResult result) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result) at Microsoft.PowerBI.Client.Windows.WebView2.WebView2Interop.<Microsoft-PowerBI-Client-Windows-IHostedScriptAsync-TryInvokeAsync>d__33`1.MoveNext() 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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task`1.TrySetResult(TResult result) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result) at Microsoft.PowerBI.Client.Windows.WebView2.WebView2Interop.<InvokeJs>d__27`1.MoveNext() 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.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() 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__DisplayClass7_0.<RunApplicationLegacy>b__0() 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.RunApplicationLegacy(String[] args, IPowerBIRootTrace trace) at Microsoft.PowerBI.Client.Program.Main(String[] args) PowerBINonFatalError: {"AppName":"PBIDesktop","AppVersion":"2.140.1476.0","ModuleName":"Microsoft.PowerBI.Modeling.Common.dll","Component":"Microsoft.PowerBI.Modeling.Common.Contract","Error":"System.InvalidOperationException","MethodDef":"FailCore","ErrorOffset":"28","ErrorCode":""} OS Version: Microsoft Windows NT 10.0.26100.0 (x64 en-GB) CLR Version: 4.8 or later [Release Number = 533320] Peak Virtual Memory: 71.2 GB Private Memory: 794 MB Peak Working Set: 1.17 GB IE Version: 11.1882.26100.0 User ID: a2302be8-4520-4366-8bed-b7520191b72a Workbook Package Info: 1* - en-GB, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True. Telemetry Enabled: False AS Live Connection: True Performance Trace Logs: C:\Users\Robert.French\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip Enabled Preview Features: PBI_shapeMapVisualEnabled PBI_qnaLiveConnect PBI_metricsArtifactsOnDesktop PBI_b2bExternalDatasetSharing PBI_enhancedTooltips PBI_sparklines PBI_scorecardVisual PBI_fieldParametersSuperSwitch PBI_onObject PBI_setLabelOnExportPdf PBI_oneDriveSave PBI_oneDriveShare PBI_odspSaveBackgroundUpload PBI_modernOfficeFilePicker PBI_useModernPublishDialogs PBI_publishDialogsSupportSubfolders PBI_gitIntegration PBI_tmdlInDataset PBI_directLakeRemoteModeling PBI_newCard PBI_buttonSlicerAuthoring PBI_advancedSlicerTypeList PBI_textSlicer PBI_EimLessElevatedUser PBI_mobileAutoReportLayout PBI_daxInlineCopilot PBI_aiNarrativesVisual PBI_generateMeasureDescriptionsButton PBI_visualCalculationsAuthoring PBI_desktopReportAuthoringCopilot Disabled Preview Features: PBI_snowflakeAdbcVersionEnabled PBI_SpanishLinguisticsEnabled PBI_enhancedReportFormat PBI_qnaImproveLsdlCopilot PBI_tmdlViewToggle PBI_UserInstalledVerticaODBCDriver Disabled DirectQuery Options: TreatHanaAsRelationalSource Cloud: GlobalCloud PowerBIUserFeedbackServices_IsReported: True DPI Scale: 100% Supported Services: Power BI Formulas: section Section1; The same solution is used for at least two other project files and works as expected only one project file returns this error message.Solved1.7KViews0likes7CommentsPower BI REST API ExportTo MHTML leads to a base64 encoded file
I am using a Python Notebook to export Paginated Reports to an HTML file. Now it works fine for CSV files, I get clear and readable CSV back, the same goes for IMAGE with the format set to PNG. But when I set the format to MHTML as per the documentation I am getting a long error response about my headers, followed by a succesfull download of a file with .html extension. If I open it however it doesn't look like HTML: MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_01C35DB7.4B204430" X-MSSQLRS-ProducerVersion: V This is a multi-part message in MIME format. ------=_NextPart_01C35DB7.4B204430 Content-ID: <filename> Content-Disposition: inline; filename="filename" Content-Type: text/html; name="filename"; charset="utf-8" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs aXB0LVR5cGUiIGNvbnRlbnQ9InRleHQvamF2YXNjcmlwdCIvPjxNRVRBIEhUVFAtRVFVSVY9Ikxv....[this goes on for a long time] VEg9IjAiIEhFSUdIVD0iMTAwJSI+PC9URD48L1RSPjwvVEFCTEU+PC9ESVY+PC9ESVY+PC9ib2R5 PjwvaHRtbD4= ------=_NextPart_01C35DB7.4B204430-- I have tried several bodies, but the documentation is lacking for the formatSettings for Paginated Reports: And with empty formatSettings and I also left the formatSettings completely out, but there is no difference. The response from the download action for this html file is as follows: Failed to parse headers (url=https://api.powerbi.com:443/v1.0/myorg/groups/[REDACTED]/reports/[REDACTED]/exports/Mi9CbG9iSWRWMi1mYTJjOTY5Yy00NmZlLTRiYzktYjNkZS00NjFmZTE1YmExMTN3UHY3ZGxOLXlXVXpxU3N2THlGWk5YMlN2Yzl4MnRQeUJaWk4tQ2x0Lg==/file😞 [NoBoundaryInMultipartDefect()], unparsed data: '' Traceback (most recent call last): File "/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/urllib3/connection.py", line 464, in getresponse assert_header_parsing(httplib_response.msg) File "/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/urllib3/util/response.py", line 88, in assert_header_parsing raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) urllib3.exceptions.HeaderParsingError: [NoBoundaryInMultipartDefect()], unparsed data: '' And the file itself remains unreadable base64 encoded and it seems to be partial. Now I have a hunch that there maybe is a formatSetting to get a UTF-8 / UTF-16 HTML file, but it also seems odd that that would have to be specified. How can I find out why my HTML file is not properly formatted as readable (and usable) HTML? Adding just ?rdl:format=MHTML to a URL of a Paginated Report returns a readable HTML file. But when using the REST API, I cannot find why it keeps sending me base64 encoded partial files. Thanks for helping me out Martijn KuiperSolved1.4KViews0likes5CommentsWeb.Contents with the Content option is only supported when connecting anonymously.
Hello All, I am connecting to api using basic token. but I am getting the authentication issue which is "Web.Contents with the Content option is only supported when connecting anonymously." i Knew it is very common error and gone thorugh all the below links https://community.powerbi.com/t5/Service/Anonymous-access/m-p/21014#M5916 http://community.powerbi.com/t5/Developer/Using-a-REST-API-as-a-data-source-Web-Contents-Content-option/m-p/115650#M4042 http://community.powerbi.com/t5/Service/Cannot-sign-in-with-Anonymous-Authentication-for-a-Web-API/td-p/168154?lightbox-message-images-168154=39597iD83266D92D25D020 the power Query is let AuthKey = "Basic mytoken", url="https://tfs.mnsu.edu/tfs/ITS%20AppDev/Test%20Agile%20Project/_apis/wit/wiql?api-version=1.0", body="{ ""query"": ""Select [System.Id], [System.Title], [System.State] From WorkItems Where [System.WorkItemType] = 'Task' and [System.AreaPath]='Test Agile Project'"" }", Source = Json.Document(Web.Contents(url,[ Headers = [#"Authorization"=AuthKey , #"Content-Type"="application/json"], Content = Text.ToBinary(body) ] )) in Source and error i am getting is can anyone please hempSolved75KViews1like9Comments[API rest on premise] power BI report pbix data model
hi, I am developing a data governance software, I don't have the problem with Power BI cloud but my problem below is with Power BI on premise I would like to retrieve the data model of the powerBI report (the pbix report). I tried "GET /PowerBIReports({Id})/DataModelParameters" but the reponse is empty. I downloaded the pbix file with REST API but I did not find the REST API to have the data model linked to the report. I tried to uncompress the dataModel included in the pbix file but I did not find the right compression algorithm. My temporary solution is : Open the report with desktop application and export the model/template (pbit file), with this file I access to uncompressed data model. But I can automatise this solution. Do you have a better solution to have the data model of the power BI report with API REST ? Thank GwendolineSolved2.4KViews0likes5CommentsHow to increase number of columns imported from Salesforce object or select the columns to load
I had a problem loading SF object cases because it has over 660 columns and got the error msg "414): Request-URI Too Long" I need to either increase the number of columns i am allowed to improt or pre-select the columns i need to load prior loading please helpSolved4.7KViews1like5CommentsMultiple Embedded Dashboards with Login Via Website
Hey All I was wondering if there was anyone who had insights into embedding Power BI dashboards but the access to them would be done from them going through a Login Page on our website the then take them to a landing page with all the dashboards we have developed for them. I am looking at different platforms to use as I have spent much of my time with both Power BI and Tableau but also checking others out like Metabase etc. We are developing linkages to our clients data and creating the datamodel etc that backs up their dashboards but i want a seamless experience for them in relation to the dashboards so that its just 1 login via our website to then have the single sign on end up on a landing page with the dashboards we have created for them. Plus have it stylsed in our brand for the landing page etc Ive seen quite a bit about embedding individual dashboards but cant find much or clear guidance on what I am looking to achieve CheersPowerBI Report integration - Dataset ID missing for Paginated Report
Hi Everyone, We have successfully integrated PowerBI reports into our Java Web Application, and the reports are rendered on the webpage without issues. However, for reports of type "PaginatedReport," we encounter a problem. The DatasetID is missing in the Get Report Endpoint (https://api.powerbi.com/v1.0/myorg/groups/<Sample-ID>/reports/<Report-ID>), which prevents us from obtaining the EmbedToken and causes the entire report rendering process to fail. Is there a way to generate an EmbedToken without the DatasetID? Please advise.978Views0likes3CommentsAccess PowerBI Report - when users having multiple Microsoft account from different Org
Hi Team, We have published several PowerBI reports accessible to all authenticated users within our web application via an iframe, with a total user base of over 60,000. Everything works well because we have SSO configured with the same Identity Provider (IDP). However, we encounter issues when users are already logged in with a different Microsoft account, leading to an error message stating "report not found." While this is technically expected, it is not ideal from a user perspective. We want to understand if we can embed the client or tenant ID in the report URL to ensure it always checks for the session of a specific tenant or Microsoft account, avoiding these issues for users. We have a couple of options but bot feasible at this point of time for us so looking for alternatives. 1. Training the user base, which is challenging given the current circumstances. 2. Embedding the report using Javascript 2.1 Register the application in Azure AD. 2.2 Configure API permissions. 2.3 Create a client secret. 2.4 Implement server-side authentication and token generation. 2.5 Embed the report client-side. The problem with this approach is that the access token would be accessible at the UI layer,which we are not comfortable sharing. Please suggest if there is a way to enforce the PowerBI report URL to use a specific tenant or account.Solved1.1KViews0likes4Comments