cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EdHansberry
Kudo Collector
Kudo Collector

Trying to run Power Apps PowerShell for app with a space in the name - always fails

I want to disable the consent dialog on one of my apps, which is called "Receiving Pictures Upload." I've tried no quotes, single quotes, and double quotes. Same error. What am I doing wrong? I am not a PowerShell user at all, so sort of hacking my way through this.

 

PS C:\Users\userpath> Set-AdminPowerAppApisToBypassConsent -'Receiving Pictures Upload' {xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx}
Set-AdminPowerAppApisToBypassConsent : A positional parameter cannot be found that accepts argument '-Receiving
Pictures Upload'.
At line:1 char:1
+ Set-AdminPowerAppApisToBypassConsent -'Receiving Pictures Upload' {54 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-AdminPowerAppApisToBypassConsent], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Set-AdminPowerAppApisToBypassConsent

 

1 ACCEPTED SOLUTION

Accepted Solutions

No, but it is because the syntax here is wrong, or I don't know enough about how those who talk about PowerShell write about syntax. It should be the following:

 

Set-AdminPowerAppApisToBypassConsent -AppName "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"

 

No actual name needed, and the app ID goes in double quotes, not squiggly brackets.

View solution in original post

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @EdHansberry ,

 

Did you mean that if the app name doesn't contain a space, then it will run successfully?

 

Regards,

Mona

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

No, but it is because the syntax here is wrong, or I don't know enough about how those who talk about PowerShell write about syntax. It should be the following:

 

Set-AdminPowerAppApisToBypassConsent -AppName "xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"

 

No actual name needed, and the app ID goes in double quotes, not squiggly brackets.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,950)