最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - How to Automate Git Changes in PowerBI Workspace in DevOps CICD Pipeline - Stack Overflow

programmeradmin0浏览0评论

I am currently having issues finishing the release pipeline part of an automated process wherein new git changes to PowerBI workspaces are updated automatically as part of CICD.

Screenshot of PowerBI Git Changes

Currently, we have set up the CI part of the pipelines so that new git changes are pulled into the workspace, but we need to manually update the changes.

I have attempted to use the Fabric API to update the git changes, but this is only supported for user authentication, not service principals. This is a problem as we are implementing the solution via a PowerShell script in an Azure release pipeline.

I have seen elsewhere that there might be a way to use Microsoft Entra tokens to authenticate requests but I am not too sure.

Any help would be appreciated.

I am currently having issues finishing the release pipeline part of an automated process wherein new git changes to PowerBI workspaces are updated automatically as part of CICD.

Screenshot of PowerBI Git Changes

Currently, we have set up the CI part of the pipelines so that new git changes are pulled into the workspace, but we need to manually update the changes.

I have attempted to use the Fabric API to update the git changes, but this is only supported for user authentication, not service principals. This is a problem as we are implementing the solution via a PowerShell script in an Azure release pipeline.

I have seen elsewhere that there might be a way to use Microsoft Entra tokens to authenticate requests but I am not too sure.

Any help would be appreciated.

Share Improve this question edited Feb 6 at 12:22 SusCoder asked Feb 6 at 12:21 SusCoderSusCoder 11 bronze badge New contributor SusCoder is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 6
  • According to your description, you want to automate the Update Workspace from Git process in the pipeline instead of manually selecting the "Update All" button in the workspace, right? Are you using this API Git - Update From Git to update the git changes? – Miao Tian-MSFT Commented Feb 7 at 7:15
  • You can refer this Quickstart to get the Microsoft Entra token. It contains a sample Python project in the Step2 for your reference. – Miao Tian-MSFT Commented Feb 7 at 7:15
  • @MiaoTian-MSFT In reference to your first comment, yes I am trying to update the workspace from Git using those APIs you have referenced, but as you can see it does not support service principals. This is an issue as I need to process this through the Azure CICD pipelines, where I have a PowerShell script which connects to the Azure account using Connect-AzAccount, and sends requests to the APIs mentioned before. – SusCoder Commented Feb 7 at 9:32
  • Hi SusCoder, thanks for your response. Have you tried to get the get the Microsoft Entra token? Are you wondering how to get the Microsoft Entra token or are you unsure whether you can use Microsoft Entra tokens to authenticate requests? If it is the former, please refer to the sample I shared. – Miao Tian-MSFT Commented 2 days ago
  • @MiaoTian-MSFT Hey, so I have not tried using an Entra token yet as I will need a separate team in my company to generate one. Would you happen to know if it would allow me to connect to the Azure account via the PowerShell without an interactive prompt? That is my issue currently. – SusCoder Commented 2 days ago
 |  Show 1 more comment

1 Answer 1

Reset to default 0

You could login with the user account by credential without an interactive prompt. Please make sure your account doesn't enable the MFA (Multi-Factor Authentication).

$User = "[email protected]"
$PassWord = ConvertTo-SecureString -String "<Password>" -AsPlainText -Force
$tenant = "<tenant id>"
$subscription = "<subscription id>"
$Credential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User,$PassWord
Connect-AzAccount -Credential $Credential -Tenant $tenant -Subscription $subscription

For more details, you could refer to this SO thread.

发布评论

评论列表(0)

  1. 暂无评论