microsoftgraph / msgraph-sdk-powershell

Powershell SDK for Microsoft Graph
https://www.powershellgallery.com/packages/Microsoft.Graph
Other
691 stars 165 forks source link

Groups filter for property "hasMembersWithLicenseErrors" not working #2967

Open joergrenn opened 5 days ago

joergrenn commented 5 days ago

Describe the bug

I am trying to get all groups with license assignment errors in the tenant: Get-MgGroup -CountVariable CountVar -Filter "hasMembersWithLicenseErrors eq true" -Property "id,displayName" -ConsistencyLevel eventual

This is even an example in MS learn: https://learn.microsoft.com/de-de/graph/api/group-list?view=graph-rest-1.0&tabs=powershell#example-2-get-a-filtered-list-of-groups-including-the-count-of-returned-objects

However the response is unsupported filter clause:

Get-MgGroup_List: Unsupported or invalid query filter clause specified for property 'hasMembersWithLicenseErrors' of resource 'Group'.

Expected behavior

Get all groups in the tenant with license assignment errors

How to reproduce

Execute Get-MgGroup -CountVariable CountVar -Filter "hasMembersWithLicenseErrors eq true" -Property "id,displayName" -ConsistencyLevel eventual

SDK Version

2.23.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ``` ```

Configuration

PSVersion 7.4.5 PSEdition Core GitCommitId 7.4.5 OS Darwin 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:48:52 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6020 Platform Unix PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

Other information

No response