web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get-AdminPowerApp exce...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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.

 

 
 
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    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 Power Platform Member Profile Picture
    Microsoft Employee on at

    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,

     

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard