cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Get-AdminPowerApp exception: "Invalid JSON primitive: Access"

Hello,

 

I've an exception when I tried to run the PowerShell command Get-AdminPowerApp after doing a connection with a Global Tenant Admin account in our Production Tenant (throught the command Add-PowerAppsAccount). The exception throw this message: "Invalid JSON primitive: Access":

image.png

 

I tried the same command in our Dev Tenant and it works OK and I executed the Power Automate command: Get-AdminFlow, with the same admin user in the same Production Tenant and it works OK also.

 

I reviewed all the permissions, and user account has a Plan 2 Power Apps license. I don't know what else to review. 

 

Has anyone else had a similar error or can give us an idea of where to review?

 

Thanks!

Miguel.

 

 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

Hello,

Finally, I found the solution to this error:

- I was trying to access from a client environment that has a network proxy.

- I could access Admin Flow commands properly, but I always had the access error described above when running the Admin Power Apps commands.

- After investigating the error, we managed to solve it by logging into the proxy before running the Admin Power Apps commands:

$Wcl=New-Object System.Net.WebClient
$Creds=Get-Credential
$Wcl.Proxy.Credentials=$Creds

- Once logged into the proxy, the Get-AdminPowerApp command started working correctly.

Regards,

Miguel.

 

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @mpinuel ,

To perform the administration operations in the admin cmdlets, you’ll need the following:

So please check whether you meet the two requirements.

Here's a blog about it in details for your reference:

https://powerapps.microsoft.com/en-us/blog/gdpr-admin-powershell-cmdlets/

 

 

 

Best regards,

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

Hi @v-yutliu-msft ,

 

Thanks for the reply. But we've already reviewed the permissions (account it's an Office 365 Global Administrator) and it has a PowerApps Plan 2 license.

 

Anyway, I tested it with a user without these permissions (not Admin and without PowerApps license) in other test Tenant and the exception doesn't appear (obviously it doesn't return results, but it doesn't give "Invalid JSON primitive: Access" exception) so we only reproduce it in this tenant, regardless of the permissions the user has.

 

Do you know how we could perform some other test to check the connection?

 

Thanks for your support.

 

Regards,

 

 

Frequent Visitor

Hello,

Finally, I found the solution to this error:

- I was trying to access from a client environment that has a network proxy.

- I could access Admin Flow commands properly, but I always had the access error described above when running the Admin Power Apps commands.

- After investigating the error, we managed to solve it by logging into the proxy before running the Admin Power Apps commands:

$Wcl=New-Object System.Net.WebClient
$Creds=Get-Credential
$Wcl.Proxy.Credentials=$Creds

- Once logged into the proxy, the Get-AdminPowerApp command started working correctly.

Regards,

Miguel.

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Users online (80,072)