maikvandergaag / msft-extensions

Repository for extensions mainly used for Azure DevOps Extensions
https://msftplayground.com
MIT License
126 stars 80 forks source link

Power BI Actions: Publish - Upload (pbix) to workspace from a repository #506

Closed KalgalSud closed 8 months ago

KalgalSud commented 9 months ago

Power Bi Action - Publish

I have stored my Pbix file in Azure repository and including it in the pipeline artifact with latest changes version. I am using the pbix file which is not connected to any data source to publish in my workspace. But I am facing an error : (400) bad request.

Error message:

2023-09-21T11:12:54.1072191Z ##[section]Starting: Power BI Action: Publish 2023-09-21T11:12:54.1397688Z ============================================================================== 2023-09-21T11:12:54.1398355Z Task : Power BI Actions 2023-09-21T11:12:54.1398602Z Description : Release Task Power BI Actions 2023-09-21T11:12:54.1398709Z Version : 5.0.0 2023-09-21T11:12:54.1398895Z Author : Maik van der Gaag 2023-09-21T11:12:54.1399179Z Help : 2023-09-21T11:12:54.1399256Z ============================================================================== 2023-09-21T11:13:10.8196965Z ** 2023-09-21T11:13:10.9823410Z Service Connection: 2932e810-0685-4a77-8503-509351b25547 2023-09-21T11:13:10.9824150Z TenantId: 9652d7c2-1ccf-4940-8151-4a92bd474ed0 2023-09-21T11:13:10.9824709Z ** ClientId: * 2023-09-21T11:13:10.9824894Z **** 2023-09-21T11:13:11.4742763Z Logging in with a Service Principal 2023-09-21T11:13:12.3401102Z Publishing PowerBI FIle: D:\a\r1\a_PBIDevOps\Samplepbi.pbix, in workspace: ABC with user: 2023-09-21T11:13:12.3628334Z Getting Power BI Workspace properties; ABC 2023-09-21T11:13:12.8204870Z Trying to publish PowerBI File: D:\a\r1\a_PBIDevOps\Samplepbi.pbix 2023-09-21T11:13:12.8243086Z Checking for existing Reports with the name: Samplepbi 2023-09-21T11:13:12.9607820Z Importing PowerBI File 2023-09-21T11:13:13.8768108Z ##[error]The remote server returned an error: (400) Bad Request. 2023-09-21T11:13:13.9353725Z ##[section]Finishing: Power BI Action: Publish

@maikvandergaag Can you please help me with this? Service proncipal has API permissions and it has access to workspace as well.

Additional Info: I am able to refresh the dataset in the workspace using the same extension

KalgalSud commented 9 months ago

@maikvandergaag can you please help me to resolve this?

maikvandergaag commented 9 months ago

Sorry frontje late response can you run the same pipeline with the variable system.debug added and give it the value true.

Then share the debug log with me?

KalgalSud commented 9 months ago

@maikvandergaag Please find the word documnet attached in this comment for the detailed log

Error Log.docx

maikvandergaag commented 9 months ago

What I can see is that the nameConflict is set to abort this could be causing this error. Is the report already there? Are you using any specific components in the report and are you able to publish manually?

KalgalSud commented 9 months ago

@maikvandergaag The Workspace I am using to publish the report has only one report as of now. There is no name conflicts as such because they are two different files. Report which I am trying to publish does not exist in the workspace. Additionally, I am able to publish the report manually to the workspace. Additional Info: I am able to refresh the dataset in the workspace using the same extension

maikvandergaag commented 9 months ago

@KalgalSud: that sounds great but still there seems to be lacking something that is not correctly configured or just not supported by the way you are connecting to PowerBi.

Are you using service principal authentication, if yes are you using any specific dataconnections?