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 / List Direct Group Memb...
Power Automate
Answered

List Direct Group Members - "'True' is not a valid count option."

(0) ShareShare
ReportReport
Posted on by 9

Hi,

 

I'm not really sure where to post this, but I found an issue with the MS Graph Groups and Users connector, specifically the List Direct Group Members action (and the List Groups By Display Name Search action). I'm using Logic Apps.

 

When running, it throws an error message:

 

"error": {
"code": "BadRequest",
"message": "'True' is not a valid count option.",

 

If I switch to code view and find the $count line, adding quotes around the true value fixes the issue and it runs fine returning results as expected.

 

Before:

 "method": "get",
 "path": "/v1.0/groups/@{encodeURIComponent('ff9aa73e-2482-42a1-9f31-8c1f40f4fdd4')}/members",
 "queries": {
  "$count": true,
 "$filter": "jobTitle ne null",
 "$select": "displayName,userPrincipalName,id,jobTitle,mailNickname"
After:
 "method": "get",
 "path": "/v1.0/groups/@{encodeURIComponent('ff9aa73e-2482-42a1-9f31-8c1f40f4fdd4')}/members",
 "queries": {
 "$count": "true",
 "$filter": "jobTitle ne null",
 "$select": "displayName,userPrincipalName,id,jobTitle,mailNickname"
 

If I switch back to designer view make any change and save, the code is reverted, and it fails again. Like I said, not sure if there's somewhere formal to log this, but hopefully someone on here can help feed this back (assuming it can be recreated) 👍

 

Thanks,
John

Categories:
I have the same question (0)
  • Verified answer
    ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @JohnSutherland , Count parameter should work for you: Reference: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#count-parameter

     

    ANB_0-1705736211321.png

     

    Can you try to use HTTPS action rather than MS Graph Groups and Users connector to consume the graph API.

    https://learn.microsoft.com/en-us/azure/connectors/connectors-native-http

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


     

  • JohnSutherland Profile Picture
    9 on at

    Hi,

     

    Thanks. I can make it work but the issue is changes don't stick as it's not my connecter, it reverts to its original code if you save any changes in designer view (link to connector).

     

    I came here this morning to say I've switched to the HTTP connector (before seeing your reply) and am getting on much better. It's actually far more flexible this way and I can validate my input with graph explorer first 🙂

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 204

#3
Haque Profile Picture

Haque 179

Last 30 days Overall leaderboard