cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

PowerShell cmdlet Question

Hello, 

 

Looking through the PowerApp PowerShell cmdlet list here...

 

Specifically the cmdlet

Set-AdminApisToBypassConsent
Clear-AdminApisToBypassConsent

...which is described as: Set canvas app to bypass api consent. 

 

Question: 

  • Does setting this remove the consent popups such as "Allow PowerApps to use your location" and "Allow PowerApps to connect to Sharepoint", etc?

Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: PowerShell cmdlet Question

Hi @ericonline,

 

Please check the updated Powershell commends in the following document:

PowerShell support for PowerApps

 

Get-AdminApiPolicy

Has been updated to:

Get-AdminDlpPolicy 

 

And the 

Set-AdminApisToBypassConsent

Has been updated to:

Set-AdminPowerAppApisToBypassConsent 

 

For the usage, per my own understanding, this setting would bypass the Sign in information for the connections usage for the user logs in.

 

see the screenshot:

Quoted:

"

SYNOPSIS
Sets the consent bypass flag so users are not required to authorize API connections for the input PowerApp.


SYNTAX
Set-AdminPowerAppApisToBypassConsent -AppName <String> [-ApiVersion <String>] [<CommonParameters>]

Set-AdminPowerAppApisToBypassConsent [-ApiVersion <String>] [-ForceLease <Boolean>] [<CommonParameters>]


DESCRIPTION
The Set-AdminPowerAppApisToBypassConsent changes the bypassConsent flag of a PowerApp to true.
Use Get-Help Set-AdminPowerAppApisToBypassConsent -Examples for more detail.

"

117.PNG118.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Super User
Super User

Re: PowerShell cmdlet Question

We ran a test today on the `Set-AdminPowerAppApisToBypassConsentcmdlet. 

 

- This cmdlet removes the need for users to accept connections to Sharepoint and other data sources

- This cmdlet does not remove the need for users to accept connections to hardware sensors such as camera and GPS

    - Tested on both iPhone and Desktop Browser

 

View solution in original post

7 REPLIES 7
Super User
Super User

Re: PowerShell cmdlet Question

We're getting the following errors when trying to run some of the PowerShell cmdlets. Are they active and supported? What could we be missing?

 

Thanks

 

Get-AdminApiPolicy : The term 'Get-AdminApiPolicy' is not recognized as the name of a cmdlet, function, script file,
or operable program. 

Check the spelling of the name, or if a path was included, verify that the path is correct and
try again. 
Community Support Team
Community Support Team

Re: PowerShell cmdlet Question

Hi @ericonline,

 

Please check the updated Powershell commends in the following document:

PowerShell support for PowerApps

 

Get-AdminApiPolicy

Has been updated to:

Get-AdminDlpPolicy 

 

And the 

Set-AdminApisToBypassConsent

Has been updated to:

Set-AdminPowerAppApisToBypassConsent 

 

For the usage, per my own understanding, this setting would bypass the Sign in information for the connections usage for the user logs in.

 

see the screenshot:

Quoted:

"

SYNOPSIS
Sets the consent bypass flag so users are not required to authorize API connections for the input PowerApp.


SYNTAX
Set-AdminPowerAppApisToBypassConsent -AppName <String> [-ApiVersion <String>] [<CommonParameters>]

Set-AdminPowerAppApisToBypassConsent [-ApiVersion <String>] [-ForceLease <Boolean>] [<CommonParameters>]


DESCRIPTION
The Set-AdminPowerAppApisToBypassConsent changes the bypassConsent flag of a PowerApp to true.
Use Get-Help Set-AdminPowerAppApisToBypassConsent -Examples for more detail.

"

117.PNG118.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Super User
Super User

Re: PowerShell cmdlet Question

Thank you very much for the response @v-micsh-msft. Is there a way to reach out to Denise Moran and let her know the blog post is out of date?https://powerapps.microsoft.com/en-us/blog/gdpr-admin-powershell-cmdlets/

 

I can't find a way to easily contact her. 

Super User
Super User

Re: PowerShell cmdlet Question

We ran a test today on the `Set-AdminPowerAppApisToBypassConsentcmdlet. 

 

- This cmdlet removes the need for users to accept connections to Sharepoint and other data sources

- This cmdlet does not remove the need for users to accept connections to hardware sensors such as camera and GPS

    - Tested on both iPhone and Desktop Browser

 

View solution in original post

Jake_Li
Level: Powered On

Re: PowerShell cmdlet Question

I'm runnuing into the same situation where users are required to allow the app created with PowerApps to use SharePoint as data source. Our Office 365 Tenant Admin did run the cmdlet as follows, but failed to get the result of bypassing the user consent (to use SharePoint as data source) as expected.

 

Set-AdminPowerAppApisToBypassConsent -AppName d96d466b-ee1b-43a1-bbe4-xxxxxxxxxxxx

 

My app had been published for many times before the cmdlet was called and we did get an Ok message after running the cmdlet.

 

I'm struggling to get rid of this deal breaker in hitting my deadline to delilver the app.

 

Appreciate it if anybody can shed some light.

 

Fingers crossed.

 

Regards, Jake

 

Super User
Super User

Re: PowerShell cmdlet Question

Hi @Jake_Li

 

You might try running `Clear-AdminPowerAppApisToBypassConsent` then Set again. Otherwise i'm not sure. Our tests resulted in: 

 

## Results

- `Set-AdminPowerAppApisToBypassConsent` does not appear to affect hardware sensors.
- `Set-AdminPowerAppApisToBypassConsent` only appears to affect API's such as Sharepoint/SQL/etc.
- `Set-AdminPowerAppApisToBypassConsent` may be of use in the future to improve User Experience by reducing the number of popups user must accept.
Jake_Li
Level: Powered On

Re: PowerShell cmdlet Question

Hi  @ericonline,

 

It seems quite wonky!

 

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?

 

Regards, Jake

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,353)