Skip to main content

Bypass Consent

Are you and your users inconvenienced by constantly being prompted to allow access to data connections when launching apps? You can prevent these annoying prompts by utilizing PowerShell to bypass consent for your published apps, and with recently added functionality, the process has been made much easier.

Here is a condensed list of steps on how to bypass consent:

[divider line_type=”No Line” custom_height=”20″]
  1. Download the latest “Cmdlets” files below and unzip the files in to your C:\Windows\System32 folder using this link:
  2. Run PowerShell as an admin by right clicking on the icon and selecting “Run as Administrator”
  3. Type the following commands and hit enter after each command line
    • Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
    • dir . | Unblock-File
    • Import-Module .\Microsoft.PowerApps.Administration.PowerShell.psm1 -Force
    • Import-Module .\Microsoft.PowerApps.PowerShell.psm1 -Force
    • Add-PowerAppsAccount
      • After this command, you will be prompted to log in.
      • Use the username and password for the account that has admin rights to the app(s) you want to bypass consent prompts.
  4. Enter the Bypass Consent Syntax
    • Set-AdminAppApisToBypassConsent -AppName aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa -ApiVersion 2017-05-01
      • Replace the “aaa” GUID portion above with the app ID
    • You can enter apps one at a time or paste all your apps at once, and PowerShell will loop through each one utilizing the sign-in credentials that you entered in the previous step.
  • Set-AdminAppApisToBypassConsent -AppName aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa -ApiVersion 2017-05-01
  • Set-AdminAppApisToBypassConsent -AppName bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb -ApiVersion 2017-05-01
  • Set-AdminAppApisToBypassConsent -AppName cccccccc-cccc-cccc-cccc-cccccccccccc -ApiVersion 2017-05-01
  • Set-AdminAppApisToBypassConsent -AppName dddddddd-dddd-dddd-dddd-dddddddddddd -ApiVersion 2017-05-01
[divider line_type=”No Line” custom_height=”20″][image_with_animation image_url=”385″ alignment=”center” animation=”Fade In” border_radius=”none” box_shadow=”none” max_width=”100%”][divider line_type=”No Line” custom_height=”20″][image_with_animation image_url=”386″ alignment=”center” animation=”Fade In” border_radius=”none” box_shadow=”none” max_width=”100%”][divider line_type=”No Line” custom_height=”20″]

Once the commands are finished running, you can exit out of PowerShell.

Keep in mind that you must perform this process every time you publish your app(s) after an update.

For more information such as tips or a list of Cmdlet commands, refer to Microsoft’s post at: