Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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'");
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |