cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jake_Li
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

Hi Neville,

 

You made my day!

 

The maggic happens right after we provided the app publisher with "Global Administrator" rights. Next, I will try to verify if this is a one-time effort for a specific app created by PowerApps or an exercise that needs to be done every time the app is published. I really hope it's the former.

 

Really appreciate your help!

 

Jake

Neville
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

So glad you had success. I can confirm the command only needs to be run once. I've republished the same PowerApp multiple times and consent dialog has not re-appeared.

Jake_Li
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

Hi Neville,

 

Were you using the account with "Global Admin" rights to publish the app?

 

In my case, I wanted to revoke the Global Admin rights for the account and then use it to publish the app.

 

Regards, Jake

Jake_Li
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

It seems quite wonky that the user consent reappears now!

 

It had been working well (without user consent) here for about 10 hours since we temporarily granted the app-publish account with "Global Admin" rights and called the cmdlets again yesterday. Now, it reappears!

 

Our tenant is Multi-Factor Authentication (MFA) enabled. Wondering if MFA is the culprit.

 

Any clues?

 

Jake

Highlighted
Neville
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

Hi Jake.  Our Tenant is MFA too, so that's not the issue.  To confirm: I temporarily assigned "Global Admin" role to the PowerApp-publisher-account and I ran the Set-AdminPowerAppApisToBypassConsent PowerShell command one time.  Then removed the "Global Admin" role and have re-published the PowerApp several times since, in-fact I just republished and then accessed the PowerApp using a general domain account and consent-dialog does NOT appear.  The only PowerApp-connector I'm using is SharePoint.  Perhaps you are using other connectors? Or when removing or reconfiguring the SharePoint connector may cause the consent-dialog to toggle back on? (I've not tested those scenarios so don't know) Did you perhaps make any changes to the SharePoint connector then republish?

Jake_Li
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

Hi Neville,

 

Glad to know that MFA is not a problem there. Like you, the only PowerApp-connector I'm using is SharePoint, and I haven't changed the connector for at least 2 weeks.

 

The interesting finding here is that the consent diaglog won't show up for new users - people whose accounts have been created after the Set cmdlets are called per your suggestion - once they have their MFA configured.

 

Yet, the consent diaglog does appear in the following scenarios

1. The app is accessed by existing users - people whose accounts have been created before the Set cmdlets are called per your suggestion.

2. The app is accessed by new users without MFA configured.

 

Jake

Re: End Users receive pop-up asking for permission when launching Power Apps

@Jake_Li I had similar case as you - run the bypassing powershell command but my users were still prompted. I Clear bypass and re-bypass app. Wait 5 minutes and check - IT WORKS! Maybe that will work for you as well.

Btw - I've just confirmed that bypassing is needed just once (as long as your GUID did not change). 

bangorkeith
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

Has there been any more news on this?  I'm not able to use powershell, nor do I have the access rights needed.

 

I just have a really simple app that I can place on our company's sharepoint home page, but I can't have it on there if it's going to ask people for permissions.  Such a pain!

VisibleFilm
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

Hi guys - I've been able to use Neville's solution, installed the cmdlets, then when i try to execute the cmdlet I get the error below - I am the owner of the app, what elevated permissions do I need to actually execute this properly?(Obviously there are real #'s where the "xxxxxxx"'s are below.  I'm getting the AppID by right clicking on the PowerApp and clicking "Details", is this the right way to obtain it?)

 

Here is how I execute it in Powershell:

Set-AdminPowerAppApisToBypassConsent -AppName b043673f-b78f-4b1f-aded-xxxxxxxxxxx -ApiVersion 2017-05-01

 

The error message I receive is below.  Thanks! 

 

Invoke-WebRequest : {"error":{"code":"EnvironmentAccess","message":"The user with object id '7969780f-439a-41b0-ad1d-xxxxxxx' in tenant
'46c5178e-a0f4-4f4d-xxxxxxxxxxxxx' does not have access to permission 'Set PowerApps Connection Direct Consent Bypass' in environment
'Default-46c5178e-a0f4-4f4d-xxxxxxxxxxxxxxxxx. Error Code: 'UserMissingRequiredPermission'"}}
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerApps.Administration.PowerShell\2.0.1\Microsoft.PowerApps.RestClientModule.psm1:71 char:25
+ ... $response = Invoke-WebRequest -Uri $Uri -Headers $Headers -Method $Me ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

VisibleFilm
Level: Powered On

Re: End Users receive pop-up asking for permission when launching Power Apps

Hi all - trying Neville's solution - when I try to run, I get the error below...I'm the app owner, do I need to be a PowerApps admin as well?

 

Set-AdminPowerAppApisToBypassConsent -AppName 3481ccc1-d07d-4763-xxxxx-ApiVersion 2
017-05-01

 


Invoke-WebRequest : {"error":{"code":"EnvironmentAccess","message":"The user with object id
'7969780f-439a-41b0-xxxxx' in tenant '46c5178e-a0f4-4f4d-8c40-xxxxx' does not have access to
permission 'Set PowerApps Connection Direct Consent Bypass' in environment
'Default-46c5178e-a0f4-4f4d-8c40-xxxxx'. Error Code: 'UserMissingRequiredPermission'"}}
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerApps.Administration.PowerShell\2.0.1\Microsoft.PowerApps.R
estClientModule.psm1:71 char:25
+ ... $response = Invoke-WebRequest -Uri $Uri -Headers $Headers -Method $Me ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,030)