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 Automate / Inconsistent results f...
Power Automate
Suggested Answer

Inconsistent results for Get Admin Power Apps

(1) ShareShare
ReportReport
Posted on by 95
Hi,
 
I am trying to build a Power Automate flow that will perform admin functions by running using an Azure App instead of a named account using the information posted in Apps - Get AdminApps - REST API (Power Platform API) | Microsoft Learn.  When I try to get all apps in an environment using the Get Apps as Admin, I seem to get all the apps back (>2,500).  However, when I try to run an HTTP action to get the same information, it always returns a subset (~130), which are a mix of my flows and other people's flows that have not been shared with me.

Here's how I get my token



And this is how I'm trying to get the apps.

Categories:
I have the same question (0)
  • Suggested answer
    Assisted by AI
    MParikh Profile Picture
    510 Super User 2026 Season 1 on at

    Your HTTP call is only returning the first page.

    The Power Platform endpoint you are calling supports pagination with $top and $skiptoken. If you do not loop, you tend to see a number around 100 to 150, which matches your ~130. The admin connector often handles paging for you, so you see the full count.
    What to do
    1. Request a larger page size Use: $top=5000 Example pattern: GET https://api.powerplatform.com/powerapps/environments/{environmentId}/apps?$top=5000&api-version=2024-10-01
    If the service still paginates, you will get a skip token back.
    1. Loop on $skiptoken until empty in Power Automate:
    • Initialize variable skiptoken (string) = empty
    • Initialize array variable allApps = []
    • Do until skiptoken is empty AND you already processed the first call
    Inside the loop:
    • Build the URI: If skiptoken is empty: .../apps? $top=5000&api-version=... Else: .../apps? $top=5000&$skiptoken={skiptoken}&api-version=...
    • HTTP GET
    • Append the response value array into allApps
    • Set skiptoken from the response $skiptoken (or next token field returned)
    The docs explicitly show $top and $skiptoken for this endpoint.
    1. Make sure you pass the access token only in the HTTP Authorization header. You want: Bearer <access_token> Not the whole body output object from “Get Access Token.”
    In Power Automate, use body('Get_Access_Token'). ['access_token']
    1. If you still see fewer than expected after paging, then it is a permissions issue with the service principal, not a paging issue. Two common fixes:
    • Register the service principal as an admin management application in Power Platform (BAP).
    • Assign the right Power Platform API permissions or granular permissions for reading apps.
  • haniel Profile Picture
    95 on at
    Hi @MParikh,
     
    Thanks for your detailed answer.  I reviewed it carefully and want to provide some updates here:
     
    1. For this particular API, $top must be less then 1100.  So, I set it to 1099.
    2. I had pagination enabled on the HTTP call.  Once I disabled it, I got a nextlink value.  With this mechanism, I'm still getting 131 items (first batch is 96, second batch is 35).
    3. My authorization is only passing the bearer token, not the entire header.
    4. Since I'm getting a mix of apps from different users, I question what access the service principal has.  Here are all the permissions I have attached to one of my SPN's (for testing).  Note that most apps are Canvas apps and not in solutions.
     
     
     
     
     
     
    I tried a different tenant and still ran into the same issue.  I'm attaching the flow here to see if someone is facing the same issue.

     
     
  • Suggested answer
    MParikh Profile Picture
    510 Super User 2026 Season 1 on at

    You're missing the critical API permission

    Your service principal has Power Automate and PowerApps Runtime Service permissions, but you're missing the actual Power Platform API permission that the REST endpoint requires.

    The API you're calling (api.powerplatform.com) is different from the PowerApps Runtime Service. You need to add the Power Platform API scope.

    Add this

    1. Go to your app registration in Azure AD

    2. API permissions > Add a permission

    3. Look for Power Platform API (not PowerApps Runtime Service)

    4. Add AppManagement.Read.All or AppManagement.ApplicationUser.Read.All

    5. Grant admin consent

    If you don't see "Power Platform API" in the list:

    • Search for API by application ID
    • This is the Power Platform API resource
    Please like my answer if it help.

       

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 589

#3
Haque Profile Picture

Haque 522

Last 30 days Overall leaderboard