When developing a PowerApp that requires connections to external services like SharePoint, users are often prompted to allow these connections, even when they have no alternative. This can complicate matters as users may not fully understand or be able to define what they are allowing.
But there is a solution for that. We can disable that Pop-Up Menu. To achieve that, we have to utilize PowerShell.
Requirements
To do so, we need the following things
- PowerApps Administrative PowerShell Module
- EnviromentID
- AppID
Obtaining
EviromentID: In the PowerApps Overview Click on the Gear Icon in the Upper Right Corner. Then Select Developer Resources and Copy the EnviromentalID
AppID: In the PowerApps App Overview Click the Three Dots next to the App and select Details. Scoll down until AppID and retrieve the ID
If you never worked with the PowerApps Adminsitrative PowerShell Module you need to install it first.
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Scope CurrentUser
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber -Scope CurrentUser
The -Scope CurrentUser Option isn’t necessary if it is your own PC. If you work with a Enterprise Laptop or PC you oft haven’t the necessary rights to install it systemwide. So it is only installed for your user.
The next thing is to orientate on the following Command:
Set-AdminPowerAppApisToBypassConsent -EnvironmentName %ENVRIOMENTID% -AppName %APPID%
For your UseCase just replace the %% Variables with the Values you got before.