How to Add/change Deployment Pipeline’s Admin in P…


#Deployment Pipeline #PowerBI #restAPI #Adminupdate 

Hi All,

We had a challenge in our project and surely you might get into the same situation so below are my findings and resolution which will be helpful.

 

Quick Info :

  • We have “Deployment Pipelines” in PowerBI which is the best way to use Workspace and content of power bi as Test Dev and PROD. More Info : https://docs.microsoft.com/en-us/power-bi/create-reports/deployment-pipelines-overview
  • mahakrathore_0-1654265617221.jpeg

     

  • Currently, Deployment Pipeline has a Limitation where you cannot add/change the Pipeline assigned to the workspace if the user has not been given the rights on the pipeline.
  • You should have Administrator Rights to run the Rest API for that workspace and azure directory ( Basically a Power BI Admin)

Problem :

  • Someone assigned the Workspace to his/her pipeline and left the organization.
  • Did not add any other user/group to access the pipeline as per the recommendations.
  • There is no way you can Assign yourself or your group to Pipeline and fix it.

Resolution :

  • Making changes in GUI is in the idea portal so need to wait for it.
  • You can use RestAPI to fix the issue and add the user to the Admin of the Pipeline which should be there. Below is the process for the same.
    • I am using Powershell + PowerBI RestAPI for achieving the same.
    • Open Powershell and Connect Power BI
      • Connect-PowerBIServiceAccount
      • mahakrathore_1-1654265617223.jpeg

         

      • Get-PowerBIWorkspace -All
    • Run the command below to get all the Pipelines created in the Organization
    • #WithStages (Optional)
    • #WithUSers (Optional)
    • Note : Note the ID of the Pipeline you wanted to make changes

 

    • #GetUserID and Body ( Add the user ID to be added to the Pipeline)

“identifier”: “user-Mahak@company.onmicrosoft.com”,

“accessRight”: “Admin”,

“principalType”: “User”

}’

$content=”application/json”

    • #Update Pipeline with Admin User.

 

 

The Pipeline will be updated and you can now go to PowerBI > Deployment Pipeline > You will see the Pipeline where you made the changes.

mahakrathore_4-1654265617226.jpeg

 

Cheers,

M

signatureForum.jpg



Source link

Be the first to comment

Leave a Reply

Your email address will not be published.


*