I am deploying powerapps using azure devops pipeline. At the end I have added a powershell task and added the code
Set-AdminPowerAppApisToBypassConsent -EnvironmentName 00aa00aa-bb11-cc22-dd33-44ee44ee44ee -AppName 00001111-aaaa-2222-bbbb-3333cccc4444
When I run the pipeline the powershell task keeps on running for too long without any output. When I run the same code in my windows powershell, it opens a popup to authenticate.
How can we achieve the same in pipeline?
I am deploying powerapps using azure devops pipeline. At the end I have added a powershell task and added the code
Set-AdminPowerAppApisToBypassConsent -EnvironmentName 00aa00aa-bb11-cc22-dd33-44ee44ee44ee -AppName 00001111-aaaa-2222-bbbb-3333cccc4444
When I run the pipeline the powershell task keeps on running for too long without any output. When I run the same code in my windows powershell, it opens a popup to authenticate.
How can we achieve the same in pipeline?
Since this PowerShell cmdlet needs you manually enter the authenticate information on a popup, you need to configure a self-hosted agent to run interactively on your Windows machine.
Download the latest installation package of the Windows agent. It will download a ZIP file.
Unzip the ZIP file to the installation directory of the agent where you want.
Open PowerShell as Administrator in the installation directory of the agent and run .\config.cmd
to start configure the agent steps by step following the series of questions:
https://dev.azure/{anization-name}
), or Azure DevOps Server collection (https://{server-instance}/{collection0name}
).Agent Pools (Read & manage)
" scope at least.
After completing the configuration of the agent, and Restart the Windows machine, you can a command prompt is automatically opened and listening if there is any jobs in queue are waiting to use this agent. It is running the self-hosted agent by auto-logon.
Keep the command prompt open, go to Azure DevOps and set your pipeline to run this self-hosted agent, and then run the pipeline. When the PowerShell task is running, you also can see a popup is opened on the self-hosted Windows agent machine to ask you to manually provide the authenticate information.