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 / Inbox childFolderCount...
Power Automate
Suggested Answer

Inbox childFolderCount field incorrect/stale - Microsoft Graph API

(1) ShareShare
ReportReport
Posted on by 62
When I use the action Send an HTTP request (Office 365 Users) with https://graph.microsoft.com/v1.0/users/@{items('Apply_to_each')?['Email']}/mailFolders/Inbox, I get "childFolderCount": 42, but when I use another send an HTTP request action to get all child folders https://graph.microsoft.com/v1.0/users/@{items('Apply_to_each')?['Email']}/mailFolders/Inbox/childFolders?$select=id,displayName&$top=100, I only get 2 child folders. Can someone please help, thanks a lot.
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,347 on at
    The first thing to verify is whether the /childFolders response includes an @odata.nextLink property, as Graph uses pagination even when $top=100 is specified in some scenarios. If there is no nextLink, run the same requests in Graph Explorer to determine whether the discrepancy is coming from Microsoft Graph itself or from the Office 365 Users connector in Power Automate.
    If Graph Explorer also reports childFolderCount = 42 but returns only 2 child folders, this may indicate a mailbox-specific or Microsoft Graph issue, and it's worth raising with Microsoft Support. If possible, also share a sanitized sample of the JSON response from both requests, especially the response headers and whether @odata.nextLink is present, as that will help pinpoint the cause.
  • Suggested answer
    trannguyen0410 Profile Picture
    62 on at
    @11manish Thank you for the answer, I checked and there’s no @odata.nextLink in the output, there is "@odata.context", and then it just ends with "value". So I’m not sure what’s going on. I tried creating a subfolder in the Inbox and it worked, but when I’m testing with another user, it’s happening like that, and I’m testing with sharing email with permission.
  • Suggested answer
    Valantis Profile Picture
    6,778 on at
     
    <cite index="60-1">By default, the /childFolders operation does not return hidden folders.</cite> That's your answer. The childFolderCount includes hidden system folders like Clutter, mail search folders, and Exchange internal folders, but your /childFolders call without the parameter only returns visible ones.
    That's why you see 42 vs 2.
     
    Add includeHiddenFolders=true to your child folders call:
     
    That should get you much closer to 42. The remaining difference (if any) might be deeply nested subfolders since childFolderCount only counts direct children at each level, not recursively.
     
      Best regards,

    Valantis   ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/ 💼 LinkedIn ▶️ YouTube

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 284

#2
11manish Profile Picture

11manish 257

#3
David_MA Profile Picture

David_MA 192 Super User 2026 Season 1

Last 30 days Overall leaderboard