Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'm trying to select a PowerBI Embedded Group using the $filter parameter with GetGroupsAsync()
Currently I am using Microsoft Power BI Version 2 APIs with C#
This is the method I'm trying to use:
public static System.Threading.Tasks.Task<Microsoft.PowerBI.Api.V2.Models.ODataResponseListGroup> GetGroupsAsync (this Microsoft.PowerBI.Api.V2.IGroups operations, string filter = null, Nullable<int> top = null, Nullable<int> skip = null, System.Threading.CancellationToken cancellationToken = null);
I can retrieve all the Power BI Groups using the below line, so I am confident the rest of my code is functioning
var groups = await client.Groups.GetGroupsAsync();
But how does this $filter parameter need to be formatted to retrieve only one?
I found some Power BI API Version: v1.0 REST documentation
https://docs.microsoft.com/en-us/rest/api/power-bi/groups/getgroups
I just need to match the Group Id GUID in the $filter, I tried the line below with no success
var groups = await client.Groups.GetGroupsAsync($"id eq '{workspaceId.ToString()}'");
Has anyone been able to get this $filter parameter working with the Power BI Version 2 APIs and C#?
I would prefer not to resort to retrieving all the Groups and filtering within C# if the GetGroupsAsync() $filter parameter is available.
sample :
//list workspaces
var workspaces = await pbiClient.Groups.GetGroupsAsAdminAsync(top: 100, null, "type eq 'Workspace' and state eq 'Active'");
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |