When a user connects to PowerApps, a window is displayed authorising rights to the connectors used in the application. For example, if you use SharePoint lists, send an e-mail or check a user’s membership of a security group, PowerApps will request rights to these 3 connectors when the user first logs on or after each new publication of the application.

1. Prerequisites
We need 2 prerequisites:
A. Obtain the application ID
B. Obtain the ID of your environment
A. Get ID application
In PowerStudio, click Detail > Details.

The application ID is shown below:

B. Get ID environment
To obtain the ID of the application environment :
Click on the cogwheel in the top right-hand corner
Click on Session Details
The ID of your environment is the value of the Tenant ID attribute

1. In PowerShell
To do this, we need to use PowerShell 7 in Console mode and not via VSCode.
1. Download and install the Powerapps administration libraries in PowerShell
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Scope CurrentUser -AllowClobber
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
2. Log in as admin (environment creator)
Add-PowerAppsAccount
3. Pre-emptively clean application settings by adding your application ID
Clear-AdminPowerAppApisToBypassConsent -AppName ec1e31ad-f999-40f6-9d6c-f8031slt7383
4. Disable the permission request window by adding the environment ID and the application ID
Set-AdminPowerAppApisToBypassConsent -EnvironmentName 0bb84456-j89s-edc5-9f43-8y78208549f8 -AppName ec1e31ad-f999-40f6-9d6c-f8031slt7383
5. Check that Bypass is activated
Get-AdminPowerApp -EnvironmentName 0bb84456-j89s-edc5-9f43-8y78208549f8
