Forum Discussion
luvsql
Feb 01, 2022Iron Contributor
Powershell script for Power Apps not working
I'm trying to run a PS script I found online which is supposed to disable the permission prompts for a specific power app but it's not really working. 1. Install-Module -Name Microsoft.PowerAp...
VasilMichev
Feb 01, 2022MVP
You need to connect first, by running a cmdlet such as Get-AdminPowerAppEnvironment (it should prompt for credentials). You can then use Select-CurrentEnvironment to switch to the correct environment, if you have more than one. And run the Set-AdminPowerAppApisToBypassConsent cmdlet.
- luvsqlFeb 02, 2022Iron Contributor
VasilMichev I was able to get the existing PS to run:
Set-AdminPowerAppApisToBypassConsent -AppName 0<appID>
Once it's run, head into Power Apps and open one of the apps. Copy the Default-and all the letters up until before /apps and paste that as the EnvironmentName. It will then prompt for login and authentication then sets the value