Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
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

  • JohnSutherland Profile Picture
    9 on at
    Re: List Direct Group Members - "'True' is not a valid count option."

    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 🙂

  • Verified answer
    ANB Profile Picture
    7,128 Super User 2025 Season 1 on at
    Re: List Direct Group Members - "'True' is not a valid count option."

    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


     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492

Featured topics