Have you created a PowerApp which accesses a resource like an Office 365 Users Profile connection using a system account only to find the user is presented with a screen asking them to grant access to the connection?
Not great when it comes to wanting a seamless experience, so how can we fix this?
Simple! We need to setup permissions to allow the app to bypass any permissions request for the user and just start using the credentials stored in the connector.
You will need to use PowerShell to complete the actions listed below.
If you don’t already have PowerApps powershell module installed then run the following:
1) Enable Set-ExecutionPolicy to run non-trusted scripts
2) Install the modules by running:
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
3) Run the following command and login with an account that has access to the PowerApp application being added and has global admin permissions:
Add-PowerAppsAccount
3) Grant bypass permisisons to the PowerApp:Set-AdminPowerAppApisToBypassConsent -AppName id-of-the-app
Replace the text id-of-the-app
with the application ID available from within the PowerApps detail screen
Hi,
Nice post. Would you know how to re-prompt the user to allow permissions if they clicked Don’t Allow on 1st use?
Thanks,
Jacques
Hi, I am not sure to be honest as I haven’t tried – I would have thought this would over-ride their original choice but if not you can manually delete the connector permissions from within their PowerAutomate profile – see the link below for details:
https://powerusers.microsoft.com/t5/Using-Flows/Flow-connection-consent-reset-in-SharePoint/td-p/263407