cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamesM
Level 8

PowerShell bypass consent requirements for Canvas App not working?

I have followed the directions here - http://powerappspros.com/2018/07/bypass-consent/

 

But when I try to bypass consent I get this error: 

 

PS C:\PS> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
PS C:\PS> dir . | Unblock-File
PS C:\PS> Import-Module .\Microsoft.PowerApps.Administration.PowerShell.psm1 -Force
PS C:\PS> Import-Module .\Microsoft.PowerApps.PowerShell.psm1 -Force
WARNING: The names of some imported commands from the module 'Microsoft.PowerApps.PowerShell' include unapproved verbs
that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again
 with the Verbose parameter. For a list of approved verbs, type Get-Verb.
PS C:\PS> Add-PowerAppsAccount
PS C:\PS> set-AdminAppApisToBypassConsent -AppName d0d4e1bc-3134-463d-8aa8-68a6f2af3d5e -ApiVersion 2017-05-01
set-AdminAppApisToBypassConsent : The term 'set-AdminAppApisToBypassConsent' 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.
At line:1 char:1
+ set-AdminAppApisToBypassConsent -AppName d0d4e1bc-3134-463d-8aa8-68a6 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (set-AdminAppApisToBypassConsentSmiley Frustratedtring) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I'm not sure what I'm doing wrong? :/ 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: PowerShell bypass consent requirements for Canvas App not working?

Hi @JamesM,

I agree with @jo's thought almost. The Set-AdminPowerAppApisToBypassConsent is added in PowerApps cmdlet 3.0 (PowerShell cmdlet for PowerApps).

Please take a try to type the following cmdlet within your PowerShell Command box:

 

Set-AdminPowerAppApisToBypassConsent –AppName ‘d0d4e1bc-3134-463d-8aa8-68a6f2af3d5e’ -ApiVersion 2017-05-01

then check if the issue is solved.

 

More details about the PowerApps cmdlets, please check the following article:

https://docs.microsoft.com/en-us/powerapps/administrator/powerapps-powershell

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Highlighted
PowerApps Staff jo
PowerApps Staff

Re: PowerShell bypass consent requirements for Canvas App not working?

You can use the following command to look-up the names of all cmdlets in the admin module: 

Get-Command -Module Microsoft.PowerApps.Administration.PowerShell

 

The name of the cmdlet you need is Set-AdminPowerAppApisToBypassConsent.

Community Support Team
Community Support Team

Re: PowerShell bypass consent requirements for Canvas App not working?

Hi @JamesM,

I agree with @jo's thought almost. The Set-AdminPowerAppApisToBypassConsent is added in PowerApps cmdlet 3.0 (PowerShell cmdlet for PowerApps).

Please take a try to type the following cmdlet within your PowerShell Command box:

 

Set-AdminPowerAppApisToBypassConsent –AppName ‘d0d4e1bc-3134-463d-8aa8-68a6f2af3d5e’ -ApiVersion 2017-05-01

then check if the issue is solved.

 

More details about the PowerApps cmdlets, please check the following article:

https://docs.microsoft.com/en-us/powerapps/administrator/powerapps-powershell

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
gilmara
Level: Powered On

Re: PowerShell bypass consent requirements for Canvas App not working?

I was getting ready to send these instructions to our administrator to run, but when I read the requirements here, it states that a PowerApps Plan 2 license is required. So how can Office 365 licensed account admins using the free PowerApps plan, or even PowerApps Plan 1 account owners make any of these changes?

PowerApps Staff jo
PowerApps Staff

Re: PowerShell bypass consent requirements for Canvas App not working?

In the short-term you can sign-up for PowerApps P2 30d trial - https://web.powerapps.com/trial.  Beyond 30d you will need to purchase a paid license to PowerApps P2.

kannankarmegam
Level: Powered On

Re: PowerShell bypass consent requirements for Canvas App not working?

Hi I tried this script but still users are prompted with consent screen. Any suggestions?


@v-xida-msft wrote:

Hi @JamesM,

I agree with @jo's thought almost. The Set-AdminPowerAppApisToBypassConsent is added in PowerApps cmdlet 3.0 (PowerShell cmdlet for PowerApps).

Please take a try to type the following cmdlet within your PowerShell Command box:

 

Set-AdminPowerAppApisToBypassConsent –AppName ‘d0d4e1bc-3134-463d-8aa8-68a6f2af3d5e’ -ApiVersion 2017-05-01

then check if the issue is solved.

 

More details about the PowerApps cmdlets, please check the following article:

https://docs.microsoft.com/en-us/powerapps/administrator/powerapps-powershell

 

Best regards,

Kris


 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Top Kudoed Authors
Users Online
Currently online: 42 members 4,154 guests
Please welcome our newest community members: