Forum Discussion
Connect to PowerBi with using Service Connections from ADO
Hi All,
Could you please clarify how can I use ADO service connections in scope of powershell scrtip (function) for connectiong to Power BI,
Previously I use Connect-PowerBIServiceAccount with Credential in scope of function in powershell script. Now I need to connect to power bi using ADO service connection.
I have pipline wich get service connection like a variable.
Thanks
3 Replies
- v-luwang-msft
Community Support
Hi Anonymous ,
The following article describes how to create a Power BI workspace in an Azure DevOps Pipeline using Powershell,and it also includes how to connect to the Power BI service.
$DeploymentPrincipalAppId = "Application ID of deployment principal" $DeploymentPrincipalAppSecret = "Authentication key for the deployment principal" $TenantId = "Azure Active Directory tenant ID" $credentials = New-Object System.Management.Automation.PSCredential ($DeploymentPrincipalAppId, (convertto-securestring $DeploymentPrincipalAppSecret -asplaintext -force)) Connect-PowerBIServiceAccount -ServicePrincipal -Credential $credentials -Tenant $TenantIdTo learn more details ,refer:
https://4bes.nl/2020/12/20/create-an-azure-devops-service-connection-to-azure-with-powershell/
Did I answer your question? Mark my post as a solution!
Best RegardsLucien
- AnonymousNot applicable
Issue has been solved.
- v-luwang-msft
Community Support
Hi Anonymous ,
This is good news!
And could you pls accept a helpful reply as the solution or share your own solution to help others find it.
Best Regards
Lucien