"The remote server returned an error: (401) Unauthorized." error occured during execution of 'Power BI Action - Publish' task in Azure Build Pipeline

Vivek Gupta 126 Reputation points
2020-07-28T10:44:56.043+00:00

Hi,

I want to copy a Power BI Report (PBIX file) from one tenant to another tenant using Azure Build Pipeline for which I have used Power BI Action - Publish task (https://marketplace.visualstudio.com/items?itemName=maikvandergaag.maikvandergaag-power-bi-actions)

I have given all the API permissions for Power BI for the App Registered in Azure AD. I have also given permission in the Tenant settings in PowerBI admin center.

I am using Service Connection in Power BI Action - Publish task in Azure Build Pipeline

However, when I execute the Azure Build Pipeline, I get "The remote server returned an error: (401) Unauthorized." error

I have followed the steps mentioned in https://stackoverflow.com/questions/60713573/getting-the-remote-server-returned-an-error-401-unauthorized-when-creating , but still I get the same error.

Please provide solution to this issue ASAP.

Thanks in advance.

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
208 questions
{count} votes

1 answer

Sort by: Most helpful
  1. singhh-msft 2,431 Reputation points
    2020-07-30T08:49:06.103+00:00

    Hello **@Jack-9275 **, thanks for reach out to us! From the steps that you have mentioned, I suspect that you have not Added the service principal to your workspace.

    **Also, note the Considerations and Limitations of Embedding Service Principle to PowerBI: **

    • Service principal only works with new workspaces.
    • My Workspace isn't supported when using service principal.
    • Dedicated capacity is required when moving to production.
    • You can't sign into the Power BI portal using service principal.
    • Power BI admin rights are required to enable service principal in developer settings within the Power BI admin portal.
    • Embed for your organization applications can't use service principal.
    • Dataflows management is not supported.
    • Service principal currently does not support any admin APIs.
    • When using service principal with an Azure Analysis Services data source, the service principal itself must have an Azure Analysis Services instance permissions. Using a security group that contains the service principal for this purpose, doesn't work.

    Are the above points taken care of/taken into consideration?

    I would suggest you to go through this PowerBI Lab - CICD using Azure DevOps and verify and let us know if all the steps are taken care of.

    ----------

    Please do let us know if this helps or not, so that we can help you further. Also, please do not forget to accept the response as Accepted Answer; if the above response helped in answering your query.

    0 comments No comments